UncrossingSweep#

class tangles.UncrossingSweep(sep_sys: SetSeparationSystemBase, order_func: Callable[[ndarray], ndarray], forbidden_tuple_size: int = 3, copy_sep_sys: bool = True)#

A TangleSweep wrapped with uncrossing functionality.

Whenever tangles are searched, the UncrossingSweep ensures that the efficient distinguishers in the TangleSearchTree are uncrossed. This is a necessary condition to create a tangle search tree.

Additionally, objects of this class hold an ordered separation system, so also some convenient separation system functionality is provided.

Parameters#

sep_sysSetSeparationSystemBase

The separation system.

order_funcSetSeparationOrderFunction

Used to compute the order of each separation. The separations are appended in ascending order. A SetSeparationOrderFunction is a Callable[[np.ndarray], np.ndarray].

forbidden_tuple_sizeint

The maximum size of forbidden tuples. The standard tangles use a maximum size of 3 (i.e. forbidden triples).

copy_sep_sysbool

Whether the separation system sep_sys should be copied. If True, this ensures that the given separation system is left unchanged by the UncrossingSweep.

Properties

all_oriented_feature_ids

A list of ids of separations/features that were appended to the tree (including corners)

original_feature_ids

A list of ids of separations/features that were appended to the tree (without corners)

search_object

the low level search object used by this search object

sep_sys

the separation system (feature system) used by this widget

tree

The tangle search tree on which this TangleSweep operates

Methods

create_tot()

Create a tree of tangles

lower_agreement()

Extend nodes in the tangle search tree until the agreement search limit has decreased below the

oriented_feature_ids_for_agreement()

A list of ids of separations/features that could be oriented at the given agreement level

sweep_below()

Extends nodes in the tree until the agreement search limit has decreased below the specified agreement value

sweep_one()

Extends nodes in the tree until the agreement search limit has decreased

tangle_matrix()

Returns a matrix containing all the found tangles in rows

tangle_score()

compute the tangles scores for given agreement