IRangeKeyOperations<'TKey>
Namespace: Deedle.Ranges
A set of operations on keys that you need to implement in order to use the
Ranges<'TKey>
type. The 'TKey
type is typically the key of a BigDeedle
series. It can represent different things, such as:
int64
- if you have ordinally indexed series
Date
(of some sort) - if you have daily time series
DateTimeOffset
- if you have time series with DTO keys
The operations need to implement the right thing based on the logic of the
keys. So for example if you have one data point every hour, IncrementBy
should
add the appropriate number of hours. Or if you have keys as business days, the
IncrementBy
operation should add a number of business days (that is, the
operations may be simple numerical addition, but may contain more logic).
Instance members
Instance member | Description |
Compare(arg1, arg2)
Signature: ('TKey * 'TKey) -> int
Modifiers: abstract
|
Compare two keys. Return +1 if first is larger, -1 if second is larger, 0 otherwise
|
Distance(arg1, arg2)
Signature: ('TKey * 'TKey) -> int64
Modifiers: abstract
|
Return distance between two keys - return 0 if the keys are the same
(the second key is always larger than the first)
|
IncrementBy(arg1, arg2)
Signature: ('TKey * int64) -> 'TKey
Modifiers: abstract
|
Get the n-th next key after the specified key (n is always non-negative)
|
Range(arg1, arg2)
Signature: ('TKey * 'TKey) -> seq<'TKey>
Modifiers: abstract
|
Generate keys within the specific range (inclusively). Here, the second
key can be smaller (in which case the range should be from larger to smaller)
|
ValidateKey(arg1, arg2)
Signature: ('TKey * Lookup) -> OptionalValue<'TKey>
Modifiers: abstract
|
Find the first valid key around the specified 'TKey value. This is used
when not all 'TKey values can appear as keys of the series. If lookup is
Exact , it should just check validity; for other lookups, this should either
find first smaller or first larger valid key (but not skip any keys).
This is only called with lookup = Lookup.Exact , unless you are also using
Ranges.lookup function inside IVirtualVectorSource<'T>.LookupValue .
|