The ChainCon Software (Release 0.03)
|
A simplicial set. More...
#include <simplset.h>
Public Types | |
typedef CellT | CellType |
The type of the vertex. More... | |
typedef CellT | value_type |
The type of elements in the filtered complex perceived as a standard-type aggregate. More... | |
Public Member Functions | |
tSimplSet () | |
The default constructor of an empty set. More... | |
tSimplSet (const tSimplSet< CellT > &s) | |
The copy constructor. More... | |
tSimplSet< CellT > & | operator= (const tSimplSet< CellT > &s) |
The assignment operator. More... | |
~tSimplSet () | |
The destructor. More... | |
bool | operator== (const tSimplSet< CellT > &s) const |
The equality operator. More... | |
void | swap (tSimplSet< CellT > &s) |
Swaps the data between two simplicial sets. More... | |
int | dim () const |
Returns the dimension of the highest-dimensional non-degenerate cell in the simplicial set, or -1 if none. More... | |
int_t | add (const CellT &c) |
Adds a cell to the complex. More... | |
int_t | getNumber (const CellT &c) const |
Finds a cell in the complex. More... | |
bool | check (const CellT &c) const |
Checks if a cell is in the complex. More... | |
int_t | size () const |
Returns the number of cells in the simplicial set. More... | |
bool | empty () const |
Returns the information on whether the complex is empty or not. More... | |
const CellT & | operator[] (int_t n) const |
Returns the given cell in the simplicial set. More... | |
int_t | addFaces (int dim) |
Adds faces of all the cells of the given dimension. More... | |
int_t | addFaces () |
Adds faces of all the cells in the set. More... | |
int_t | addDegenerate (int minDim, int maxDim) |
Adds degenerate cells for all cells whose dimension falls within the given range, including minDim, up to but excluding maxDim. More... | |
int_t | normalize () |
Normalizes the set of cells, that is, removes degenerate cells. More... | |
int_t | addRef () |
Adds 1 to the reference counter. More... | |
int_t | delRef () |
Subtracts 1 from the reference counter. More... | |
Private Attributes | |
int | dimension |
The highest dimension of a non-degenerate cell. More... | |
chomp::homology::hashedset< CellT > | cells |
The set of all the cells in the complex. More... | |
int_t | refCount |
Reference counter. More... | |
A simplicial set.
Definition at line 51 of file simplset.h.
The type of the vertex.
Definition at line 55 of file simplset.h.
typedef CellT tSimplSet< CellT >::value_type |
The type of elements in the filtered complex perceived as a standard-type aggregate.
Definition at line 59 of file simplset.h.
The default constructor of an empty set.
Definition at line 151 of file simplset.h.
The copy constructor.
Definition at line 158 of file simplset.h.
|
inline |
Adds a cell to the complex.
Does not add its boundary cells. Returns the number of the added cell in the complex.
Definition at line 222 of file simplset.h.
References tSimplSet< CellT >::cells, tSimplSet< CellT >::dim(), and tSimplSet< CellT >::dimension.
Referenced by tSimplSet< CellT >::addDegenerate(), tSimplSet< CellT >::addFaces(), and operator>>().
|
inline |
Adds degenerate cells for all cells whose dimension falls within the given range, including minDim, up to but excluding maxDim.
Also adds degenerate cells for all the added cells, taking the dimension criterion into consideration. Returns the number of degenerate cells added.
Definition at line 290 of file simplset.h.
References tSimplSet< CellT >::add(), tSimplSet< CellT >::cells, tSimplSet< CellT >::dim(), and tSimplSet< CellT >::size().
|
inline |
Adds faces of all the cells of the given dimension.
Returns the number of faces added.
Definition at line 265 of file simplset.h.
References tSimplSet< CellT >::add(), tSimplSet< CellT >::cells, tSimplSet< CellT >::dim(), and tSimplSet< CellT >::size().
|
inline |
Adds faces of all the cells in the set.
Returns the number of faces added.
Definition at line 281 of file simplset.h.
References tSimplSet< CellT >::dim(), and tSimplSet< CellT >::dimension.
|
inline |
Adds 1 to the reference counter.
If in use, returns the number that indicates how many references to the object exist.
Definition at line 321 of file simplset.h.
References tSimplSet< CellT >::refCount.
|
inline |
Checks if a cell is in the complex.
Definition at line 238 of file simplset.h.
References tSimplSet< CellT >::cells.
|
inline |
Subtracts 1 from the reference counter.
If in use, returns the number that indicates how many references of the object remain.
Definition at line 328 of file simplset.h.
References tSimplSet< CellT >::refCount.
|
inline |
Returns the dimension of the highest-dimensional non-degenerate cell in the simplicial set, or -1 if none.
Definition at line 216 of file simplset.h.
References tSimplSet< CellT >::dimension.
Referenced by tSimplSet< CellT >::add(), tSimplSet< CellT >::addDegenerate(), tSimplSet< CellT >::addFaces(), and operator>>().
|
inline |
Returns the information on whether the complex is empty or not.
Definition at line 250 of file simplset.h.
References tSimplSet< CellT >::cells.
|
inline |
Finds a cell in the complex.
Returns its number or -1 if not found.
Definition at line 232 of file simplset.h.
References tSimplSet< CellT >::cells.
|
inline |
Normalizes the set of cells, that is, removes degenerate cells.
Note that the order and the numbers of cells may change. Returns the number of degenerate cells removed.
Definition at line 306 of file simplset.h.
References tSimplSet< CellT >::cells, and tSimplSet< CellT >::size().
|
inline |
The assignment operator.
Definition at line 166 of file simplset.h.
References tSimplSet< CellT >::cells, tSimplSet< CellT >::dimension, and tSimplSet< CellT >::refCount.
|
inline |
The equality operator.
Definition at line 194 of file simplset.h.
References tSimplSet< CellT >::cells.
|
inline |
Returns the given cell in the simplicial set.
Definition at line 256 of file simplset.h.
References tSimplSet< CellT >::cells, and tSimplSet< CellT >::size().
|
inline |
Returns the number of cells in the simplicial set.
Definition at line 244 of file simplset.h.
References tSimplSet< CellT >::cells.
Referenced by tSimplSet< CellT >::addDegenerate(), tSimplSet< CellT >::addFaces(), tSimplSet< CellT >::normalize(), operator<<(), and tSimplSet< CellT >::operator[]().
Swaps the data between two simplicial sets.
Definition at line 200 of file simplset.h.
References tSimplSet< CellT >::cells, tSimplSet< CellT >::dimension, and tSimplSet< CellT >::refCount.
|
private |
The set of all the cells in the complex.
Definition at line 137 of file simplset.h.
Referenced by tSimplSet< CellT >::add(), tSimplSet< CellT >::addDegenerate(), tSimplSet< CellT >::addFaces(), tSimplSet< CellT >::check(), tSimplSet< CellT >::empty(), tSimplSet< CellT >::getNumber(), tSimplSet< CellT >::normalize(), tSimplSet< CellT >::operator=(), tSimplSet< CellT >::operator==(), tSimplSet< CellT >::operator[](), tSimplSet< CellT >::size(), and tSimplSet< CellT >::swap().
|
private |
The highest dimension of a non-degenerate cell.
Definition at line 134 of file simplset.h.
Referenced by tSimplSet< CellT >::add(), tSimplSet< CellT >::addFaces(), tSimplSet< CellT >::dim(), tSimplSet< CellT >::operator=(), and tSimplSet< CellT >::swap().
|
private |
Reference counter.
If in use, keeps track on how many references to the object exist in the program. Note that if this value is > 0 then the "normalize" operation is not permitted, because it may change the order of cells in the array.
Definition at line 144 of file simplset.h.
Referenced by tSimplSet< CellT >::addRef(), tSimplSet< CellT >::delRef(), tSimplSet< CellT >::operator=(), tSimplSet< CellT >::swap(), and tSimplSet< CellT >::~tSimplSet().