edu.stanford.math.plex4.streams.derived
T
- public class DualStream<T> extends java.lang.Object implements AbstractFilteredStream<T>
Constructor and Description |
---|
DualStream(AbstractFilteredStream<T> forwardStream)
This constructor initializes the dualized stream from the regular (forward stream).
|
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 DualStream(AbstractFilteredStream<T> forwardStream)
forwardStream
- the forward streampublic java.util.Iterator<T> iterator()
iterator
in interface java.lang.Iterable<T>
public int getFiltrationIndex(T basisElement)
AbstractFilteredStream
getFiltrationIndex
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)
AbstractFilteredStream
containsElement
in interface AbstractFilteredStream<T>
basisElement
- the basis element to be testedpublic T[] getBoundary(T basisElement)
AbstractFilteredStream
getBoundary
in interface AbstractFilteredStream<T>
basisElement
- the element to get the boundary ofpublic int[] getBoundaryCoefficients(T basisElement)
AbstractFilteredStream
getBoundaryCoefficients
in interface AbstractFilteredStream<T>
basisElement
- the element to get the boundary coefficients ofpublic int getDimension(T basisElement)
AbstractFilteredStream
getDimension
in interface AbstractFilteredStream<T>
basisElement
- the element to get the dimension ofpublic void finalizeStream()
AbstractFilteredStream
finalizeStream
in interface AbstractFilteredStream<T>
public boolean isFinalized()
AbstractFilteredStream
isFinalized
in interface AbstractFilteredStream<T>
public int getSize()
AbstractFilteredStream
getSize
in interface AbstractFilteredStream<T>
public int getMaximumFiltrationIndex()
AbstractFilteredStream
getMaximumFiltrationIndex
in interface AbstractFilteredStream<T>
public int getMinimumFiltrationIndex()
AbstractFilteredStream
getMinimumFiltrationIndex
in interface AbstractFilteredStream<T>
public java.util.Comparator<T> getBasisComparator()
AbstractFilteredStream
getBasisComparator
in interface AbstractFilteredStream<T>
public <G> PersistenceInvariantDescriptor<Interval<java.lang.Double>,G> transform(PersistenceInvariantDescriptor<Interval<java.lang.Integer>,G> barcodeCollection)
AbstractFilteredStream
transform
in interface AbstractFilteredStream<T>
barcodeCollection
- the set of filtration index barcodes