Constructor
new Node(begin, depth)
Creates a Node
Parameters:
Name | Type | Description |
---|---|---|
begin |
number | |
depth |
number |
- Source:
Extends
- BitMapTree
Methods
allocate(callback)
Allocates a counter by allocating the corresponding child
Passes a continuation to the child allocate that will
set the current bitmap if the child bitmap is now all set
It will also lazily create the child if it doesn't already exist
Parameters:
Name | Type | Description |
---|---|---|
callback |
function |
- Source:
deallocate(counter, callback)
Deallocates a counter by deallocating the corresponding child
Passes a continuation to the child deallocate that will
unset the current bitmap if the child bitmap was previously all set
It will also attempt to shrink the tree if the child is the terminal child
and it is all unset
Parameters:
Name | Type | Description |
---|---|---|
counter |
number | |
callback |
function |
- Source:
popChild()
Pops the terminal child node or leaf
- Source:
pushChild(child)
Pushes a child node or leaf to the terminal end
Parameters:
Name | Type | Description |
---|---|---|
child |
Leaf | Node |
- Source: