BinTreeNode =========== .. currentmodule:: tangles.util.tree .. autoclass:: BinTreeNode .. rubric:: Methods .. toctree:: :hidden: tangles.util.tree.BinTreeNode.children tangles.util.tree.BinTreeNode.copy tangles.util.tree.BinTreeNode.copy_subtree tangles.util.tree.BinTreeNode.copy_subtree_into_children tangles.util.tree.BinTreeNode.detach tangles.util.tree.BinTreeNode.from_indicator_matrix tangles.util.tree.BinTreeNode.is_leaf tangles.util.tree.BinTreeNode.leaves_in_subtree tangles.util.tree.BinTreeNode.level tangles.util.tree.BinTreeNode.level_in_subtree tangles.util.tree.BinTreeNode.path_from_root_indicator tangles.util.tree.BinTreeNode.set_left_child tangles.util.tree.BinTreeNode.set_right_child tangles.util.tree.BinTreeNode.to_indicator_matrix .. list-table:: :widths: 50 50 * - :func:`children` - Return the list of children of this node * - :func:`copy` - Create a new BinTreeNode (note: this is a kind of abstract base function) * - :func:`copy_subtree` - Copy the subtree starting at this node * - :func:`copy_subtree_into_children` - Replace each child by a copy of the subtree starting at this node * - :func:`detach` - Detach the node by removing its pointer to its parent and the parents pointer to it * - :func:`from_indicator_matrix` - Turn an indicator matrix back into a binary tree * - :func:`is_leaf` - Whether this node is a leaf * - :func:`leaves_in_subtree` - Find all leaves in the binary tree * - :func:`level` - Returns the level of this node * - :func:`level_in_subtree` - Return all the nodes at a certain `depth` below this node * - :func:`path_from_root_indicator` - Returns the list of sides one has to take to go from the root to this node * - :func:`set_left_child` - Set the left child of the node * - :func:`set_right_child` - Set the right child of the node * - :func:`to_indicator_matrix` - Turn a list of nodes into an indicator matrix