TangleSearchTree#
- class tangles.TangleSearchTree(root: Tangle, sep_ids: ndarray)#
A rooted binary tree that is created while searching tangles. It represents the search result.
Nodes in the tree represent tangles and edges represent orientations of separations. Each level of the tree (except the root level) corresponds to one separation. The root node is the empty tangle.
Each node on level \(k\) that is a left child of a node on level \(k-1\) represents a tangle that orients the separation corresponding to level \(k\) to the left (and vice versa for a right child).
During the tangle search, the tangle search tree is extended adding new edges to the tree.
A TangleSearchTree object contains the actual binary tree of Tangle objects as well as a list of separation ids corresponding to the levels of the tangle search tree.
Parameters#
- rootTangle
The root node of the tangle search tree.
- sep_idsnp.ndarray
The separation ids in a 1-dimensional array.
Properties
The maximum order of a node which we have not yet extended
The number of separations in the search tree
The root of the search tree
The separation ids associated with the levels
Methods
Find the efficient distinguishers of the tangles
Return all tangles of the k-th level which have at least the specified agreement value
Build a search tree from the data in filename
Return all maximal tangles of at least the specified agreement and level at most max_level
Saves the search tree data to a file
Build a copy of the tangle search tree
Return the tangle matrix of all maximal tangles, taken from the set of tangles of at least the specified agreement
Compute the tree height for the given agreement