oineus.diff.alpha_filtration

oineus.diff.alpha_filtration(points, eps=1e-12, exact=False, print_time=False)[source]

Build a differentiable alpha filtration from a point cloud.

Combinatorics and per-simplex attacher (a Gabriel coface tau whose squared circumradius equals alpha(sigma)) are obtained from diode (CGAL, via fill_alpha_shapes(..., with_attachment=True)). Critical values are recomputed in PyTorch as squared circumradii of tau, so gradients flow back to points.

Vertices are immovable: dim-0 values are zeros without grad.

Parameters:
  • points(n, d) torch.Tensor with d in {2, 3}. Differentiable.

  • eps (float) – small value for numerical stability in the closed-form formulas.

  • exact (bool) – forwarded to diode (selects the exact CGAL kernel).

  • print_time (bool) – if True, print per-stage timings.

Returns:

DiffFiltration whose values tensor matches CGAL’s alpha values and is wired into the autograd graph.

Raises:
  • RuntimeError if the installed diode does not support

  • with_attachment=True`

Return type:

DiffFiltration