edu.stanford.math.plex4.homology.barcodes
I
- the persistence invariant type - ie. the interval typeG
- the generator typepublic class PersistenceInvariantDescriptor<I,G> extends java.lang.Object implements java.lang.Iterable<java.util.Map.Entry<java.lang.Integer,java.util.List<edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<I,G>>>>
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.Integer,java.util.List<G>> |
generators |
protected java.util.Map<java.lang.Integer,java.util.List<edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<I,G>>> |
intervalGeneratorPairs |
protected java.util.Map<java.lang.Integer,java.util.List<I>> |
intervals |
Constructor and Description |
---|
PersistenceInvariantDescriptor() |
Modifier and Type | Method and Description |
---|---|
void |
addInterval(int dimension,
I interval,
G generator)
This function adds an interval and generator at the specified dimension to the
collection.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getBettiNumbers()
This function returns a string representation of the set of betti numbers.
|
int[] |
getBettiSequence()
This function returns an array of integers indicating the cardinality of the barcodes at each dimension.
|
java.util.Set<java.lang.Integer> |
getDimensions()
This function returns the set of dimensions at which there are intervals.
|
java.util.Iterator<java.util.Map.Entry<java.lang.Integer,java.util.List<G>>> |
getGeneratorIterator()
This function returns an iterator for traversing the generators.
|
java.util.List<G> |
getGeneratorsAtDimension(int dimension)
This function returns the set of generators at a specified dimension.
|
java.util.Iterator<java.util.Map.Entry<java.lang.Integer,java.util.List<edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<I,G>>>> |
getIntervalGeneratorPairIterator()
This function returns an iterator for traversing the interval-generator pairs.
|
java.util.List<edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<I,G>> |
getIntervalGeneratorPairsAtDimension(int dimension)
This function returns the set of interval-generator pairs at a specified dimension.
|
java.util.Iterator<java.util.Map.Entry<java.lang.Integer,java.util.List<I>>> |
getIntervalIterator()
This function returns an iterator for traversing the intervals.
|
java.util.List<I> |
getIntervalsAtDimension(int dimension)
This function returns the set of intervals at a specified dimension.
|
int |
hashCode() |
java.util.Iterator<java.util.Map.Entry<java.lang.Integer,java.util.List<edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<I,G>>>> |
iterator() |
java.lang.String |
toString() |
static <I,G> PersistenceInvariantDescriptor<I,G> |
union(PersistenceInvariantDescriptor<I,G> a,
PersistenceInvariantDescriptor<I,G> b)
This function computes the union of two collections of persistence invariants.
|
protected final java.util.Map<java.lang.Integer,java.util.List<I>> intervals
protected final java.util.Map<java.lang.Integer,java.util.List<G>> generators
public void addInterval(int dimension, I interval, G generator)
dimension
- the dimension at which to addinterval
- the intervalgenerator
- the generatorpublic int[] getBettiSequence()
public java.lang.String getBettiNumbers()
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Iterator<java.util.Map.Entry<java.lang.Integer,java.util.List<I>>> getIntervalIterator()
public java.util.Iterator<java.util.Map.Entry<java.lang.Integer,java.util.List<G>>> getGeneratorIterator()
public java.util.Iterator<java.util.Map.Entry<java.lang.Integer,java.util.List<edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<I,G>>>> getIntervalGeneratorPairIterator()
public java.util.Set<java.lang.Integer> getDimensions()
public java.util.List<I> getIntervalsAtDimension(int dimension)
dimension
- the dimension to get the intervals atpublic java.util.List<G> getGeneratorsAtDimension(int dimension)
dimension
- the dimension to get the generators atpublic java.util.List<edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<I,G>> getIntervalGeneratorPairsAtDimension(int dimension)
dimension
- the dimension to get the interval-generator pairs atpublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.util.Iterator<java.util.Map.Entry<java.lang.Integer,java.util.List<edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<I,G>>>> iterator()
public static <I,G> PersistenceInvariantDescriptor<I,G> union(PersistenceInvariantDescriptor<I,G> a, PersistenceInvariantDescriptor<I,G> b)
I
- the persistence invariant type - ie. the interval typeG
- the generator typea
- the first collectionb
- the second collection