edu.stanford.math.plex4.streams.interfaces
T
- the underlying type of the generators in the free modules of the complexpublic interface AbstractFilteredStream<T> extends java.lang.Iterable<T>
This interface defines the functionality of a streamed filtered chain complex. An implementing class must provide functionality for iterating through the chain complex, as well as providing information about the basis elements (such as their filtration indices and dimension).
Note that there are two types of grading on our notion of a
filtered chain complex. The first is that of the filtration index.
In other words we have the decomposition
... -> C_{i-1} -> C_{i} -> C_{i+1} -> ...
with elements in C_i having the filtration index given by a_i. However,
we also have the more standard homological grading given by the "dimension"
of a basis element. Since we are not restricting ourselves to basis
elements consisting of simplices, the dimension may or may not carry
geometric meaning. Nevertheless it plays an important role.
An implementing class must iterate through the basis elements in non-decreasing order of filtration index. This defines a partial order on the set of basis elements within the entire chain complex. The completion of this partial order to a total order can depend on the implementer, but must be such that the boundary of a basis element must always precede the element itself. In practice, the completion of the partial order will be based on dimension.
The underlying type of the stream, T, will vary depending on the context. Below are some examples:
This interface is the highest level in the filtered stream classes and interfaces, and defines the basic functionality that all such streams must implement.
It is important to note that functions such as getBoundary, getFiltrationIndex and getDimension do not only depend on the queried basis element (ie. the simplex in question), but also the properties of the chain complex. For example, the getBoundary function may return the coboundary of a simplex rather than a boundary in the case that we are working in the context of a cochain complex. Or, the getDimension may return a shifted version of the actual geometric dimension of a simplex.
Another important point is that this class is agnostic towards the actual filtration value of a basis element, and only stores filtration indices. Filtration indices are integers that are somehow calculated from the actual filtration values. The reason that we have chosen not to store the actual filtration values is that we do not want to enforce a particular ordering on them. For example, we may define a filtered complex based on the sublevel or superlevel sets of a function. However, we always maintain the constraint that the filtration index must be non-decreasing.
A note on language: We call the underlying parameterized type T as the basis type. This is justified by the fact that the modules in the chain complex are free modules, and are generated by objects with type T.
Modifier and Type | Method and Description |
---|---|
boolean |
containsElement(T basisElement)
This function returns whether an element is contained in the stream.
|
void |
finalizeStream()
This function prepares the stream for use by a consumer, such as the
PersistentHomology class.
|
java.util.Comparator<T> |
getBasisComparator()
This function returns a comparator on the underlying basis type.
|
T[] |
getBoundary(T basisElement)
This function returns the elements in the boundary of the supplied
basisElement, without the coefficients.
|
int[] |
getBoundaryCoefficients(T basisElement)
This function returns the coefficients of the boundary of the supplied
basis element.
|
int |
getDimension(T basisElement)
This function returns the dimension of a basis element within
the chain complex.
|
int |
getFiltrationIndex(T basisElement)
This function returns the filtration index of the requested basis element.
|
double |
getFiltrationValue(T basisElement) |
int |
getMaximumFiltrationIndex()
This function gets the maximum filtration index in the complex.
|
int |
getMinimumFiltrationIndex()
This function gets the minimum filtration index in the complex.
|
int |
getSize()
This function returns the total number of elements in the stream.
|
boolean |
isFinalized()
This function checks whether the finalize() function has been called.
|
<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.
|
int getFiltrationIndex(T basisElement)
basisElement
- the basis element to get the filtration index fordouble getFiltrationValue(T basisElement)
boolean containsElement(T basisElement)
basisElement
- the basis element to be testedT[] getBoundary(T basisElement)
basisElement
- the element to get the boundary ofint[] getBoundaryCoefficients(T basisElement)
basisElement
- the element to get the boundary coefficients ofint getDimension(T basisElement)
basisElement
- the element to get the dimension ofvoid finalizeStream()
boolean isFinalized()
int getSize()
int getMaximumFiltrationIndex()
int getMinimumFiltrationIndex()
java.util.Comparator<T> getBasisComparator()
<G> PersistenceInvariantDescriptor<Interval<java.lang.Double>,G> transform(PersistenceInvariantDescriptor<Interval<java.lang.Integer>,G> barcodeCollection)
G
- barcodeCollection
- the set of filtration index barcodes