DtmMetricSpace

org.appliedtopology.tda4j.DtmRipsSimplexStream.DtmMetricSpace
class DtmMetricSpace(val ambient: FiniteMetricSpace[Int], val f: IndexedSeq[Double], val p: Double = ...) extends FiniteMetricSpace[Int]

Reifies the DTM-Rips 1-skeleton as a FiniteMetricSpace[Int] (doubled 2*t) so it slots into RipserCofaceSimplexStream unchanged for every dimension >= 1, the same trick WitnessMetricSpace uses for the lazy witness complex. '''Not a real metric''' (no triangle-inequality guarantee) -- never hand this to VantagePointQuery/SparseMetricSpace/alpha, only to combinatorial coface generation.

Attributes

Source
DtmRipsStream.scala
Graph
Supertypes
trait FiniteMetricSpace[Int]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def contains(x: Int): Boolean

Attributes

Source
DtmRipsStream.scala
def distance(x: Int, y: Int): Double

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
DtmRipsStream.scala
def elements: Iterable[Int]

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
DtmRipsStream.scala
def size: Int

Number of points represented by this metric space.

Number of points represented by this metric space.

Attributes

Source
DtmRipsStream.scala

Inherited methods

def longestDistanceWithin(threshold: Double): Double

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
def neighbourListsWithin(threshold: Double, maxEntries: Long): Option[NeighbourLists]

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
DtmRipsStream.scala
val f: IndexedSeq[Double]

Attributes

Source
DtmRipsStream.scala
val p: Double

Attributes

Source
DtmRipsStream.scala

Inherited fields

lazy val minimumEnclosingRadius: Double

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