Class: Node

Counter~Node

Class representing a Node of the recursive bitmap tree

Constructor

new Node(begin, depth)

Creates a Node
Parameters:
Name Type Description
begin number
depth number
Source:

Extends

  • BitMapTree

Methods

allocate(counternullable, 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 Attributes Description
counter number <nullable>
callback function
Source:

check(counter, callback)

Checks if the counter has been set
Parameters:
Name Type Description
counter number
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:

setChild(indexnullable, child)

Sets a child node or leaf If the index is left null, then the child is pushed onto the terminal end
Parameters:
Name Type Attributes Description
index number <nullable>
child Leaf | Node
Source: