Determines whether a value is within an algorithm's
requested tolerance.
Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (Extreme.Numerics)
Syntax
| Visual Basic (Declaration) |
|---|
Public Shared Function IsValueWithinTolerance ( _ algorithm As IterativeAlgorithm, _ estimatedError As Double, _ x As Double _ ) As Boolean |
| C# |
|---|
public static bool IsValueWithinTolerance ( IterativeAlgorithm algorithm, double estimatedError, double x ) |
| C++ |
|---|
public: static bool IsValueWithinTolerance ( IterativeAlgorithm^ algorithm, double estimatedError, double x ) |
Parameters
- algorithm (Extreme.Mathematics.IterativeAlgorithm)
- A class that implements the IterativeAlgorithm interface.
- estimatedError (System.Double)
- The error to verify.
- x (System.Double)
- A value that is representative of the size of the result.
Return Value
true if the error is within the requested tolerance; otherwise false.
Remarks
This method uses the properties of the
provided IterativeAlgorithm object.
In particular, the
ConvergenceCriterion,
and either or both of
AbsoluteTolerance
and RelativeTolerance.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | algorithm is nullNothingnullptr. |