Programming Interface
The main class of the package is the BaseComplex class. It is a
wrapper around the GUDHI library. It is recommended to read the
GUDHI documentation to understand the parameters of the BaseComplex class.
BaseComplex
- class galaxywitness.base_complex.BaseComplex(points=None)[source]
Base class for any type of complexes
- abstract animate_simplex_tree(path_to_save)[source]
Draw animation of filtrated simplicial complex (powered by matplotlib)
- Parameters:
path_to_save (str) – place, where we are saving files
- abstract animate_simplex_tree_plotly(path_to_save)[source]
Draw animation of filtrated simplicial complex (powered by plotly)
- Parameters:
path_to_save (str) – place, where we are saving files
- draw_simplicial_complex(num, filtration_val, backend, path_to_save=None)[source]
Draw simplicial complex with filtration value filtration_val
- Parameters:
num (int) – number of step
filtration_val (float) – filtration value
backend (str) – backend for drawing
path_to_save (str) – place, where we are saving files
- external_simplex_tree(simplex_tree)[source]
Load external filtered simplicial complex (as simplex tree) to DescendantComplex instance
- Parameters:
simplex_tree (gudhi.SimplexTree) – external simplex tree
- get_adjacency_list(max_fil_val)[source]
Get adjacency list for vertices in 1-skeleton of filtrated simplicial complex
- get_barcode(show=False, path_to_save=None)[source]
Draw barcode
- Parameters:
show (bool) – show barcode? (Optional)
path_to_save (str) – place, where we are saving files
- get_diagram(show=False, path_to_save=None)[source]
Draw persistent diagram
- Parameters:
show (bool) – show diagram? (Optional)
path_to_save (str) – place, where we are saving files
RipsComplex
- class galaxywitness.rips_complex.RipsComplex(points, max_edge_length, sparse=None)[source]
Main class for handling data about the point cloud and the simplex tree of filtered Rips complex
- Parameters:
points (np.array size of n_landmarks x 3) – set of landmarks in \(\mathbb{R}^d\).
- animate_simplex_tree(path_to_save)[source]
Draw animation of filtration (powered by matplotlib)
- Parameters:
path_to_save (str) – place, where we are saving files
AlphaComplex
- class galaxywitness.alpha_complex.AlphaComplex(points)[source]
Main class for handling data about the point cloud and the simplex tree of filtered alpha complex
- Parameters:
points (np.array size of n_landmarks x 3) – set of landmarks in \(\mathbb{R}^d\).
- animate_simplex_tree(path_to_save)[source]
Draw animation of filtration (powered by matplotlib)
- Parameters:
path_to_save (str) – place, where we are saving files
WitnessComplex
- class galaxywitness.witness_complex.WitnessComplex(landmarks, witnesses, landmarks_idxs, n_jobs=-1, isomap_eps=0)[source]
Main class for handling data about the point cloud and the simlex tree of filtered witness complex
- Parameters:
landmarks (np.array size of n_landmarks x 3) – set of landmarks in \(\mathbb{R}^d\).
witnesses (np.array size of n_witnesses x 3) – set of witnesses in \(\mathbb{R}^d\).
landmarks_idxs (np.array[int]) – indices of landmarks in witnesses array
- animate_simplex_tree(path_to_save)[source]
Draw animation of filtration (powered by matplotlib)
- Parameters:
path_to_save (str) – place, where we are saving files