AlgorithmHelper.IsValueWithinTolerance Method

Determines whether a value is within an algorithm's requested tolerance.

Definition

Namespace: Extreme.Mathematics.Algorithms
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public static bool IsValueWithinTolerance(
	IterativeAlgorithm algorithm,
	double estimatedError,
	double x
)

Parameters

algorithm  IterativeAlgorithm
A class that implements the IterativeAlgorithm interface.
estimatedError  Double
The error to verify.
x  Double
A value that is representative of the size of the result.

Return Value

Boolean
true if the estimatedError 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

ArgumentNullExceptionalgorithm is null.

See Also