edu.stanford.math.plex4.streams.derived
public class TruncatedStream<T> extends java.lang.Object implements AbstractFilteredStream<T>
| Constructor and Description |
|---|
TruncatedStream(AbstractFilteredStream<T> stream,
double maxFiltrationValue) |
| 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.
|
java.util.Iterator<T> |
iterator() |
<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.
|
public TruncatedStream(AbstractFilteredStream<T> stream, double maxFiltrationValue)
public void finalizeStream()
AbstractFilteredStreamfinalizeStream in interface AbstractFilteredStream<T>public java.util.Comparator<T> getBasisComparator()
AbstractFilteredStreamgetBasisComparator in interface AbstractFilteredStream<T>public T[] getBoundary(T basisElement)
AbstractFilteredStreamgetBoundary in interface AbstractFilteredStream<T>basisElement - the element to get the boundary ofpublic int[] getBoundaryCoefficients(T basisElement)
AbstractFilteredStreamgetBoundaryCoefficients in interface AbstractFilteredStream<T>basisElement - the element to get the boundary coefficients ofpublic int getDimension(T basisElement)
AbstractFilteredStreamgetDimension in interface AbstractFilteredStream<T>basisElement - the element to get the dimension ofpublic int getFiltrationIndex(T basisElement)
AbstractFilteredStreamgetFiltrationIndex in interface AbstractFilteredStream<T>basisElement - the basis element to get the filtration index forpublic double getFiltrationValue(T basisElement)
getFiltrationValue in interface AbstractFilteredStream<T>public boolean containsElement(T basisElement)
AbstractFilteredStreamcontainsElement in interface AbstractFilteredStream<T>basisElement - the basis element to be testedpublic int getMaximumFiltrationIndex()
AbstractFilteredStreamgetMaximumFiltrationIndex in interface AbstractFilteredStream<T>public int getMinimumFiltrationIndex()
AbstractFilteredStreamgetMinimumFiltrationIndex in interface AbstractFilteredStream<T>public int getSize()
AbstractFilteredStreamgetSize in interface AbstractFilteredStream<T>public boolean isFinalized()
AbstractFilteredStreamisFinalized in interface AbstractFilteredStream<T>public <G> PersistenceInvariantDescriptor<Interval<java.lang.Double>,G> transform(PersistenceInvariantDescriptor<Interval<java.lang.Integer>,G> barcodeCollection)
AbstractFilteredStreamtransform in interface AbstractFilteredStream<T>barcodeCollection - the set of filtration index barcodes