Array Module
This module contains additional functions for working with arrays. `Deedle.Internals` is opened, it extends the standard `Array` module.
Functions and values
| Function or value |
Description
|
Full Usage:
binarySearchNearestGreater key comparer inclusive array
Parameters:
'T
comparer : IComparer<'T>
inclusive : bool
array : ReadOnlyCollection<'T>
Returns: int option
|
Returns the index of 'key' or the index of immediately following value. If the specified key is greater than all keys in the array, None is returned. When 'inclusive' is false, the function returns the index of strictry greater value. Note that the function expects that the array contains distinct values (which is fine because LinearIndex does not support duplicate keys)
|
Full Usage:
binarySearchNearestSmaller key comparer inclusive array
Parameters:
'T
comparer : IComparer<'T>
inclusive : bool
array : ReadOnlyCollection<'T>
Returns: int option
|
Returns the index of 'key' or the index of immediately preceeding value. If the specified key is smaller than all keys in the array, None is returned. When 'inclusive' is false, the function returns the index of strictry smaller value. Note that the function expects that the array contains distinct values (which is fine because LinearIndex does not support duplicate keys)
|
Full Usage:
choosei f array
Parameters:
int -> 'a -> 'b option
array : 'a[]
Returns: 'b[]
Modifiers: inline Type parameters: 'a, 'b |
Returns a new array containing only the elements for which the specified function returns `Some`. The predicate is called with the index in the source array and the element.
|
Full Usage:
dropRange first last data
Parameters:
int
last : int
data : 'T[]
Returns: 'T array
Modifiers: inline Type parameters: 'T |
Drop a specified range from a given array. The operation is inclusive on both sides. Given [ 1; 2; 3; 4 ] and indices (1, 2), the result is [ 1; 4 ]
|
Deedle