Inner.IndexMixin

index implementation

Members

Functions

clear
void clear()

??

contains
bool contains(KeyType k)

Reports whether value exists in this collection Complexity: O(n) (O(n 1) on a good day)

containsValue
bool containsValue(ValueView value)

Reports whether value exists in this collection Complexity: O(n) (O(n 1) on a good day)

equalRange
BucketSeqRange equalRange(KeyType k)

Returns a range of all elements with eq(key(elem), k). Complexity: O(n) (O(n result) on a good day)

insert
size_t insert(SomeValue value)

insert value into this container. For Unique variant, will refuse value if value already exists in index.

insert
size_t insert(SomeRange r)

insert contents of r into this container. For Unique variant, will refuse any items in content if it already exists in index.

opBinaryRight
bool opBinaryRight(KeyType k)

Reports whether a value exists in the collection such that eq(k, key(value)). Complexity: O(n) (O(1) on a good day)

opBinaryRight
bool opBinaryRight(ValueView value)

Reports whether value exists in this collection. Complexity: O(n) (O(n 1) on a good day)

opIndex
ValueView opIndex(KeyType k)

Available for Unique variant. Complexity: O(n) (O(1) on a good day)

opSlice
HashedRange opSlice()

Gets a range of all elements in container. Complexity: O(1)

remove
HashedRange remove(R r)

Removes all of r from this container. Preconditions: r came from this index

removeKey
size_t removeKey(KeyType k)
size_t removeKey(Stuff stuff)

Removes all elements with key k from this container.

Properties

empty
bool empty [@property getter]

Property returning true if and only if the container has no elements.

front
front [@property getter]

Preconditions: !empty Complexity: O(1)

length
size_t length [@property getter]

Returns the number of elements in the container.

Structs

HashedRangeT
struct HashedRangeT(bool is_const)

the primary range for this index, which embodies a forward range. iteration has time complexity O(n)

Meta