Tangle ====== .. currentmodule:: tangles .. autoclass:: Tangle .. rubric:: Methods .. toctree:: :hidden: tangles.Tangle.children tangles.Tangle.copy tangles.Tangle.copy_subtree tangles.Tangle.copy_subtree_into_children tangles.Tangle.detach tangles.Tangle.equal_data tangles.Tangle.from_indicator_matrix tangles.Tangle.is_leaf tangles.Tangle.leaves_in_subtree tangles.Tangle.level tangles.Tangle.level_in_subtree tangles.Tangle.open tangles.Tangle.path_from_root_indicator tangles.Tangle.set_left_child tangles.Tangle.set_right_child tangles.Tangle.to_indicator_matrix .. list-table:: :widths: 50 50 * - :func:`children` - Return the list of children of this node * - :func:`copy` - Create a new tangle with the same core and agreement value * - :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:`equal_data` - Check whether two tangles have the same data (core and agreement value) * - :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:`open` - Open the tangle by removing its children * - :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