edu.stanford.math.plex4.streams.utility
public class SkeletalMetric extends java.lang.Object implements AbstractObjectMetricSpace<Simplex>
Constructor and Description |
---|
SkeletalMetric(AbstractFilteredStream<Simplex> stream) |
Modifier and Type | Method and Description |
---|---|
double |
distance(int i,
int j)
This function returns the distance between the object at index i and the
object at index j.
|
double |
distance(Simplex simplex_i,
Simplex simplex_j)
This function returns the distance between two points.
|
double |
getDiameter(edu.stanford.math.primitivelib.autogen.formal_sum.DoubleSparseFormalSum<Simplex> chain) |
Simplex |
getPoint(int index)
This function returns the point at the specified index.
|
Simplex[] |
getPoints()
This function returns the set of points in the metric space as an array.
|
int |
size()
This function returns the number of points in the metric space.
|
public SkeletalMetric(AbstractFilteredStream<Simplex> stream)
public double getDiameter(edu.stanford.math.primitivelib.autogen.formal_sum.DoubleSparseFormalSum<Simplex> chain)
public Simplex getPoint(int index)
AbstractObjectMetricSpace
getPoint
in interface AbstractObjectMetricSpace<Simplex>
index
- the index of the point to retrievepublic int size()
AbstractIntMetricSpace
size
in interface AbstractIntMetricSpace
public double distance(int i, int j)
AbstractIntMetricSpace
distance
in interface AbstractIntMetricSpace
i
- the index of the first objectj
- the index of the second objectpublic double distance(Simplex simplex_i, Simplex simplex_j)
AbstractObjectMetric
distance
in interface AbstractObjectMetric<Simplex>
simplex_i
- the first pointsimplex_j
- the second pointpublic Simplex[] getPoints()
AbstractObjectMetricSpace
getPoints
in interface AbstractObjectMetricSpace<Simplex>