Header menu logo B2R2

IntervalMap Module

Provides functions for creating or manipulating interval maps.

Functions and values

Function or value Description

IntervalMap.add i v arg3

Full Usage: IntervalMap.add i v arg3

Parameters:
Returns: IntervalMap<'a>
Type parameters: 'a

Adds a mapping to the interval map. Overlapping intervals are allowed, but an exact duplicate range is not.

i : AddrRange
v : 'a
arg2 : IntervalMap<'a>
Returns: IntervalMap<'a>

IntervalMap.addOrReplace i v m

Full Usage: IntervalMap.addOrReplace i v m

Parameters:
Returns: IntervalMap<'V>
Type parameters: 'V

Adds a new mapping to the IntervalMap in case there is no exactly matching interval. If there is a matching interval, this function will replace the existing mapping with the new one.

i : AddrRange
v : 'V
m : IntervalMap<'V>
Returns: IntervalMap<'V>

IntervalMap.containsAddr addr m

Full Usage: IntervalMap.containsAddr addr m

Parameters:
Returns: bool
Type parameters: 'a

Checks whether the given address exists in the interval tree.

addr : Addr
m : IntervalMap<'a>
Returns: bool

IntervalMap.containsRange range m

Full Usage: IntervalMap.containsRange range m

Parameters:
Returns: bool
Type parameters: 'V

Checks whether the exact range exists in the interval tree.

range : AddrRange
m : IntervalMap<'V>
Returns: bool

IntervalMap.count arg1

Full Usage: IntervalMap.count arg1

Parameters:
Returns: int
Type parameters: 'V

Returns the number of mappings in the interval map.

arg0 : IntervalMap<'V>
Returns: int

IntervalMap.empty

Full Usage: IntervalMap.empty

Returns: IntervalMap<'V>
Type parameters: 'V

Empty interval tree.

Returns: IntervalMap<'V>

IntervalMap.findAll range m

Full Usage: IntervalMap.findAll range m

Parameters:
Returns: 'a list
Type parameters: 'a

Finds all values whose intervals overlap with the given range.

range : AddrRange
m : IntervalMap<'a>
Returns: 'a list

IntervalMap.findExactlyOne range m

Full Usage: IntervalMap.findExactlyOne range m

Parameters:
Returns: 'a
Type parameters: 'a

Finds the value whose interval exactly matches the given range when there is exactly one matching interval; raises KeyNotFoundException otherwise.

range : AddrRange
m : IntervalMap<'a>
Returns: 'a

IntervalMap.findExactlyOneByMin addr m

Full Usage: IntervalMap.findExactlyOneByMin addr m

Parameters:
Returns: 'a
Type parameters: 'a

Finds the value whose interval has the same low bound (Min) as the given address when there is exactly one such interval; raises KeyNotFoundException otherwise.

addr : Addr
m : IntervalMap<'a>
Returns: 'a

IntervalMap.findOverlappingOne range m

Full Usage: IntervalMap.findOverlappingOne range m

Parameters:
Returns: 'a
Type parameters: 'a

Finds the value whose interval overlaps with the given range when there is exactly one such interval; raises KeyNotFoundException otherwise.

range : AddrRange
m : IntervalMap<'a>
Returns: 'a

IntervalMap.findOverlappingOneByAddr addr m

Full Usage: IntervalMap.findOverlappingOneByAddr addr m

Parameters:
Returns: 'a
Type parameters: 'a

Finds the value whose interval contains the given address when there is exactly one such interval; raises KeyNotFoundException otherwise.

addr : Addr
m : IntervalMap<'a>
Returns: 'a

IntervalMap.fold fn acc arg3

Full Usage: IntervalMap.fold fn acc arg3

Parameters:
Returns: 'a
Type parameters: 'a, 'V

Folds the elements of the interval map.

fn : 'a -> AddrRange -> 'V -> 'a
acc : 'a
arg2 : IntervalMap<'V>
Returns: 'a

IntervalMap.isEmpty m

Full Usage: IntervalMap.isEmpty m

Parameters:
Returns: bool
Type parameters: 'V

Checks if the given interval tree is empty.

m : IntervalMap<'V>
Returns: bool

IntervalMap.iter fn m

Full Usage: IntervalMap.iter fn m

Parameters:
Type parameters: 'a

Iterates the elements of the interval map.

fn : AddrRange -> 'a -> unit
m : IntervalMap<'a>

IntervalMap.overlapsRange range arg2

Full Usage: IntervalMap.overlapsRange range arg2

Parameters:
Returns: bool
Type parameters: 'a

Checks whether the given address interval overlaps with any of the intervals in the interval map.

range : AddrRange
arg1 : IntervalMap<'a>
Returns: bool

IntervalMap.remove i arg2

Full Usage: IntervalMap.remove i arg2

Parameters:
Returns: IntervalMap<'a>
Type parameters: 'a

Removes the interval that exactly matches the given range. Raises InvalidAddrRangeException if there is no such interval.

i : AddrRange
arg1 : IntervalMap<'a>
Returns: IntervalMap<'a>

IntervalMap.replace i v arg3

Full Usage: IntervalMap.replace i v arg3

Parameters:
Returns: IntervalMap<'V>
Type parameters: 'V

Replaces the value for the interval that exactly matches the given range. Raises InvalidAddrRangeException if there is no such interval.

i : AddrRange
v : 'V
arg2 : IntervalMap<'V>
Returns: IntervalMap<'V>

IntervalMap.tryFindExactlyOne range m

Full Usage: IntervalMap.tryFindExactlyOne range m

Parameters:
Returns: 'V option
Type parameters: 'V

Finds the value whose interval exactly matches the given range only when there is exactly one matching interval.

range : AddrRange
m : IntervalMap<'V>
Returns: 'V option

IntervalMap.tryFindExactlyOneByMin addr arg2

Full Usage: IntervalMap.tryFindExactlyOneByMin addr arg2

Parameters:
Returns: 'a option
Type parameters: 'a

Finds the value whose interval has the same low bound (Min) as the given address only when there is exactly one matching interval.

addr : Addr
arg1 : IntervalMap<'a>
Returns: 'a option

IntervalMap.tryFindOverlappingOne range m

Full Usage: IntervalMap.tryFindOverlappingOne range m

Parameters:
Returns: 'a option
Type parameters: 'a

Finds the value whose interval overlaps with the given range only when there is exactly one such interval.

range : AddrRange
m : IntervalMap<'a>
Returns: 'a option

IntervalMap.tryFindOverlappingOneByAddr addr m

Full Usage: IntervalMap.tryFindOverlappingOneByAddr addr m

Parameters:
Returns: 'a option
Type parameters: 'a

Finds the value whose interval contains the given address only when there is exactly one such interval.

addr : Addr
m : IntervalMap<'a>
Returns: 'a option

Type something to start searching.