![]() |
GrammarScope
4.0.0
|

Public Member Functions | |
| SlotAllocatorForSequences () | |
| int | allocateSlot (final List< T > elements) |
| int | getMaxSlot () |
Private Member Functions | |
| long | mergeAllSlots () |
| long | mergeSlots (final List< T > elements) |
Private Attributes | |
| final Map< T, Long > | slotMaps |
Vertical slot allocator for sequences of elements. Allocates height for consecutive elements so that sequences don't overlap.
Constructor
| int grammarscope.allocator.SlotAllocatorForSequences< T >.allocateSlot | ( | final List< T > | elements | ) |
Allocate slot
| elements | elements in range |
| int grammarscope.allocator.SlotAllocatorForSequences< T >.getMaxSlot | ( | ) |
Get maximum number of slots allocated
|
private |
Get merged slot bitmap (combine allocations for all elements into synthetic bitmap)
|
private |
Get merged slot bitmap (combine allocations for some elements into synthetic bitmap)
| elements | elements in range |
|
private |
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