search_tangles#
- tangles.convenience.search_tangles(separations: SetSeparationSystemBase | ndarray, min_agreement: int, max_number_of_seps: int | None = None, order: list | ndarray | Callable[[ndarray], ndarray] | None = None, progress_callback=None, sep_metadata: list | ndarray = None) TangleSweepFeatureSys #
Search tangles and return a
TangleSweepFeatureSys
(a container for the result).Important: This function does not uncross any of the distinguishing separations and you cannot, in general, use the result of this function to uncross the resulting tree afterwards. Please use the function
search_tangles_uncrossed()
instead.Parameters#
- separationsSetSeparationSystem, FeatureSystem or np.ndarray
A bunch of separations.
If its type is an np.ndarray and the array contains exactly three unique values, a SetSeparationSystem is created. In this case, the two (possibly overlapping) sides of the separations are defined by the non-positive values and the non-negative values, respectively.
If its type is an np.ndarray and the array contains less or more than three values, a FeatureSystem is created with non-positive values defining one side and positive values the other side of a separation (in each column).
- min_agreementint
The minimum intersection size of three separations.
- max_number_of_sepsint or None
Maximal number of separations that should be added.
- orderlist, np.ndarray or
SetSeparationOrderFunction
, optional An object indicating the order of the separations. This order determines in which order the separations are added to the tangle search tree.
If order is a list or np.ndarray, the value
order[k]
is the index/id of the separation appended in the k-th step.If order is a
SetSeparationOrderFunction
, it is used to compute a value for each separation and the separations are appended in ascending order. ASetSeparationOrderFunction
is aCallable[[np.ndarray], np.ndarray]
.- progress_callback
DefaultProgressCallback
or callable A callable providing a progress indication (see
DefaultProgressCallback
for reference).- sep_metadata: list or np.ndarray
The metadata for separations. Only used if separations is of type np.ndarray.
Returns#
TangleSweepFeatureSys
A tangle search object containing the result of the search and the feature system (or separation system).