edu.stanford.math.plex
public class PersistenceBasis extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static class |
PersistenceBasis.ListItem |
protected static class |
PersistenceBasis.SimplexType |
Modifier and Type | Field and Description |
---|---|
protected static int |
p |
protected static int[] |
pInverses |
Constructor and Description |
---|
PersistenceBasis() |
Modifier and Type | Method and Description |
---|---|
static int |
baseModulus()
What is modulus of the coefficient field?
|
static int[][] |
basis(SimplexStream stream,
int degree,
double findex) |
static double[][] |
boundaryMatrix(SimplexStream stream,
double findex,
int degree)
Returns a boundary matrix for a given simple simplex stream in a format usable from Matlab.
|
static double[][] |
boundaryMatrixSparse(SimplexStream stream,
double findex,
int degree)
Returns a sparse boundary matrix for a given simple simplex stream in a format usable from Matlab.
|
static double[] |
chainVector(SimplexStream stream,
Chain chain,
double findex) |
static PersistenceBasisInterval.Float[] |
computeIntervals(SimplexStream sstream)
Compute the persistent homology intervals of the simplex stream
given.
|
static PersistenceBasisInterval.Float[] |
computeIntervals(SimplexStream sstream,
boolean retrofit)
Compute the persistent homology intervals of the simplex stream
given with an option flag to control which type of basis we want
to choose.
|
PersistenceBasisInterval.Float[] |
computeIntervals(SimplexStream sstream,
int prime,
boolean retrofit)
Compute the persistent homology intervals of the simplex stream
given with explicitly given characteristic of the underlying field
as well as an option flag to control which type of basis we want to
choose.
|
static PersistenceBasisInterval[] |
computePersistentCohomologyZigZag(SimplexStream stream) |
static PersistenceBasisInterval[] |
computePersistentCohomologyZigZag(SimplexStream stream,
int prime)
Computes persistent cohomology using a zig-zag based approach due to Dmitriy Morozov.
|
PersistenceBasisInterval[] |
computeRawIntervals(SimplexStream sstream,
int prime) |
protected static int[] |
multiplicative_inverses(int p) |
static void |
setBaseModulus(int modulus)
Set or reset the coefficient field.
|
public static int baseModulus()
public static void setBaseModulus(int modulus)
modulus
- Must be a prime in [2,255].java.lang.IllegalArgumentException
protected static int[] multiplicative_inverses(int p)
public static double[][] boundaryMatrix(SimplexStream stream, double findex, int degree)
stream
- SimpleSimplexStream providing the simplicesfindex
- The filtration index at which to perform the computationdegree
- We want the boundary matrix taking simplices of dimension degree to simplices of dimension degree-1public static double[][] boundaryMatrixSparse(SimplexStream stream, double findex, int degree)
stream
- SimpleSimplexStream providing the simplicesfindex
- The filtration index at which to perform the computationdegree
- We want the boundary matrix taking simplices of dimension degree to simplices of dimension degree-1public static double[] chainVector(SimplexStream stream, Chain chain, double findex)
public static int[][] basis(SimplexStream stream, int degree, double findex)
public static PersistenceBasisInterval.Float[] computeIntervals(SimplexStream sstream)
sstream
- The simplex stream representing the filtered
complex of which the homology is computed.public static PersistenceBasisInterval.Float[] computeIntervals(SimplexStream sstream, boolean retrofit)
sstream
- The simplex stream representing the filtered
complex of which the homology is computed.retrofit
- If false, the basis element is guaranteed to
exist throughout the entire interval. If true,
the basis element of a finite interval will
correspond to the reduced boundary of the simplex
killing the interval.public PersistenceBasisInterval.Float[] computeIntervals(SimplexStream sstream, int prime, boolean retrofit)
sstream
- The simplex stream representing the filtered
complex of which the homology is computed.prime
- The characteristic of the base field of the computation.retrofit
- If false, the basis element is guaranteed to
exist throughout the entire interval. If true,
the basis element of a finite interval will
correspond to the reduced boundary of the simplex
killing the interval.public PersistenceBasisInterval[] computeRawIntervals(SimplexStream sstream, int prime)
public static PersistenceBasisInterval[] computePersistentCohomologyZigZag(SimplexStream stream, int prime)
Seems to compute wrongly. Need to step through small examples and work out what exactly what's happening. Diagnosis: too high dimensional cocycles occurring, and way too many of them. The cocycles expected do not occur.
stream
- SimpleSimplexStream providing the simplicespublic static PersistenceBasisInterval[] computePersistentCohomologyZigZag(SimplexStream stream)