oineus.TopologyOptimizer

class oineus.TopologyOptimizer(*args, **kwargs)

Bases: object

property cohomology_decomposition

(self) -> oineus._oineus.Decomposition

cohomology_decomposition_ref
combine_loss

combine critical sets into well-defined assignment of new values to indices

compute_diagram

compute diagrams in all dimensions

crit_sets_apply

Fused per-pair critical-set walk + conflict resolution in one C++ call. Internally calls ensure_hom_reduced (for the per-pair is_negative dispatch) and ensure_has_u_* on the relevant side when U is needed. Returns IndicesValues; use .indices_array() / .values_array() for zero-copy numpy.

decrease_birth

return critical set for decreasing birth to -inf

decrease_death

return critical set for decreasing death to -inf

ensure_coh_built

Cohomology counterpart of ensure_hom_built.

ensure_coh_reduced

Reduce the cohomology side with the recipe baked in at construction time. Builds the decomposition first if needed. Idempotent.

ensure_has_u_coh

Cohomology-side counterpart of ensure_has_u_hom. The row indices are passed as filtration indices; conversion to matrix layout (fil_size - 1 - i) is done internally.

ensure_has_u_hom

Ensure U-row data is available on the hom side over the given filtration row indices (each in geometric dim) with the matching value bounds. No-op for LegacyInBand (U is already built in-band during reduction).

ensure_hom_built

Materialize the homology Decomposition from the cached boundary matrix (no reduction). Idempotent. Use this when you need access to the decomposition object but not yet to a reduced state. Most callers want ensure_hom_reduced.

ensure_hom_reduced

no-op if already reduced.

Type:

Reduce the homology side with the recipe baked in at construction time. Builds the decomposition first if needed. Idempotent

get_nth_persistence

return n-th persistence value in d-dimensional persistence diagram

property homology_decomposition

(self) -> oineus._oineus.Decomposition

homology_decomposition_ref
increase_birth

return critical set for increasing birth to inf

increase_death

return critical set for increasing death to inf

property is_coh_built

True iff the cohomology Decomposition has been materialized. Counterpart of is_hom_built.

property is_hom_built

True iff the homology Decomposition has been materialized from the cached boundary matrix. Set by the first ensure_hom_built / ensure_hom_reduced call.

match

return target from Wasserstein matching

reduce_all
simplify

make points with persistence less than epsilon go to the diagonal

singleton
singletons
update