edu.stanford.math.plex4.streams.impl
public class ExplicitStream<T extends PrimitiveBasisElement> extends PrimitiveStream<T>
storageStructure
Constructor and Description |
---|
ExplicitStream(AbstractFilteredStream<T> stream,
java.util.Comparator<T> comparator)
This constructor initializes the stream from an existing stream.
|
ExplicitStream(java.util.Comparator<T> comparator)
Constructor which accepts a comparator for comparing the type T.
|
ExplicitStream(java.util.Comparator<T> comparator,
double maxFiltrationValue) |
Modifier and Type | Method and Description |
---|---|
void |
addAllElements(AbstractFilteredStream<T> stream)
This function copies all of the elements in the supplied stream to the current one.
|
void |
addElement(T basisElement,
double filtrationValue)
This function adds a basis element the stream with specified filtration index.
|
protected void |
constructComplex()
This abstract function performs the construction of the filtered chain complex.
|
boolean |
containsElement(T basisElement)
This function returns true if the stream contains the query element.
|
void |
ensureAllFaces()
This function ensures that all of the faces of the all of the elements are
present in the stream.
|
double |
getFiltrationValue(T basisElement) |
boolean |
removeElementIfPresent(T basisElement)
This function removes the specified element from the stream.
|
<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.
|
finalizeStream, getBasisComparator, getBoundary, getBoundaryCoefficients, getDimension, getFiltrationIndex, getMaximumFiltrationIndex, getMinimumFiltrationIndex, getSize, isFinalized, iterator, validate, validateVerbose
public ExplicitStream(java.util.Comparator<T> comparator)
comparator
- a Comparator which provides an ordering of the objectspublic ExplicitStream(java.util.Comparator<T> comparator, double maxFiltrationValue)
public ExplicitStream(AbstractFilteredStream<T> stream, java.util.Comparator<T> comparator)
stream
- the stream to copy fromcomparator
- a Comparator which provides an ordering on the basis elementspublic void addAllElements(AbstractFilteredStream<T> stream)
stream
- the stream to copy frompublic void addElement(T basisElement, double filtrationValue)
basisElement
- the basis element to addfiltrationIndex
- the filtration index of the basis elementpublic boolean removeElementIfPresent(T basisElement)
basisElement
- the element to remove.public boolean containsElement(T basisElement)
containsElement
in interface AbstractFilteredStream<T extends PrimitiveBasisElement>
containsElement
in class PrimitiveStream<T extends PrimitiveBasisElement>
basisElement
- the element to findprotected void constructComplex()
PrimitiveStream
constructComplex
in class PrimitiveStream<T extends PrimitiveBasisElement>
public void ensureAllFaces()
public <G> PersistenceInvariantDescriptor<Interval<java.lang.Double>,G> transform(PersistenceInvariantDescriptor<Interval<java.lang.Integer>,G> barcodeCollection)
AbstractFilteredStream
barcodeCollection
- the set of filtration index barcodespublic double getFiltrationValue(T basisElement)