![]() |
GrammarScope
4.0.0
|


Public Member Functions | |
| SlotAllocatorForIndexRanges () | |
| void | allocate (final Collection< T > elements) |
| int | getSlot (final T element) |
Public Member Functions inherited from grammarscope.allocator.SlotAllocatorForSequences< Integer > | |
| SlotAllocatorForSequences () | |
| int | allocateSlot (final List< T > elements) |
| int | getMaxSlot () |
Protected Attributes | |
| final Map< T, Integer > | slots |
Private Member Functions | |
| void | allocateSlot (final T element) |
Vertical slot allocator for indexed ranges (each having low and index)
| grammarscope.allocator.SlotAllocatorForIndexRanges< T extends HasIndices >.SlotAllocatorForIndexRanges | ( | ) |
Constructor
| void grammarscope.allocator.SlotAllocatorForIndexRanges< T extends HasIndices >.allocate | ( | final Collection< T > | elements | ) |
Allocate slots and cache them
| elements | elements in range |
|
private |
Allocate slot
| element | element |
| int grammarscope.allocator.SlotAllocatorForIndexRanges< T extends HasIndices >.getSlot | ( | final T | element | ) |
Get element's slot from cache
| element | element to get slot of |
|
protected |
Each element has one slot map attached to it. Each slot is represented by one bit in the slot map (0 to 63 slots)
1.8.17