homology.dim0

This Cython module contains the core algorithms for 0-dimension topological algorithms. In particular, MergeTree for 0-dimensional persistence.

If a function requires its own explicit iterator in a loop, probably it should go here. Anything that is just a vectorized operation in NumPy or Pandas can go in plain python elsewhere.

See http://docs.cython.org/src/tutorial/np.html for ideas on writing efficient code in Cython.

This module is compiled by either of these commands
  • python setup.py install (as called by pip for standard installation and use)
  • python setup.py build_ext --inplace (as run by developers for code testing)

Notes

Automatically-generated online documentation will never see the C-only functions that are defined with cdef in Cython, as shown in http://cython.readthedocs.io/en/latest/src/reference/extension_types.html Because of the limitations of Sphinx, you’ll have to simply view the sourcecode for further information. For this module, these C-only functions include

  • homology.dim0.root()
  • homology.dim0.connected()
  • homology.dim0.merge()