chalc.chromatic

Module containing geometry routines to compute chromatic Delaunay filtrations.

Functions

alpha(…)

Computes the chromatic alpha filtration of a coloured point cloud.

delaunay(…)

Returns the chromatic Delaunay triangulation of a coloured point cloud in Euclidean space.

delcech(…)

Returns the chromatic Delaunay--Čech filtration of a coloured point cloud.

delrips(…)

Computes the chromatic Delaunay--Rips filtration of a coloured point cloud.

Module Contents

alpha(
x: numpy.ndarray[tuple[M, N], numpy.dtype[numpy.float64]],
colours: numpy.ndarray[tuple[M, Literal[1]], numpy.dtype[numpy.int32]],
) tuple[chalc.filtration.FilteredComplex, bool]
alpha(x: numpy.ndarray[tuple[M, N], numpy.dtype[numpy.float64]], colours: list[int]) tuple[chalc.filtration.FilteredComplex, bool]

Computes the chromatic alpha filtration of a coloured point cloud.

Parameters:
  • x – Numpy matrix whose columns are points in the point cloud.

  • colours – List or numpy array of integers describing the colours of the points.

Returns:

The chromatic alpha filtration and a boolean flag to indicate if numerical issues were encountered. In case of numerical issues, a warning is also raised.

Raises:

ValueError – If any value in colours is >= MaxColoursChromatic or < 0, or if the length of colours does not match the number of points.

Notes

This function is included for pedantic reasons. For most purposes you should instead consider using chalc.chromatic.delcech(), which is faster to compute, more numerically stable, and has the same persistent homology.

See also

delrips(), delcech()

delaunay(
x: numpy.ndarray[tuple[M, N], numpy.dtype[numpy.float64]],
colours: numpy.ndarray[tuple[M, Literal[1]], numpy.dtype[numpy.int32]],
) chalc.filtration.FilteredComplex
delaunay(x: numpy.ndarray[tuple[M, N], numpy.dtype[numpy.float64]], colours: list[int]) chalc.filtration.FilteredComplex

Returns the chromatic Delaunay triangulation of a coloured point cloud in Euclidean space.

Parameters:
  • x – Numpy matrix whose columns are points in the point cloud.

  • colours – List or numpy array of integers describing the colours of the points.

Raises:

ValueError – If any value in colours is >= MaxColoursChromatic or < 0, or if the length of colours does not match the number of points.

Returns:

The Delaunay triangulation.

delcech(
x: numpy.ndarray[tuple[M, N], numpy.dtype[numpy.float64]],
colours: numpy.ndarray[tuple[M, Literal[1]], numpy.dtype[numpy.int32]],
) tuple[chalc.filtration.FilteredComplex, bool]
delcech(x: numpy.ndarray[tuple[M, N], numpy.dtype[numpy.float64]], colours: list[int]) tuple[chalc.filtration.FilteredComplex, bool]

Returns the chromatic Delaunay–Čech filtration of a coloured point cloud.

Parameters:
  • x – Numpy matrix whose columns are points in the point cloud.

  • colours – List or numpy array of integers describing the colours of the points.

Returns:

The chromatic Delaunay–Čech filtration and a boolean flag to indicate if numerical issues were encountered. In case of numerical issues, a warning is also raised.

Raises:

ValueError – If any value in colours is >= MaxColoursChromatic or < 0, or if the length of colours does not match the number of points.

Notes

The chromatic Delaunay–Čech filtration of the point cloud has the same set of simplices as the chromatic alpha filtration, but with Čech filtration times.

See also

alpha(), delrips()

delrips(
x: numpy.ndarray[tuple[M, N], numpy.dtype[numpy.float64]],
colours: numpy.ndarray[tuple[M, Literal[1]], numpy.dtype[numpy.int32]],
) tuple[chalc.filtration.FilteredComplex, bool]
delrips(x: numpy.ndarray[tuple[M, N], numpy.dtype[numpy.float64]], colours: list[int]) tuple[chalc.filtration.FilteredComplex, bool]

Computes the chromatic Delaunay–Rips filtration of a coloured point cloud.

Parameters:
  • x – Numpy matrix whose columns are points in the point cloud.

  • colours – List or numpy array of integers describing the colours of the points.

Returns:

The chromatic Delaunay–Rips filtration and a boolean flag to indicate if numerical issues were encountered. In case of numerical issues, a warning is also raised.

Raises:

ValueError – If any value in colours is >= MaxColoursChromatic or < 0, or if the length of colours does not match the number of points.

Notes

The chromatic Delaunay–Rips filtration of the point cloud has the same set of simplices as the chromatic alpha filtration, but with Vietoris–Rips filtration times. The convention used is that the filtration time of a simplex is half the maximum edge length in that simplex. With this convention, the chromatic Delaunay–Rips filtration and chromatic alpha filtration have the same persistence diagrams in degree zero.

See also

alpha(), delcech()