open class DowkerGeometry(val relation: Array[Array[Double]])
The filtered Dowker complex of a relation R: L x W -> [0, Infinity] between two finite sets (C. H. Dowker, "Homology groups of relations", Ann. of Math. 56 (1952); filtered as in Chowdhury and Mémoli, "A functorial Dowker theorem and persistent homology of asymmetric networks", 2018). A set sigma of rows is a simplex at t when one witness w sees all of it by then:
f(sigma) = min_w max_{x in sigma} R(x, w)
R need not come from a metric. The unfiltered Dowker complex is the case R(x, w) in {0, Infinity} (DowkerGeometry.fromBoolean). With R the landmark-to-witness distances (WitnessGeometry.D) it is the Čech complex of the landmarks with the balls' common point required to be a witness. That is contained in every witness complex but is none of them: the lazy witness complex with nu = 0 is its flag complex (the same edges).
The filtration is monotone (f(tau) <= f(sigma) for tau a face of sigma, since the max over a subset is smaller for every w), vertices have values min_w R(x, w) that are generally nonzero, and the complex is not a flag complex, so the Ripser engines do not apply (MATLAB and the CLI also do not offer chunks for relations).
'''Duality''': the complexes of R (on the rows) and of its transpose (dual, on the columns) are homotopy equivalent at every t, and their persistence modules are isomorphic, so their barcodes agree. This holds for the barcodes without zero-length bars, the default: with includeZeroLength = true the two sides differ, since each vertex contributes an H₀ birth and the sides have different numbers of vertices.
chain, a chain of the complex on the rows, carried to the complex on the columns (dual) by the chain map behind Dowker duality: a vertex goes to its bestWitness, and a simplex sigma to the cone from bestWitness(sigma) over the image of its boundary. Every simplex of the image is witnessed, on the column side, by a row of chain within the value of the simplex of chain it came from, so a cycle of the row complex at t goes to a cycle of the column complex at t. The map is an isomorphism of persistent homology: a representative of a bar goes to a representative of the same bar on the other side, and a cycle that dies at d to one that dies at d. A k-simplex has at most (k+1)! simplices in its image.
chain, a chain of the complex on the rows, carried to the complex on the columns (dual) by the chain map behind Dowker duality: a vertex goes to its bestWitness, and a simplex sigma to the cone from bestWitness(sigma) over the image of its boundary. Every simplex of the image is witnessed, on the column side, by a row of chain within the value of the simplex of chain it came from, so a cycle of the row complex at t goes to a cycle of the column complex at t. The map is an isomorphism of persistent homology: a representative of a bar goes to a representative of the same bar on the other side, and a cycle that dies at d to one that dies at d. A k-simplex has at most (k+1)! simplices in its image.
For landmark-to-point distances (WitnessGeometry.D) the columns are the points, so this puts a landmark cycle on the data: a loop through landmarks l0, l1, ... becomes the loop l0, w01, l1, w12, ..., where w01 is the point that witnesses the edge l0 l1. Dowker.lift does it for every bar of a diagram.
cocycle, a cocycle of the complex on the rows, carried to the complex on the columns: its value on a simplex tau of the columns is its value on the image of tau under the chain map back to the rows (dual.lift). It is evaluated on every simplex of the columns, of the dimension of cocycle, whose value is below before, and is zero elsewhere. Of a cocycle of the row complex at every t < before this makes a cocycle of the column complex at every t < before, and the map is an isomorphism of persistent cohomology: the cocycle of a bar [b, d), lifted with before = d, is a cocycle of the same bar on the other side, a nonzero class from b on and a coboundary before. Its integer values are sums of at most (k+1)! values of cocycle, for a k-cocycle.
cocycle, a cocycle of the complex on the rows, carried to the complex on the columns: its value on a simplex tau of the columns is its value on the image of tau under the chain map back to the rows (dual.lift). It is evaluated on every simplex of the columns, of the dimension of cocycle, whose value is below before, and is zero elsewhere. Of a cocycle of the row complex at every t < before this makes a cocycle of the column complex at every t < before, and the map is an isomorphism of persistent cohomology: the cocycle of a bar [b, d), lifted with before = d, is a cocycle of the same bar on the other side, a nonzero class from b on and a coboundary before. Its integer values are sums of at most (k+1)! values of cocycle, for a k-cocycle.
The column complex is much larger than the row complex when there are many more columns than rows, as for landmark-to-point distances, where the result is a cochain on the points: Dowker.lift does it for every bar of a diagram of cocycles, and CircularCoordinates reads the result.