OrderedIndex

ordered index implementation

Members

Aliases

Elem
alias Elem = ValueView

Element type for the tree

Functions

bounds
auto bounds(U lower, U upper)

Get a range of values bounded below by lower and above by upper, with inclusiveness defined by boundaries. Complexity: O(log(n))

clear
void clear()

Removes all elements from the container.

equalRange
auto equalRange(U k)

Get a range from the container with all elements that are == k according to the less comparator

insert
size_t insert(Stuff stuff)

Insert a single element in the container. Note that this does not invalidate any ranges currently iterating the container.

insert
size_t insert(Stuff stuff)

Insert a range of elements in the container. Note that this does not invalidate any ranges currently iterating the container.

lowerBound
auto lowerBound(U k)

Get a range from the container with all elements that are < k according to the less comparator

modify
void modify(SomeRange r, Modifier mod)

Perform mod on r.front and performs any necessary fixups to container's indices. If the result of mod violates any index' invariant, r.front is removed from the container. Preconditions: !r.empty,
mod is a callable of the form void mod(ref Value) Complexity: O(m(n)),
O(log(n)) for this index

opBinaryRight
bool opBinaryRight(Elem e)

in operator. Check to see if the given element exists in the container.

opBinaryRight
bool opBinaryRight(K k)

in operator. Check to see if the given element exists in the container.

opIndex
ValueView opIndex(KeyType k)

Available for Unique variant. Complexity: O(log(n))

opSlice
OrderedRange opSlice()

Fetch a range that spans all the elements in the container.

remove
OrderedRange remove(R r)

Removes the given range from the container.

removeAny
Elem removeAny()

Remove an element from the container and return its value.

removeBack
void removeBack()

Remove the back element from the container.

removeFront
void removeFront()

Remove the front element from the container.

removeKey
size_t removeKey(Keys keys)
size_t removeKey(Stuff stuff)

Removes elements from the container that are equal to the given values according to the less comparator. One element is removed for each value given which is in the container. If allowDuplicates is true, duplicates are removed only if duplicate values are given.

replace
bool replace(Position!ThisNode r, ValueView value)

Replaces r.front with value

upperBound
auto upperBound(U k)

Get a range from the container with all elements that are > k according to the less comparator

Properties

back
back [@property getter]

The last element in the container

empty
bool empty [@property getter]

Check if any elements exist in the container. Returns true if at least one element exists. Complexity: O(1)

front
front [@property getter]

The front element in the container

length
size_t length [@property getter]

Returns the number of elements in the container.

Structs

OrderedRangeT
struct OrderedRangeT(bool is_const)

The range type for this index, which embodies a bidirectional range

Meta