Initial data which has pairs of key and value.
Pointer map.
It contains an index of the source array to access the target directly.
Data source array.
Get head of map.
Size of map.
Get tail of map.
Clear map.
Swap item with tail and remove it from map.
key.
Calls callback when item swapped with tail. Arguments are reference of each item, and 'key' is the key of map that indicates array index(pointer), therefore should be careful to not modify 'key' or it could make mangling pointer.
Get item from map.
key.
Get index(pointer) of item.
key.
Check if item exists.
key.
Pop out last item like array.
Reverse order of source array.
Add item in map and return its index.
key.
value.
shallow clone itself. Useful when use with immutable state management (ex. React state).
Swap item without preserve its order.
Equivalent to swapPointer
+ swapOrder
, but more simple & efficient.
key 1.
key 2.
Swap source order.
key 1.
key 2.
Swap item with preserve its order.
key 1.
key 2.
Generated using TypeDoc
Create a new VectorMap.