Algorithm Helper.Is Value Within Tolerance Method
Definition
Namespace: Numerics.NET.Algorithms
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Overload List
IsValue | Determines whether a value is within an algorithm's requested tolerance. |
IsValue | Returns whether an error is within the required tolerance. |
IsValueWithinTolerance(IterativeAlgorithm<Double>, Double, Double)
Determines whether a value is within an algorithm's
requested tolerance.
public static bool IsValueWithinTolerance(
IterativeAlgorithm<double> algorithm,
double estimatedError,
double x
)
Parameters
- algorithm IterativeAlgorithm<Double>
- A class that implements the IterativeAlgorithm<T> interface.
- estimatedError Double
- The error to verify.
- x Double
- A value that is representative of the size of the result.
Return Value
Booleantrue if the estimatedError is within the requested tolerance; otherwise false.
Remarks
This method uses the properties of the provided IterativeAlgorithm<T> object. In particular, the ConvergenceCriterion, and either or both of AbsoluteTolerance and RelativeTolerance.
Exceptions
Argument | algorithm is null. |
IsValueWithinTolerance<T>(IterativeAlgorithm<T>, T, T)
Returns whether an error is within the required tolerance.
public static bool IsValueWithinTolerance<T>(
IterativeAlgorithm<T> algorithm,
T estimatedError,
T x
)
where T : Object, INumberBase<T>
Parameters
- algorithm IterativeAlgorithm<T>
- estimatedError T
- x T
Type Parameters
- T