Ranges Module
Provides F# functions for working with the `Ranges<'T>` type. Note that most of the functions are also exposed as members. The terminology in the functions below is: - **offset** refers to an absolute `int64` offset of a key in the range - **key** refers to a key value of type `'T` Say, you have daily range `[ (2015-01-01, 2015-01-10); (2015-02-01, 2015-02-10) ]`. Then, the keys are the dates and the offsets are 0 .. 9 for the first part and 10 .. 19 for the second part.
Functions and values
| Function or value |
Description
|
|
|
Full Usage:
create ops ranges
Parameters:
IRangeKeyOperations<'T>
ranges : ('T * 'T) seq
Returns: Ranges<'T>
Modifiers: inline Type parameters: 'T (requires equality) |
Create a range from a sequence of low-high pairs and an explicitly specified range key operations
|
Full Usage:
inlineCreate succ ranges
Parameters:
^T -> int64 -> ^T
ranges : (^T * ^T) seq
Returns: Ranges<^T>
Modifiers: inline Type parameters: ^T (requires comparison and (static member op_Subtraction : ^T * ^T -> ^T) and (static member op_Addition : ^T * ^T -> ^T) and (static member get_One : -> ^T) and (static member op_UnaryNegation : ^T -> ^T) and (static member op_Explicit : ^T -> Microsoft.FSharp.Core.int64)) |
Create a range from a sequence of low-high pairs (range key operations used standard arithmetic)
|
Full Usage:
invalid
Returns: int64
|
Represents invalid offset
|
Full Usage:
keyAtOffset offs ranges
Parameters:
int64
ranges : Ranges<'T>
Returns: 'T
Type parameters: 'T (requires equality) |
Returns the key at a given offset. For example, given ranges [10..12; 30..32], the function defines a mapping: 0->10, 1->11, 2->12, 3->30, 4->31, 5->32 When the offset is wrong, throws `IndexOutOfRangeException`
|
Full Usage:
keyRange ranges
Parameters:
Ranges<'T>
Returns: 'T * 'T
Modifiers: inline Type parameters: 'T (requires equality) |
|
Full Usage:
keys ranges
Parameters:
Ranges<'T>
Returns: 'T seq
Modifiers: inline Type parameters: 'T (requires equality) |
|
Full Usage:
length ranges
Parameters:
Ranges<'T>
Returns: int64
Modifiers: inline Type parameters: 'T (requires equality) |
|
Full Usage:
lookup key semantics check ranges
Parameters: Returns: OptionalValue<'T * int64>
Type parameters: 'T (requires equality) |
Implements a lookup using the specified semantics & check function. For `Exact` match, this is the same as `offsetOfKey`. In other cases, we first find the place where the key *would* be and then scan in one or the other direction until 'check' returns 'true' or we find the end. Returns the key together with its offset in the range.
|
Full Usage:
offsetOfKey key ranges
Parameters:
'T
ranges : Ranges<'T>
Returns: int64
Type parameters: 'T (requires equality) |
Returns the offset of a given key. For example, given ranges [10..12; 30..32], the function defines a mapping: 10->0, 11->1, 12->2, 30->3, 31->4, 32->5 When the key is wrong, returns `Ranges.invalid`
|
Full Usage:
restrictRanges restriction ranges
Parameters:
RangeRestriction<'T>
ranges : Ranges<'T>
Returns: Ranges<'T>
Type parameters: 'T (requires equality) |
Restricts the ranges according to the specified range restriction
|
Deedle