edu.stanford.math.plex
public class WitnessStream extends SimplexStream
WitnessStream
is an iterable Witness complex.
A WitnessStream is a SimplexStream whose elements are the simplices of the Witness complex of a PointData instance. That is, a simplex is added to the complex only each face is present and a witness is found for the entire simplex. The details of this construction are described in Topological estimation using witness complexes, Vin de Silva and Gunnar Carlsson, Symposium on Point-Based Graphics, ETH, Zurich, Switzerland, June 2-4, 2004.
LazyWitnessStream
SimplexStream.ComparisonType, SimplexStream.Head, SimplexStream.Stack, SimplexStream.Tail
Modifier and Type | Field and Description |
---|---|
protected double |
granularity |
protected int[] |
landmarks |
protected int |
maxDimension |
protected double |
maxR |
protected PointData |
pdata |
protected SimplexStream.Stack |
stack |
Modifier | Constructor and Description |
---|---|
protected |
WitnessStream() |
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.
|
static double |
estimateRmax(PointData data,
int[] landmarks)
Estimate Rmax for a given PointData and landmark set.
|
protected SimplexStream.Stack |
find_simplices(double delta,
double R_max,
int max_dimension,
int[] landmarks,
PointData data) |
boolean |
hasNext()
Is there a next Simplex in the stream?
|
java.util.Iterator<Simplex> |
iterator()
Make an iterator for the stream.
|
protected static int |
m_index(int n,
int k,
int N) |
static int[] |
makeRandomLandmarks(PointData data,
int L)
Randomly choose a subset of a given PointData for use as landmarks.
|
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
protected final PointData pdata
protected final double granularity
protected final int maxDimension
protected final int[] landmarks
protected double maxR
protected SimplexStream.Stack stack
public static int[] makeRandomLandmarks(PointData data, int L)
data
- PointData from which to choose landmarks.L
- number of landmarks to choose.public static double estimateRmax(PointData data, int[] landmarks)
data
- The entire data set.landmarks
- The landmark set.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
protected static int m_index(int n, int k, int N)
protected SimplexStream.Stack find_simplices(double delta, double R_max, int max_dimension, int[] landmarks, PointData data)