oineus.compute_diagrams_alpha

oineus.compute_diagrams_alpha(points, weights=None, params=None, include_inf_points=True, dualize=False, exact=False, periodic=False, compute_bounding_box=True, bbox_min=None, bbox_max=None)[source]

Compute alpha-shape persistence diagrams.

Parameters:
  • points (ndarray) – NumPy array of shape (n, 2) or (n, 3).

  • weights (ndarray | None) – Optional 1D array of length n. If provided, computes weighted alpha-shapes (currently 3D only).

  • params (ReductionParams | None) – Reduction parameters. Defaults to ReductionParams().

  • include_inf_points (bool) – Include points at infinity in output diagrams.

  • dualize (bool) – If True, compute cohomology; otherwise homology.

  • exact (bool) – Passed to diode. If True, uses exact CGAL kernel.

  • periodic (bool) – If True, uses periodic alpha-shapes. Duplicate simplices reported by diode are deduplicated before building the filtration.

  • compute_bounding_box (bool) – If True, use the bounding box of the data for periodic otherwise diode defaults (unit box) will be used.

  • bbox_min (ndarray | List[float] | None) – lexicographically smallest point of the bounding box. NumPy array or list of floats. Ignored, if compute_bounding_box is True. Origin will be used, if compute_bounding_box is False and bbox_min is None.

  • bbox_max (ndarray | List[float] | None) – lexicographically largest point of the bounding box. NumPy array or list of floats. Ignored, if compute_bounding_box is True

Returns:

Diagrams object indexed by homology dimension.