FTreeNode#
- class tangles.FTreeNode(new_sep_id: int, parent=None, left_child=None, right_child=None)#
An Forbidden-Tuples-Tree (FTT). A binary tree containing forbidden tuples in every leaf.
Methods
Return the list of children of this node
Create a new BinTreeNode (note: this is a kind of abstract base function)
Copy the subtree starting at this node
Replace each child by a copy of the subtree starting at this node
Detach the node by removing its pointer to its parent and the parents pointer to it
Turn an indicator matrix back into a binary tree
Whether this node is a leaf
Find all leaves in the binary tree
Returns the level of this node
Return all the nodes at a certain depth below this node
Returns the list of sides one has to take to go from the root to this node
Set the left child of the node
Set the right child of the node
Turn a list of nodes into an indicator matrix