AlgorithmHelper.IsIntervalWithinTolerance Method

Determines whether an interval is within an algorithm's requested tolerance.

Definition

Namespace: Numerics.NET.Algorithms
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.0
C#
public static bool IsIntervalWithinTolerance(
	IterativeAlgorithm<double> algorithm,
	double lowerBound,
	double upperBound
)

Parameters

algorithm  IterativeAlgorithm<Double>
A class that implements the IterativeAlgorithm<T> interface.
lowerBound  Double
The lower bound of the interval.
upperBound  Double
The upper bound of the interval.

Return Value

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

If lowerBound is greater than upperBound, this method always returns false.

Exceptions

ArgumentNullException

algorithm is null.

See Also