TangleSweep#
- class tangles.TangleSweep(agreement_func: Callable[[ndarray, ndarray], int], le_func: Callable[[int, int, int, int], bool], sep_ids: array | None = None, forbidden_tuple_size: int = 3)#
Search object which builds and extends the tangle search tree.
Parameters#
- agreement_funcAgreementFunc
A function which takes a list of separations and returns a non-negative, numerical agreement value.
- le_funcLessOrEqFunc
A partial order on the oriented separations.
- sep_idsnp.array, optional
The separation ids. Can be used to start the algorithm with some empty levels.
- forbidden_tuple_sizeint
The maximum size of forbidden tuples. The standard tangles use a maximum size of 3 (i.e. forbidden triples).
Properties
The TangleSearchTree on which this TangleSweep operates
Methods
Append a new separation to the tree
Greedily search for tangles
Insert a new separation into a specified level in the tree
Extend nodes in the tree until the agreement search limit has decreased below the specified agreement value
Extend nodes in the tree until the agreement search limit has decreased