ExplicitMetricSpace
Takes in an explicit distance matrix, and performs lookups in this distance matrix.
Value parameters
- dist
-
Distance matrix represented as a
Seq[Seq[Double]]. The class expects but does not enforce:dist(x1).size == dist(x2).sizefor allx1,x2dist(x).size == dist.sizefor allxdist(x)(x) == 0for allxdist(x)(y) == dist(y)(x)for allx,y- The triangle inequality Only the lower triangle is read:
distance(x, y)isdist(max(x, y))(min(x, y)), as in Ripser and GUDHI, so a matrix that is not exactly symmetric gives the same results here as there.
Attributes
- Experimental
- true
- Source
- FiniteMetricSpace.scala
- Graph
-
- Supertypes
Members list
Value members
Concrete methods
Attributes
- Definition Classes
- Source
- FiniteMetricSpace.scala
Distance in the metric space. Takes two indices and returns a non-negative real number.
Distance in the metric space. Takes two indices and returns a non-negative real number.
Value parameters
- x
-
Index of first point
- y
-
Index of second point
Attributes
- Returns
-
Distance between x and y
- Source
- FiniteMetricSpace.scala
Access to all points in the metric space. Implemented by eg scala.collections.Range for simple Int-indexed spaces, but this definition gives more space for different underlying possible representations.
Access to all points in the metric space. Implemented by eg scala.collections.Range for simple Int-indexed spaces, but this definition gives more space for different underlying possible representations.
Attributes
- Returns
-
Iterable that returns all points in the metric space
- Source
- FiniteMetricSpace.scala
Number of points represented by this metric space.
Inherited methods
The longest distance between two points of the space that is at most threshold, 0.0 when no two points are that close: the longest edge of the Vietoris-Rips complex truncated at threshold, which is the last filtration value of its graph.
The longest distance between two points of the space that is at most threshold, 0.0 when no two points are that close: the longest edge of the Vietoris-Rips complex truncated at threshold, which is the last filtration value of its graph.
One pass over the pairs, n^2 / 2 distances. A space that finds it faster overrides this and answers the same number (EuclideanMetricSpace does, by neighbour queries on a cloud too big to cache its distances); a threshold of NaN or below 0 finds no pair.
Attributes
- Inherited from:
- FiniteMetricSpace
- Source
- FiniteMetricSpace.scala
Each point's neighbours within threshold, ascending, with their distances (NeighbourLists), when this space finds them faster than the pass over all pairs (NeighbourLists.within, which is what a caller runs on None): the lists the pass would build, entry for entry and to the last bit of each distance. None when the space has no faster way, or when there would be more than maxEntries directed pairs (the lists would not be sparse). EuclideanMetricSpace answers by one neighbour query per point on a cloud too big to cache its distances.
Each point's neighbours within threshold, ascending, with their distances (NeighbourLists), when this space finds them faster than the pass over all pairs (NeighbourLists.within, which is what a caller runs on None): the lists the pass would build, entry for entry and to the last bit of each distance. None when the space has no faster way, or when there would be more than maxEntries directed pairs (the lists would not be sparse). EuclideanMetricSpace answers by one neighbour query per point on a cloud too big to cache its distances.
Attributes
- Inherited from:
- FiniteMetricSpace
- Source
- FiniteMetricSpace.scala
Concrete fields
Attributes
- Source
- FiniteMetricSpace.scala
Inherited fields
Beyond this radius, the Vietoris-Rips complex is a cone and will have no further homological structure. See e.g. the Ripser paper, page 412. The same holds for the Cech and alpha complexes, whose union of balls is then contractible, so no barcode changes past it: it is the radius that Persistence runs to when it is not told another. A space with infinite distances (a sparse distance matrix: a pair that is not listed has no edge) has no such cone; its radius is then the largest finite distance, past which nothing enters.
Beyond this radius, the Vietoris-Rips complex is a cone and will have no further homological structure. See e.g. the Ripser paper, page 412. The same holds for the Cech and alpha complexes, whose union of balls is then contractible, so no barcode changes past it: it is the radius that Persistence runs to when it is not told another. A space with infinite distances (a sparse distance matrix: a pair that is not listed has no edge) has no such cone; its radius is then the largest finite distance, past which nothing enters.
Found by looking for the point whose farthest point is nearest, with no allocation, and giving up on a point as soon as a point at least as far as the best so far turns up: on spread-out points that takes a handful of distances per point, not all of them.
Attributes
- Inherited from:
- FiniteMetricSpace
- Source
- FiniteMetricSpace.scala