ExplicitMetricSpace

org.appliedtopology.tda4j.ExplicitMetricSpace
class ExplicitMetricSpace(val dist: Seq[Seq[Double]]) extends FiniteMetricSpace[Int]

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).size for all x1,x2
  • dist(x).size == dist.size for all x
  • dist(x)(x) == 0 for all x
  • The triangle inequality

Attributes

Experimental
true
Graph
Supertypes
trait FiniteMetricSpace[Int]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def contains(x: Int): Boolean

Attributes

Definition Classes
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

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

def size: Int

Number of points represented by this metric space.

Number of points represented by this metric space.

Attributes

Concrete fields

val dist: Seq[Seq[Double]]

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.

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.

Attributes

Inherited from:
FiniteMetricSpace