Finds the key nearest to the specified value in the index.
Extreme.Numerics.Net40 (in Extreme.Numerics.Net40.dll) Version: 6.0.16073.0 (6.0.16312.0)
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.CollectionsDirection
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).
Supported in: 5.x