NoOverlapIntervalMap Module
Provides functions for creating or manipulating non-overlapping interval maps.
Functions and values
| Function or value |
Description
|
||
Full Usage:
NoOverlapIntervalMap.add k v tree
Parameters:
AddrRange
-
AddrRange as a key.
v : 'V
-
The value to be added.
tree : NoOverlapIntervalMap<'V>
-
The interval tree.
Returns: NoOverlapIntervalMap<'V>
A new interval tree.
Type parameters: 'V |
Adds a mapping from an interval to the value in the interval tree.
|
||
Full Usage:
NoOverlapIntervalMap.addByBounds min max v tree
Parameters:
Addr
-
The min value of the interval.
max : Addr
-
The max value of the interval.
v : 'V
-
The value to be added.
tree : NoOverlapIntervalMap<'V>
-
The interval tree.
Returns: NoOverlapIntervalMap<'V>
A new interval tree.
Type parameters: 'V |
Adds a mapping from an interval to the value in the interval tree, taking separate min and max parameters instead of an AddrRange.
|
||
Full Usage:
NoOverlapIntervalMap.containsAddr addr tree
Parameters:
Addr
-
Address.
tree : NoOverlapIntervalMap<'V>
-
The interval tree.
Returns: bool
True if the interval tree contains an interval that includes the given
address, false otherwise.
Type parameters: 'V |
Checks whether a given Addr exists in any of the ranges in the map.
|
||
Full Usage:
NoOverlapIntervalMap.containsRange range tree
Parameters:
AddrRange
-
The address range.
tree : NoOverlapIntervalMap<'V>
-
The interval tree.
Returns: bool
True if the interval tree contains the interval, false otherwise.
Type parameters: 'V |
Checks whether the exact range exists in the interval map.
|
||
Full Usage:
NoOverlapIntervalMap.count tree
Parameters:
NoOverlapIntervalMap<'V>
-
The interval tree.
Returns: int
The number of bindings.
Type parameters: 'V |
Returns the number of bindings in the interval map.
|
||
|
Returns an empty map.
|
||
Full Usage:
NoOverlapIntervalMap.find range tree
Parameters:
AddrRange
-
The address range.
tree : NoOverlapIntervalMap<'V>
-
The interval tree.
Returns: 'V
The value associated with the given interval.
Type parameters: 'V |
Finds the mapping that exactly matches with the given range.
|
||
Full Usage:
NoOverlapIntervalMap.findByAddr addr tree
Parameters:
Addr
-
The address.
tree : NoOverlapIntervalMap<'V>
-
The interval tree.
Returns: 'V
The value associated with the given address.
Type parameters: 'V |
Finds the mapping that matches with the given address. Unlike find, this function can return a range that covers the given address.
|
||
Full Usage:
NoOverlapIntervalMap.findOverlaps k tree
Parameters:
AddrRange
-
The key interval.
tree : NoOverlapIntervalMap<'V>
-
The interval tree.
Returns: (AddrRange * 'V) list
A sequence of mappings.
Type parameters: 'V |
Returns a sequence of overlapping mappings of the given interval.
|
||
Full Usage:
NoOverlapIntervalMap.findRangeByAddr addr tree
Parameters:
Addr
-
The address.
tree : NoOverlapIntervalMap<'V>
-
The interval tree.
Returns: AddrRange
The found interval.
Type parameters: 'V |
Finds an interval stored in the interval tree map, which includes the given address.
|
||
Full Usage:
NoOverlapIntervalMap.fold fn acc tree
Parameters:
'b -> AddrRange -> 'V -> 'b
-
Folder.
acc : 'b
-
Accumulator.
tree : NoOverlapIntervalMap<'V>
-
The interval tree.
Returns: 'b
Accumulated value.
Type parameters: 'b, 'V |
Folds over the tree.
|
||
Full Usage:
NoOverlapIntervalMap.isEmpty tree
Parameters:
NoOverlapIntervalMap<'V>
-
The interval tree.
Returns: bool
Returns true if the tree is empty, false otherwise.
Type parameters: 'V |
Checks if the given interval map is empty.
|
||
Full Usage:
NoOverlapIntervalMap.iter fn tree
Parameters:
AddrRange -> 'V -> unit
-
Iterator.
tree : NoOverlapIntervalMap<'V>
-
The interval tree.
Type parameters: 'V |
Iterates over the tree.
|
||
Full Usage:
NoOverlapIntervalMap.remove k tree
Parameters:
AddrRange
-
The interval to find.
tree : NoOverlapIntervalMap<'V>
-
The interval tree.
Returns: NoOverlapIntervalMap<'V>
A new interval tree.
Type parameters: 'V |
Removes a mapping that matches exactly with the given range. To remove a mapping that covers the given address, use removeByAddr.
|
||
Full Usage:
NoOverlapIntervalMap.removeByAddr addr tree
Parameters:
Addr
-
The address.
tree : NoOverlapIntervalMap<'V>
-
The interval tree.
Returns: NoOverlapIntervalMap<'V>
A new interval tree.
Type parameters: 'V |
Removes a mapping that matches with the given address. Unlike remove, this function will remove an interval that includes the given address.
|
||
Full Usage:
NoOverlapIntervalMap.replace k v tree
Parameters:
AddrRange
-
AddrRange as a key.
v : 'V
-
The value to be added.
tree : NoOverlapIntervalMap<'V>
-
The interval tree.
Returns: NoOverlapIntervalMap<'V>
A new interval tree.
Type parameters: 'V |
Replaces the value for an existing range if it exactly matches the given range. If ranges overlap, this function will still raise RangeOverlapException.
|
||
Full Usage:
NoOverlapIntervalMap.tryFind range tree
Parameters:
AddrRange
-
The address range.
tree : NoOverlapIntervalMap<'V>
-
The interval tree.
Returns: 'V option
The value associated with the given interval.
Type parameters: 'V |
Finds the mapping that exactly matches with the given range and returns an option-wrapped type.
|
||
Full Usage:
NoOverlapIntervalMap.tryFindByAddr addr tree
Parameters:
Addr
-
The address.
tree : NoOverlapIntervalMap<'V>
-
The interval tree.
Returns: 'V option
The value associated with the given address.
Type parameters: 'V |
Finds the mapping that matches with the given address and returns an option-wrapped type.
|
||
Full Usage:
NoOverlapIntervalMap.tryFindRangeByAddr addr tree
Parameters:
Addr
-
The address.
tree : NoOverlapIntervalMap<'V>
-
The interval tree.
Returns: AddrRange option
The found interval wrapped with option.
Type parameters: 'V |
Finds an interval stored in the interval tree map, which includes the given address.
|
B2R2