edu.stanford.math.plex
public class RipsStream extends SimplexStream
RipsStream
instance is SimplexStream whose elements are
the simplices of the Rips complex of a PointData instance. The
implementation of this class is quite similar to that of
LazyWitnessStream.LazyWitnessStream
,
WitnessStream
SimplexStream.ComparisonType, SimplexStream.Head, SimplexStream.Stack, SimplexStream.Tail
Modifier and Type | Field and Description |
---|---|
double |
edge_length_limit
The maximum length of an edge that will be admitted to the
complex.
|
double |
granularity
The granularity used in assigning filtration indices to simplices.
|
protected double[] |
lengths_array |
int |
maxDimension
The maximum dimension of a Simplex that will be admitted to the complex.
|
PointData |
pdata
The PointData underlying this Rips complex.
|
protected SimplexStream.Stack |
stack |
Modifier | Constructor and Description |
---|---|
protected |
RipsStream() |
Modifier and Type | Method and Description |
---|---|
double |
convert_filtration_index(int fi)
Convert a filtration index into a persistence parameter (i.e., double)
-- gets overloaded by some subclasses.
|
protected SimplexStream.Stack |
find_simplices(double max_dist,
int max_dimension,
PointData data) |
boolean |
hasNext()
Is there a next Simplex in the stream?
|
java.util.Iterator<Simplex> |
iterator()
Make an iterator for the stream.
|
java.util.Iterator<Simplex> |
iterator(int d)
Make an iterator for the stream elements of fixed dimension.
|
Simplex[] |
matchingSimplices(int dimension,
double test_len,
SimplexStream.ComparisonType ct)
Return simplices of specified dimension that compare "favorably" with
a given length.
|
Simplex[] |
matchingSimplices(int dimension,
int test_index,
SimplexStream.ComparisonType ct)
Return simplices of specified dimension that compare "favorably" with
a given findex.
|
int |
maxDimension()
Max dimension of simplices in the stream.
|
Simplex |
next()
Next Simplex in the stream.
|
int |
size()
How many simplices are in the stream?
|
convertInterval, convertInterval, remove, verify
public final PointData pdata
public final double granularity
A simplex in a Rips complex is regarded as coming into existence when the "last" of its edges does some. Specifically, we assign a persistence parameter to each Simplex which is the the maximum of the persistence parameters assigned to each of the component edges. The most obvious way to do that is to use the length of an admissible edge as the persistence parameter of that edge. (Actually, since the persistence parameters must be integers, the appropriate index into a sorted array of edge lengths is used. And recall that we allow there to be a maximum length of the edges that we consider.) Since this can result in an set of persistence indices that grows quadratically in the number of points, we allow the user to control this growth by specifying a positive granularity. In this case the filtration index of an edge is the floor of the ratio of the edge length divided by the granularity. This means that we know that the filtration indices will never exceed the floor of the ratio of the max edge length divided by the granularity.
public final int maxDimension
public final double edge_length_limit
protected double[] lengths_array
protected SimplexStream.Stack stack
public boolean hasNext()
hasNext
in interface java.util.Iterator<Simplex>
hasNext
in class SimplexStream
public Simplex next()
next
in interface java.util.Iterator<Simplex>
next
in class SimplexStream
public int size()
size
in class SimplexStream
public int maxDimension()
maxDimension
in class SimplexStream
public double convert_filtration_index(int fi)
convert_filtration_index
in class SimplexStream
fi
- Filtration index to convert.public java.util.Iterator<Simplex> iterator()
Iterator
public java.util.Iterator<Simplex> iterator(int d)
d
- dimension of simplices of interest.Iterator
public Simplex[] matchingSimplices(int dimension, int test_index, SimplexStream.ComparisonType ct)
dimension
- dimenion of interest.test_index
- findex we are comparing against.ct
- Type of comparison to use.public Simplex[] matchingSimplices(int dimension, double test_len, SimplexStream.ComparisonType ct)
dimension
- dimenion of interest.test_len
- length we are comparing against.ct
- Type of comparison to use.protected SimplexStream.Stack find_simplices(double max_dist, int max_dimension, PointData data)