EdgeRankedMetricSpace

org.appliedtopology.tda4j.ParallelPackedCohomology.EdgeRankedMetricSpace
open class EdgeRankedMetricSpace(base: FiniteMetricSpace[Int], threshold: Double, ties: EdgeTies) extends FiniteMetricSpace[Int]

base with the length of every edge within threshold replaced by its rank, 1, 2, ... in the order of an EdgeRanking (0 on the diagonal, infinity past the threshold). An engine that orders simplices by diameter and then by index, run on this, orders them by their last edge in that ranking: ripser.cpp's edge-lexicographic order for EdgeTies.ReverseColexicographic (EDGE_LEXICOGRAPHIC), and the order of the other EdgeTies as they are named. Give the engine limit as its maxFiltrationValue, and read what comes back in lengths with lengthOf. Memory: the ranking, a dense table of n^2 Ints up to DenseRankLimit points, sorted neighbour lists above.

Attributes

Source
ParallelPackedCohomology.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
ParallelPackedCohomology.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
ParallelPackedCohomology.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
ParallelPackedCohomology.scala
def lengthOf(value: Double): Double

The length of the edge whose rank value is (0 and infinity stay as they are).

The length of the edge whose rank value is (0 and infinity stay as they are).

Attributes

Source
ParallelPackedCohomology.scala
def limit: Double

The largest rank: every edge within the threshold is at most this.

The largest rank: every edge within the threshold is at most this.

Attributes

Source
ParallelPackedCohomology.scala
def size: Int

Number of points represented by this metric space.

Number of points represented by this metric space.

Attributes

Source
ParallelPackedCohomology.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

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