Finds the key nearest to the specified value in the index.
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public int LookupNearest(
Public Function LookupNearest (
key As T,
direction As Direction
) As Integer
member LookupNearest :
key : 'T *
direction : Direction -> int
- Type: T
The key to locate.
- Type: Extreme.DataAnalysisDirection
The direction to look for the key if an exact match is not found.
If a key was found, the zero-based position of
the key closest to key
in the direction specified
; otherwise -1.
This operation is only allowed on sorted indexes.
The only situation where a lookup can fail is if key
is smaller than the first key (if direction is Forward)
or greater than the last key (if direction is Backward).