Maps a sequence of keys to the position of the nearest key in the index.
Namespace:
Extreme.DataAnalysis
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public virtual int[] LookupNearest(
IEnumerable<T> values,
Direction direction
)
Public Overridable Function LookupNearest (
values As IEnumerable(Of T),
direction As Direction
) As Integer()
public:
virtual array<int>^ LookupNearest(
IEnumerable<T>^ values,
Direction direction
)
abstract LookupNearest :
values : IEnumerable<'T> *
direction : Direction -> int[]
override LookupNearest :
values : IEnumerable<'T> *
direction : Direction -> int[]
Parameters
- values
- Type: System.Collections.GenericIEnumerableT
A sequence of keys to locate in the index. - direction
- Type: Extreme.DataAnalysisDirection
The direction to look for the key if an exact match is not found.
Return Value
Type:
Int32An array containing the mapped position of the elements of
values.
If a nearest key was found in the index, then the mapped position is the zero-based
position of the first occurance of the value in the index;
otherwise the mapped position is -1.
Reference