-
Notifications
You must be signed in to change notification settings - Fork 9
simplexBase Class
The simplexBase Class serves as both the storage for the simplicial complex of LHF and methods to manipulate the complex after insertion of point cloud data. Every simplicial complex in LHF inherits the simplexBase class and overrides several virtual functions to be used interchangeably between complex types. Pipe functions use the virtual functions defined by the simplexBase class to call these methods for each type of complex.
Currently 3 types of simplicial complexes exist within LHF: SimplexArrayList, SimplexTree, and IndSimplexTree. SimplexArrayList stores the simplicial complex lists of d-dimensional simplices for PH computation. SimplexTree and IndSimplexTree both store the complex in a tree-like data structure relating simplices of different dimensions for faster PH computation. IndSimplexTree also adds an indexed list of pointers to leading terms in the simplicial complex for even faster retrieval of related simplices.
The simplexBase class defines several objects to be used for simplicial complex storage during LHF pipeline execution.
| Object | Description |
|---|---|
std::vector<unsigned> dimCounts; |
Simplex counts by dimension |
std::string simplexType; |
String representation of the simplex type being used |
double maxEpsilon; |
Maximum epsilon to evaluate PH to |
int maxDimension; |
Maximum dimension to evaluate PH to |
std::vector<std::vector<double>> distMatrix; |
Stores the upper triangular n^2 distance matrix |
std::vector<std::vector<std::pair<std::vector<unsigned>, double>>> weightedGraph; |
Stores the multi-dimensional weighted edge graph |
int runningVectorCount; |
Stores the running vector count (for iterative insertion) |
int removedSimplices; |
Stores the removed simplex count (for iterative insertion) |
std::string stats; |
String of statistics for file output |
These objects persist between pipeline segments and can be used to pass simplicial complex data when designing a preprocessor- or basePipe-inherited class.
The simplexBase class defines several virtual functions to be overridden by a designed simplicial complex class.
virtual double getSize();
virtual bool insertIterative(std::vector<double>&, std::vector<std::vector<double>>&);
virtual void deleteIterative(int);
virtual void insert(std::vector<double>&);
virtual bool find(std::vector<unsigned>);
virtual bool find(std::set<unsigned>);
virtual int simplexCount();
virtual int vertexCount();
virtual std::vector<std::vector<unsigned>> getDimEdges(int,double);
virtual std::vector<std::vector<std::pair<std::set<unsigned>, double>>> getAllEdges(double);
virtual std::vector<std::vector<graphEntry>> getIndexEdges(double);
virtual void expandDimensions(int);
virtual void reduceComplex();
virtual bool streamEvaluator(std::vector<double>, std::vector<std::vector<double>>);
virtual std::vector<std::pair<double, std::vector<unsigned>>> getd0Pairs();
TODO...
TODO...
TODO...
TODO...
TODO...
TODO...
TODO...
TODO...
TODO...
TODO...
TODO...
TODO...
TODO...
TODO...
TODO...