Coalescing map from key intervals to values, stored as a compact B+‐tree.

Synopsis

Declared in <llvm/ADT/IntervalMap.h>

template<
    typename KeyT,
    typename ValT,
    unsigned int N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize,
    typename Traits = IntervalMapInfo<KeyT>>
class IntervalMap;

Types

Name

Description

const_iterator

Read‐only bidirectional iterator over coalesced intervals in an IntervalMap.

iterator

Mutable bidirectional iterator over coalesced intervals in an IntervalMap.

Type Aliases

Name

Description

Allocator

Recycling allocator type used for heap‐allocated tree nodes.

KeyTraits

Traits controlling closed vs half‐open interval semantics.

KeyType

Type of keys that bound intervals.

ValueType

Type of values mapped from intervals.

Member Functions

Name

Description

IntervalMap [constructor]

Constructors

~IntervalMap [destructor]

Destroy the map and free all allocated nodes.

operator=

Assignment operators

begin

begin overloads

clear

clear ‐ Remove all entries.

empty

empty ‐ Return true when no intervals are mapped.

end

end overloads

find

find ‐ Return an iterator pointing to the first interval ending at or after x, or end().

insert

Add a mapping of [a;b]to y, coalescing with adjacent intervals.

lookup

lookup ‐ Return the mapped value at x or NotFound.

overlaps

overlaps(a, b) ‐ Return true if the intervals in this map overlap with the interval [a;b].

start

start ‐ Return the smallest mapped key in a non‐empty map.

stop

stop ‐ Return the largest mapped key in a non‐empty map.

Data Members

Name

Description

branchData [variant member]

Root branch payload once the map has grown beyond the inline leaf.

leaf [variant member]

Inline leaf storage used while the map is unbranched.

Friends

Name

Description

llvm::IntervalMap::iterator

Mutable bidirectional iterator over coalesced intervals in an IntervalMap.

llvm::IntervalMap::const_iterator

Read‐only bidirectional iterator over coalesced intervals in an IntervalMap.

Created with MrDocs