edu.stanford.math.plex4.api
public class Plex4 extends java.lang.Object
Constructor and Description |
---|
Plex4() |
Modifier and Type | Method and Description |
---|---|
static <G> void |
createBarcodePlot(PersistenceInvariantDescriptor<Interval<java.lang.Double>,G> collection,
java.lang.String caption,
double endPoint)
This function creates an images of a collection of barcodes and writes it to a file.
|
static EuclideanMetricSpace |
createEuclideanMetricSpace(double[][] points)
This function creates a new EuclideanMetricSpace object.
|
static ExplicitCellStream |
createExplicitCellStream()
This function creates a new ExplicitCellStream object.
|
static ExplicitCellStream |
createExplicitCellStream(double maxFiltrationValue) |
static <T> ExplicitLandmarkSelector<T> |
createExplicitSelector(AbstractSearchableMetricSpace<T> metricSpace,
int[] landmarkPoints)
This function creates a new explicit landmark selector on an abstract metric space.
|
static ExplicitLandmarkSelector<double[]> |
createExplicitSelector(double[][] points,
int[] landmarkPoints)
This function creates a new explicit landmark selector on a point cloud.
|
static ExplicitSimplexStream |
createExplicitSimplexStream()
This function creates a new ExplicitSimplexStream object.
|
static ExplicitSimplexStream |
createExplicitSimplexStream(double maxFiltrationValue) |
static edu.stanford.math.primitivelib.autogen.formal_sum.DoubleMatrixConverter<Simplex,Simplex> |
createHomMatrixConverter(AbstractFilteredStream<Simplex> domainStream,
AbstractFilteredStream<Simplex> codomainStream)
This function creates a matrix converter object for converting between formal sums, sparse and dense matrices.
|
static <T,U> HomStream<T,U> |
createHomStream(AbstractFilteredStream<T> domainStream,
AbstractFilteredStream<U> codomainStream)
This function creates a new hom stream from two given filtered streams.
|
static LazyWitnessStream<double[]> |
createLazyWitnessStream(LandmarkSelector<double[]> selector,
int maxDimension,
double maxFiltrationValue)
This function create a new lazy-witness stream given a point cloud.
|
static LazyWitnessStream<double[]> |
createLazyWitnessStream(LandmarkSelector<double[]> selector,
int maxDimension,
double maxFiltrationValue,
int numDivisions)
This function create a new lazy-witness stream given a point cloud.
|
static edu.stanford.math.primitivelib.autogen.formal_sum.DoubleVectorConverter<Simplex> |
createMatrixConverter(AbstractFilteredStream<Simplex> stream)
This function creates a vector converter for converting between formal sums, and sparse and dense arrays.
|
static <T> MaxMinLandmarkSelector<T> |
createMaxMinSelector(AbstractSearchableMetricSpace<T> metricSpace,
int numLandmarkPoints)
This function creates a new max-min landmark selector on an abstract metric space.
|
static <T> MaxMinLandmarkSelector<T> |
createMaxMinSelector(AbstractSearchableMetricSpace<T> metricSpace,
int numLandmarkPoints,
int firstPoint)
This function creates a new max-min landmark selector on an abstract metric space.
|
static MaxMinLandmarkSelector<double[]> |
createMaxMinSelector(double[][] points,
int numLandmarkPoints)
This function creates a new max-min landmark selector on a point cloud.
|
static MaxMinLandmarkSelector<double[]> |
createMaxMinSelector(double[][] points,
int numLandmarkPoints,
int firstPoint)
This function creates a new max-min landmark selector on a point cloud.
|
static <T> RandomLandmarkSelector<T> |
createRandomSelector(AbstractSearchableMetricSpace<T> metricSpace,
int numLandmarkPoints)
This function creates a new randomized landmark selector on an abstract metric space.
|
static RandomLandmarkSelector<double[]> |
createRandomSelector(double[][] points,
int numLandmarkPoints)
This function creates a new random landmark point selector on a point cloud.
|
static <T> VietorisRipsStream<T> |
createVietorisRipsStream(AbstractSearchableMetricSpace<T> metricSpace,
int maxDimension,
double maxFiltrationValue)
This function creates a Vietoris-Rips complex given a metric space.
|
static <T> VietorisRipsStream<T> |
createVietorisRipsStream(AbstractSearchableMetricSpace<T> metricSpace,
int maxDimension,
double[] filtrationValues)
This function creates a Vietoris-Rips complex from a metric space.
|
static <T> VietorisRipsStream<T> |
createVietorisRipsStream(AbstractSearchableMetricSpace<T> metricSpace,
int maxDimension,
double maxFiltrationValue,
int numDivisions)
This function creates a Vietoris-Rips complex from a metric space.
|
static VietorisRipsStream<double[]> |
createVietorisRipsStream(double[][] points,
int maxDimension,
double maxFiltrationValue)
This function creates a Vietoris-Rips complex given a point cloud.
|
static VietorisRipsStream<double[]> |
createVietorisRipsStream(double[][] points,
int maxDimension,
double[] filtrationValues)
This function creates a Vietoris-Rips complex given a point cloud.
|
static VietorisRipsStream<double[]> |
createVietorisRipsStream(double[][] points,
int maxDimension,
double maxFiltrationValue,
int numDivisions)
This function creates a Vietoris-Rips complex given a point cloud.
|
static WitnessStream<double[]> |
createWitnessStream(LandmarkSelector<double[]> selector,
int maxDimension,
double maxFiltrationValue)
This function create a new witness stream given a point cloud.
|
static WitnessStream<double[]> |
createWitnessStream(LandmarkSelector<double[]> selector,
int maxDimension,
double maxFiltrationValue,
int numDivisions)
This function create a new witness stream given a point cloud.
|
static double |
estimateDiameter(AbstractIntMetricSpace metricSpace)
This function estimates the diameter of a metric space.
|
static AbstractPersistenceAlgorithm<Cell> |
getDefaultCellularAlgorithm(int maxDimension)
This function returns the default (absolute) cellular persistent homology algorithm.
|
static AbstractPersistenceAlgorithm<Simplex> |
getDefaultSimplicialAlgorithm(int maxDimension)
This function returns the default (absolute) simplicial persistent homology algorithm.
|
static AbstractPersistenceAlgorithm<SimplexPair> |
getDefaultSimplicialPairAlgorithm(int maxDimension) |
static AbstractPersistenceAlgorithm<Cell> |
getModularCellularAlgorithm(int maxDimension,
int prime)
This function returns a cellular persistence algorithm over the finite field Z/pZ.
|
static AbstractPersistenceAlgorithm<Simplex> |
getModularSimplicialAlgorithm(int maxDimension,
int prime)
This function returns a simplicial persistence algorithm over the finite field Z/pZ.
|
static AbstractPersistenceAlgorithm<Cell> |
getRationalCellularAlgorithm(int maxDimension)
This function returns a cellular persistence algorithm over the the rational numbers.
|
static ObjectPersistenceAlgorithm<org.apache.commons.math.fraction.Fraction,edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<Simplex,Simplex>> |
getRationalHomAlgorithm()
This function creates a persistent homology algorithm over the rationals for computing homology of simplicial hom complexes.
|
static ObjectAbsoluteHomology<org.apache.commons.math.fraction.Fraction,Simplex> |
getRationalSimplicialAlgorithm(int maxDimension)
This function returns a simplicial persistence algorithm over the the rational numbers.
|
static void |
main(java.lang.String[] args)
Empty main function for convenience only.
|
public static void main(java.lang.String[] args)
args
- public static EuclideanMetricSpace createEuclideanMetricSpace(double[][] points)
points
- the array of points to include in the metric spacepublic static double estimateDiameter(AbstractIntMetricSpace metricSpace)
metricSpace
- the metric spacepublic static ExplicitSimplexStream createExplicitSimplexStream()
public static ExplicitSimplexStream createExplicitSimplexStream(double maxFiltrationValue)
public static ExplicitCellStream createExplicitCellStream()
public static ExplicitCellStream createExplicitCellStream(double maxFiltrationValue)
public static VietorisRipsStream<double[]> createVietorisRipsStream(double[][] points, int maxDimension, double maxFiltrationValue, int numDivisions)
points
- the points in the data setmaxDimension
- the maximum simplicial dimension in the complexmaxFiltrationValue
- the maximum filtration valuenumDivisions
- the number of divisions to use in the filtrationpublic static VietorisRipsStream<double[]> createVietorisRipsStream(double[][] points, int maxDimension, double maxFiltrationValue)
points
- the points in the data setmaxDimension
- the maximum simplicial dimension in the complexmaxFiltrationValue
- the maximum filtration valuepublic static <T> VietorisRipsStream<T> createVietorisRipsStream(AbstractSearchableMetricSpace<T> metricSpace, int maxDimension, double maxFiltrationValue, int numDivisions)
T
- metricSpace
- the metric spacemaxDimension
- the maximum simplicial dimension in the complexmaxFiltrationValue
- the maximum filtration valuenumDivisions
- the number of divisions to use in the filtrationpublic static <T> VietorisRipsStream<T> createVietorisRipsStream(AbstractSearchableMetricSpace<T> metricSpace, int maxDimension, double maxFiltrationValue)
metricSpace
- the metric spacemaxDimension
- the maximum simplicial dimension in the complexmaxFiltrationValue
- the maximum filtration valuepublic static VietorisRipsStream<double[]> createVietorisRipsStream(double[][] points, int maxDimension, double[] filtrationValues)
points
- the points in the data setmaxDimension
- the maximum simplicial dimension in the complexfiltrationValues
- the set of filtration values to usepublic static <T> VietorisRipsStream<T> createVietorisRipsStream(AbstractSearchableMetricSpace<T> metricSpace, int maxDimension, double[] filtrationValues)
T
- metricSpace
- the metric spacemaxDimension
- the maximum simplicial dimension in the complexfiltrationValues
- the set of filtration values to usepublic static LazyWitnessStream<double[]> createLazyWitnessStream(LandmarkSelector<double[]> selector, int maxDimension, double maxFiltrationValue, int numDivisions)
selector
- the landmark selectionmaxDimension
- the maximum simplicial dimension in the complexmaxFiltrationValue
- the maximum filtration valuenumDivisions
- the number of divisions to use in the filtrationpublic static WitnessStream<double[]> createWitnessStream(LandmarkSelector<double[]> selector, int maxDimension, double maxFiltrationValue)
selector
- the landmark selectionmaxDimension
- the maximum simplicial dimension in the complexmaxFiltrationValue
- the maximum filtration valuepublic static WitnessStream<double[]> createWitnessStream(LandmarkSelector<double[]> selector, int maxDimension, double maxFiltrationValue, int numDivisions)
selector
- the landmark selectionmaxDimension
- the maximum simplicial dimension in the complexmaxFiltrationValue
- the maximum filtration valuenumDivisions
- the number of divisions to use in the filtrationpublic static LazyWitnessStream<double[]> createLazyWitnessStream(LandmarkSelector<double[]> selector, int maxDimension, double maxFiltrationValue)
selector
- the landmark selectionmaxDimension
- the maximum simplicial dimension in the complexmaxFiltrationValue
- the maximum filtration valuepublic static MaxMinLandmarkSelector<double[]> createMaxMinSelector(double[][] points, int numLandmarkPoints)
points
- the data setnumLandmarkPoints
- the number of points to include in the selectionpublic static MaxMinLandmarkSelector<double[]> createMaxMinSelector(double[][] points, int numLandmarkPoints, int firstPoint)
points
- the data setnumLandmarkPoints
- the number of points to include in the selectionfirstPoint
- the initial point in the landmark setpublic static RandomLandmarkSelector<double[]> createRandomSelector(double[][] points, int numLandmarkPoints)
points
- the data setnumLandmarkPoints
- the number of points to include in the selectionpublic static <T> MaxMinLandmarkSelector<T> createMaxMinSelector(AbstractSearchableMetricSpace<T> metricSpace, int numLandmarkPoints)
T
- the underlying type of the metric spacemetricSpace
- the metric space to select fromnumLandmarkPoints
- the number of points to include in the selectionpublic static <T> MaxMinLandmarkSelector<T> createMaxMinSelector(AbstractSearchableMetricSpace<T> metricSpace, int numLandmarkPoints, int firstPoint)
T
- the underlying type of the metric spacemetricSpace
- the metric space to select fromnumLandmarkPoints
- the number of points to include in the selectionfirstPoint
- the initial point in the landmark setpublic static <T> RandomLandmarkSelector<T> createRandomSelector(AbstractSearchableMetricSpace<T> metricSpace, int numLandmarkPoints)
T
- the underlying type of the metric spacemetricSpace
- the metric space to select fromnumLandmarkPoints
- the number of points to include in the selectionpublic static ExplicitLandmarkSelector<double[]> createExplicitSelector(double[][] points, int[] landmarkPoints)
points
- the data setlandmarkPoints
- the set of landmark pointspublic static <T> ExplicitLandmarkSelector<T> createExplicitSelector(AbstractSearchableMetricSpace<T> metricSpace, int[] landmarkPoints)
metricSpace
- the metric space to select fromlandmarkPoints
- the set of landmark pointspublic static AbstractPersistenceAlgorithm<Simplex> getDefaultSimplicialAlgorithm(int maxDimension)
maxDimension
- the maximum dimension the algorithm should compute homology forpublic static AbstractPersistenceAlgorithm<SimplexPair> getDefaultSimplicialPairAlgorithm(int maxDimension)
public static AbstractPersistenceAlgorithm<Cell> getDefaultCellularAlgorithm(int maxDimension)
maxDimension
- the maximum dimension the algorithm should compute homology forpublic static AbstractPersistenceAlgorithm<Cell> getModularCellularAlgorithm(int maxDimension, int prime)
maxDimension
- the maximum dimension the algorithm should compute homology forprime
- the order of the underlying finite fieldpublic static AbstractPersistenceAlgorithm<Simplex> getModularSimplicialAlgorithm(int maxDimension, int prime)
maxDimension
- the maximum dimension the algorithm should compute homology forprime
- the order of the underlying finite fieldpublic static ObjectAbsoluteHomology<org.apache.commons.math.fraction.Fraction,Simplex> getRationalSimplicialAlgorithm(int maxDimension)
maxDimension
- the maximum dimension the algorithm should compute homology forpublic static AbstractPersistenceAlgorithm<Cell> getRationalCellularAlgorithm(int maxDimension)
maxDimension
- the maximum dimension the algorithm should compute homology forpublic static <G> void createBarcodePlot(PersistenceInvariantDescriptor<Interval<java.lang.Double>,G> collection, java.lang.String caption, double endPoint) throws java.io.IOException
collection
- the collection of barcodescaption
- the caption for the imageendPoint
- the maximum endpointjava.io.IOException
public static <T,U> HomStream<T,U> createHomStream(AbstractFilteredStream<T> domainStream, AbstractFilteredStream<U> codomainStream)
T
- basis type for the first complexU
- the basis type for the second complexdomainStream
- the domain complexcodomainStream
- the codomain complexpublic static ObjectPersistenceAlgorithm<org.apache.commons.math.fraction.Fraction,edu.stanford.math.primitivelib.autogen.pair.ObjectObjectPair<Simplex,Simplex>> getRationalHomAlgorithm()
public static edu.stanford.math.primitivelib.autogen.formal_sum.DoubleMatrixConverter<Simplex,Simplex> createHomMatrixConverter(AbstractFilteredStream<Simplex> domainStream, AbstractFilteredStream<Simplex> codomainStream)
domainStream
- the stream which provides the basis elements for the domaincodomainStream
- the stream which provides the basis elements for the codomainpublic static edu.stanford.math.primitivelib.autogen.formal_sum.DoubleVectorConverter<Simplex> createMatrixConverter(AbstractFilteredStream<Simplex> stream)
stream
- the stream which provides the basis elements