Click or drag to resize

MathUtilGetIndeces Method (Double, MathUtilIDataToInterpolate, Int32, Int32, Boolean)

Finds the two indexes in a mononton vector using bisection search. This can handle as well increasing as decreasing vectors, as long as they are monotone. The indexes corresponds to the points neighbouring the argument, arg. In case of an exact match the two indexes will be identical. If the argument is outside the valid interval either the lower or the upper interval boundary is returned depending on wheter the argument is lower or higher than the lower or upper boundary, respectively.

Namespace:  DHI.Mike1D.Generic
Assembly:  DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 19.0.0.0 (11.1.1.1111)
Syntax
public static void GetIndeces(
	double arg,
	MathUtilIDataToInterpolate data,
	ref int iLow,
	ref int iHigh,
	bool xIncreasing
)

Parameters

arg
Type: SystemDouble
Value to look up in table
data
Type: DHI.Mike1D.GenericMathUtilIDataToInterpolate
Accessor to data
iLow
Type: SystemInt32
The low index, the index to the lowest vector value
iHigh
Type: SystemInt32
The high index, the index to the highest vector value
xIncreasing
Type: SystemBoolean
Increasing or decreasing vector values
See Also