edu.stanford.math.plex4.streams.impl
public abstract class FlagComplexStream extends PrimitiveStream<Simplex>
This class implements a simplex stream with the property that given its 1-skeleton, its higher skeletons are maximal in the following sense. A k-simplex [v_0, ..., v_k] is a member of the complex iff all of its edges [v_i, v_j] are in the complex.
This class is abstract in that it does not provide a mechanism for constructing the 1-skeleton, and only constructs the higher order skeletons inductively. The reason is that there are different choices for definitions of the 1-skeletons, the main ones being the lazy witness complex, the Vietoris-Rips complex, and the clique complex. Thus a child class must provide the implementation of the 1-skeleton.
Also note that the FlagComplexStream construction can be used with any finite metric space. For information on the implementation, consult the paper "Fast Construction of the Vietoris-Rips Complex", by Afra Zomorodian. This implementation uses the incremental algorithm described in the above paper.
Modifier and Type | Field and Description |
---|---|
protected FiltrationConverter |
converter
This converts between filtration indices and values
|
protected int[] |
indices |
protected int |
maxAllowableDimension
The maximum allowable dimension of the complex.
|
protected UndirectedWeightedListGraph |
neighborhoodGraph
Stores the neighborhood graph.
|
storageStructure
Constructor and Description |
---|
FlagComplexStream(int maxAllowableDimension,
FiltrationConverter converter)
This constructor initializes the class.
|
FlagComplexStream(int maxAllowableDimension,
FiltrationConverter converter,
int[] indices) |
FlagComplexStream(int maxAllowableDimension,
FiltrationConverter converter,
StreamStorageStructure<Simplex> storageStructure)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addCofaces(UndirectedWeightedListGraph G,
int k,
Simplex tau,
gnu.trove.TIntHashSet N,
double filtrationValue)
This function inductively adds all of the cofaces of the simplex tau to
the complex.
|
protected void |
constructComplex()
This abstract function performs the construction of the filtered chain complex.
|
protected abstract UndirectedWeightedListGraph |
constructEdges()
This function implements the construction of the 1-skeleton.
|
FiltrationConverter |
getConverter()
This function returns the FiltrationConverter object used by the complex.
|
double |
getFiltrationValue(Simplex simplex) |
UndirectedWeightedListGraph |
getNeighborhoodGraph()
This returns the neighborhood graph (equivalent to the 1-skeleton) of the
complex.
|
protected void |
incrementalExpansion(UndirectedWeightedListGraph G,
int k)
This function performs the incremental expansion of the complex.
|
<G> PersistenceInvariantDescriptor<Interval<java.lang.Double>,G> |
transform(PersistenceInvariantDescriptor<Interval<java.lang.Integer>,G> barcodeCollection)
This function transforms the given collection of filtration index
barcodes into filtration value barcodes.
|
containsElement, finalizeStream, getBasisComparator, getBoundary, getBoundaryCoefficients, getDimension, getFiltrationIndex, getMaximumFiltrationIndex, getMinimumFiltrationIndex, getSize, isFinalized, iterator, validate, validateVerbose
protected final int maxAllowableDimension
protected UndirectedWeightedListGraph neighborhoodGraph
protected FiltrationConverter converter
protected int[] indices
public FlagComplexStream(int maxAllowableDimension, FiltrationConverter converter)
maxAllowableDimension
- the maximum dimension of the simplicial complexconverter
- a FiltrationConverter for translating between filtration
indices and valuespublic FlagComplexStream(int maxAllowableDimension, FiltrationConverter converter, int[] indices)
public FlagComplexStream(int maxAllowableDimension, FiltrationConverter converter, StreamStorageStructure<Simplex> storageStructure)
maxAllowableDimension
- the maximum dimension of the simplicial complexconverter
- a FiltrationConverter for translating between filtration
indices and valuesstorageStructure
- the StreamStorageStructure to useprotected abstract UndirectedWeightedListGraph constructEdges()
public UndirectedWeightedListGraph getNeighborhoodGraph()
public double getFiltrationValue(Simplex simplex)
public FiltrationConverter getConverter()
public <G> PersistenceInvariantDescriptor<Interval<java.lang.Double>,G> transform(PersistenceInvariantDescriptor<Interval<java.lang.Integer>,G> barcodeCollection)
G
- barcodeCollection
- the set of filtration index barcodesprotected void constructComplex()
PrimitiveStream
constructComplex
in class PrimitiveStream<Simplex>
protected void incrementalExpansion(UndirectedWeightedListGraph G, int k)
G
- the neighborhood graphk
- the maximum dimensionprotected void addCofaces(UndirectedWeightedListGraph G, int k, Simplex tau, gnu.trove.TIntHashSet N, double filtrationValue)
G
- the neighborhood graphk
- the maximum allowable dimensiontau
- the current simplex to addN
- the lower neighbors to investigatefiltrationValue
- the filtration value of the current simplex, tau