edu.stanford.math.plex4.streams.derived
T
- the underlying basis type of the first chain complexU
- the underlying basis type of the second chain complexpublic class TensorStream<T,U> extends java.lang.Object implements AbstractFilteredStream<edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U>>
Modifier and Type | Field and Description |
---|---|
protected AbstractFilteredStream<T> |
stream1
The first factor in the tensor product.
|
protected AbstractFilteredStream<U> |
stream2
The second factor in the tensor product.
|
Constructor and Description |
---|
TensorStream(AbstractFilteredStream<T> stream1,
AbstractFilteredStream<U> stream2)
This constructor initializes the stream from two underlying filtered chain complexes.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsElement(edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U> 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<edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U>> |
getBasisComparator()
This function returns a comparator on the underlying basis type.
|
edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U>[] |
getBoundary(edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U> basisElement)
This function returns the elements in the boundary of the supplied
basisElement, without the coefficients.
|
int[] |
getBoundaryCoefficients(edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U> basisElement)
This function returns the coefficients of the boundary of the supplied
basis element.
|
int |
getDimension(edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U> basisElement)
This function returns the dimension of a basis element within
the chain complex.
|
int |
getFiltrationIndex(edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U> basisElement)
This function returns the filtration index of the requested basis element.
|
double |
getFiltrationValue(edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U> 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<edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U>> |
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.
|
protected final AbstractFilteredStream<T> stream1
protected final AbstractFilteredStream<U> stream2
public TensorStream(AbstractFilteredStream<T> stream1, AbstractFilteredStream<U> stream2)
stream1
- the first chain complexstream2
- the second chain complexpublic edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U>[] getBoundary(edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U> basisElement)
AbstractFilteredStream
getBoundary
in interface AbstractFilteredStream<edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U>>
basisElement
- the element to get the boundary ofpublic int[] getBoundaryCoefficients(edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U> basisElement)
AbstractFilteredStream
getBoundaryCoefficients
in interface AbstractFilteredStream<edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U>>
basisElement
- the element to get the boundary coefficients ofpublic int getDimension(edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U> basisElement)
AbstractFilteredStream
getDimension
in interface AbstractFilteredStream<edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U>>
basisElement
- the element to get the dimension ofpublic java.util.Iterator<edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U>> iterator()
public int getFiltrationIndex(edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U> basisElement)
AbstractFilteredStream
getFiltrationIndex
in interface AbstractFilteredStream<edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U>>
basisElement
- the basis element to get the filtration index forpublic double getFiltrationValue(edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U> basisElement)
getFiltrationValue
in interface AbstractFilteredStream<edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U>>
public boolean containsElement(edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U> basisElement)
AbstractFilteredStream
containsElement
in interface AbstractFilteredStream<edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U>>
basisElement
- the basis element to be testedpublic void finalizeStream()
AbstractFilteredStream
finalizeStream
in interface AbstractFilteredStream<edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U>>
public boolean isFinalized()
AbstractFilteredStream
isFinalized
in interface AbstractFilteredStream<edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U>>
public int getSize()
AbstractFilteredStream
getSize
in interface AbstractFilteredStream<edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U>>
public int getMaximumFiltrationIndex()
AbstractFilteredStream
getMaximumFiltrationIndex
in interface AbstractFilteredStream<edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U>>
public int getMinimumFiltrationIndex()
AbstractFilteredStream
getMinimumFiltrationIndex
in interface AbstractFilteredStream<edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U>>
public java.util.Comparator<edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U>> getBasisComparator()
AbstractFilteredStream
getBasisComparator
in interface AbstractFilteredStream<edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U>>
public <G> PersistenceInvariantDescriptor<Interval<java.lang.Double>,G> transform(PersistenceInvariantDescriptor<Interval<java.lang.Integer>,G> barcodeCollection)
AbstractFilteredStream
transform
in interface AbstractFilteredStream<edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<T,U>>
barcodeCollection
- the set of filtration index barcodes