WebCab XL Community Edition

Inter.LocateHunt Method 

This is a utility function which searches an ordered monotonic sequence and returns the relative position within the sequence using a method which combines the hunt and Bisection method.

public int LocateHunt(
   double[] MonoSeq,
   double Value
);

Parameters

MonoSeq
An array of monotonic values (increasing or decreasing).
Value
Value to the point which is being given a relative ordering.

Remarks

This method first finds (or hunts for) two elements of a sequence of monotonic real numbers (i.e. sequentially increasing or decreasing) which bracket the desired value and then applies in bisection searching algorithm.

This method attempts to bracket the valueBeingOrdered parameter between two consecutive elements of the array and return the lower bound. Several special cases are treated separately as follows:

Excel Remarks

The full name of this function inside Excel is Ipola_Inter_LocateHunt.

Exceptions

Exception TypeCondition
InterpolationExceptionThrown when the array is null.

See Also

Inter Class | Interpolation Namespace