Inner.IndexMixin

index implementation

template Inner(ThisContainer, ThisNode, Value, ValueView, size_t N, Allocator)
mixin template IndexMixin (
size_t N
alias KeyFromValue
alias Hash
alias Eq
bool allowDuplicates
alias SeqRange
ThisContainer
) {}

Members

Aliases

BucketSeqRange
alias BucketSeqRange = SeqRange!false
Undocumented in source.
ConstBucketSeqRange
alias ConstBucketSeqRange = SeqRange!true
Undocumented in source.
ConstHashedRange
alias ConstHashedRange = HashedRangeT!true
Undocumented in source.
HashedRange
alias HashedRange = HashedRangeT!false
Undocumented in source.
KeyType
alias KeyType = typeof(key((Value).init))
Undocumented in source.
eq
alias eq = binaryFun!Eq
Undocumented in source.
hash
alias hash = unaryFun!Hash
Undocumented in source.
key
alias key = unaryFun!KeyFromValue
Undocumented in source.

Functions

_Check
void _Check()
Undocumented in source. Be warned that the author may not have intended to support it.
_ClearIndex
void _ClearIndex()
Undocumented in source. Be warned that the author may not have intended to support it.
_DenyInsertion
bool _DenyInsertion(ThisNode* node, ThisNode* cursor)
Undocumented in source. Be warned that the author may not have intended to support it.
_FixPosition
void _FixPosition(ThisNode* node, KeyType oldPosition, ThisNode* cursor)
Undocumented in source. Be warned that the author may not have intended to support it.
_Insert
void _Insert(ThisNode* n)
Undocumented in source. Be warned that the author may not have intended to support it.
_Insert
void _Insert(ThisNode* node, ThisNode* cursor)
Undocumented in source. Be warned that the author may not have intended to support it.
_NodePosition
KeyType _NodePosition(ThisNode* node)
Undocumented in source. Be warned that the author may not have intended to support it.
_NodeReplace
void _NodeReplace(ThisNode* old, ThisNode* newnode)
Undocumented in source. Be warned that the author may not have intended to support it.
_NotifyChange
bool _NotifyChange(ThisNode* node)
Undocumented in source. Be warned that the author may not have intended to support it.
_PositionFixable
bool _PositionFixable(ThisNode* node, KeyType oldPosition, ThisNode* cursor)
Undocumented in source. Be warned that the author may not have intended to support it.
_Remove
void _Remove(ThisNode* n)
Undocumented in source. Be warned that the author may not have intended to support it.
_find
bool _find(const(KeyType) k, inout(ThisNode)* node, size_t index)
Undocumented in source. Be warned that the author may not have intended to support it.
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)

equalRange
ConstBucketSeqRange equalRange(KeyType k)
Undocumented in source. Be warned that the author may not have intended to support it.
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.

isFirst
bool isFirst(ThisNode* n)
Undocumented in source. Be warned that the author may not have intended to support it.
maxLoad
size_t maxLoad(size_t n)
Undocumented in source. Be warned that the author may not have intended to support it.
modify
void modify(SomeRange r, Modifier mod)
Undocumented in source. Be warned that the author may not have intended to support it.
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)

opSlice
ConstHashedRange opSlice()
Undocumented in source. Be warned that the author may not have intended to support it.
remove
HashedRange remove(R r)

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

removeFirst
void removeFirst(ThisNode* n)
Undocumented in source. Be warned that the author may not have intended to support it.
removeKey
size_t removeKey(KeyType k)

Removes all elements with key k from this container.

removeKey
size_t removeKey(Keys keys)
Undocumented in source. Be warned that the author may not have intended to support it.
removeKey
size_t removeKey(Key[] keys)
Undocumented in source.
removeKey
size_t removeKey(Stuff stuff)

Removes all elements with key k from this container.

replace
bool replace(Position!ThisNode r, ValueView value)
Undocumented in source. Be warned that the author may not have intended to support it.
reserve
void reserve(size_t n)
Undocumented in source. Be warned that the author may not have intended to support it.
setFirst
void setFirst(ThisNode* n, size_t index)
Undocumented in source. Be warned that the author may not have intended to support it.
toString0
string toString0()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

capacity
size_t capacity [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
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.

loadFactor
loadFactor [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
loadFactor
size_t loadFactor [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

HashedRangeT
struct HashedRangeT(bool is_const)

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

Templates

IsMyRange
template IsMyRange(T)
Undocumented in source.

Variables

_first
ThisNode* _first;
Undocumented in source.
hashes
ThisNode*[] hashes;
Undocumented in source.
load_factor
double load_factor;
Undocumented in source.

Meta