TDA4j computes persistent homology and related invariants: barcodes with representatives (cocycles or cycles), from point clouds, distance matrices, images, relations and spaces you build yourself, over any prime field or the reals. This guide assumes you know what a filtered complex and a persistence barcode are; it does not assume you know Scala. For how the library is built, see the Developer's Guide; for worked examples on real-looking data, the tutorials.
Every Scala file that uses TDA4j starts with two lines:
import scala.language.experimental.modularity
import org.appliedtopology.tda4j.*
The first accepts the experimental Scala features the library is built with (its typeclasses use them, so Scala asks every file that uses it to opt in); the second brings in the whole library. Simplicial sets and group classifying spaces are an add-on with one more import, import org.appliedtopology.tda4j.sset.*.
Contents
- Installation: requirements and dependency lines for every build tool and language.
- Quickstart:
Persistence(...)and the diagram it returns, short bars, representatives, long computations, chains. - Complexes (overview): Vietoris-Rips (with DTM weighting and edge collapse), Čech, alpha, sparse Rips, witness, Dowker, cubical, simplicial sets, and time series, graphs, functions and directed networks.
- Engines (overview): which one to use, the fast cubical and fast alpha engines.
- Using the results: distances and vectorizations, telling features from noise, and clustering, circular and toroidal coordinates, the boundary matrix.
- Files: CSV, Ripser, DIPHA, GUDHI and Perseus formats.
- Maps between barcodes: image, kernel and cokernel of a map of persistence modules, and the map a map of spaces induces.
- Pairs of spaces: relative persistent homology.
- Harmonic chains: the cycle orthogonal to every boundary as a bar's representative, and the barcode of harmonic chains.
- Linear algebra, graphs and neighbours: dense matrices, row reduction, spanning trees, nearest-neighbour search.
- Without Scala: MATLAB and Java, Python, JavaScript and TypeScript, the command line.
- Troubleshooting and a glossary.
- Coming from JavaPlex, Ripser or GUDHI: the calls you know, and what differs.