The ChainCon Software (Release 0.03)
Public Types | Public Member Functions | Private Attributes | List of all members
tFilteredComplex< CellT > Class Template Reference

A filtered complex. More...

#include <filtcomplex.h>

Public Types

typedef CellT CellType
 The type of cells in the filtered complex. More...
 
typedef CellT value_type
 The type of elements in the filtered complex perceived as a standard-type aggregate. More...
 

Public Member Functions

 tFilteredComplex ()
 The default constructor. 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 size of the complex. 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 complex in the reversed order. More...
 
void swap (tFilteredComplex< CellT > &fc)
 Swaps the data with another filtered complex. More...
 

Private Attributes

chomp::homology::hashedset< CellT > cells
 The set of all the cells in the complex in the right order. More...
 

Detailed Description

template<class CellT>
class tFilteredComplex< CellT >

A filtered complex.

Cells must be added to this complex in an order that ensures that any cell that appears in the boundary of another cell is added AFTER that cell. Contains a method for generating the boundaries of all the cells that were previously added to the complex. Then the cells can be accessed in the reversed order using operator [].

Definition at line 53 of file filtcomplex.h.

Member Typedef Documentation

◆ CellType

template<class CellT>
typedef CellT tFilteredComplex< CellT >::CellType

The type of cells in the filtered complex.

Definition at line 57 of file filtcomplex.h.

◆ value_type

template<class CellT>
typedef CellT tFilteredComplex< CellT >::value_type

The type of elements in the filtered complex perceived as a standard-type aggregate.

Definition at line 61 of file filtcomplex.h.

Constructor & Destructor Documentation

◆ tFilteredComplex()

template<class CellT >
tFilteredComplex< CellT >::tFilteredComplex ( )
inline

The default constructor.

Definition at line 98 of file filtcomplex.h.

Member Function Documentation

◆ add()

template<class CellT >
int_t tFilteredComplex< CellT >::add ( const CellT &  c)
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 105 of file filtcomplex.h.

References tFilteredComplex< CellT >::cells.

Referenced by operator>>().

◆ check()

template<class CellT >
bool tFilteredComplex< CellT >::check ( const CellT &  c) const
inline

Checks if a cell is in the complex.

Definition at line 118 of file filtcomplex.h.

References tFilteredComplex< CellT >::cells.

◆ empty()

template<class CellT >
bool tFilteredComplex< CellT >::empty ( ) const
inline

Returns the information on whether the complex is empty or not.

Definition at line 130 of file filtcomplex.h.

References tFilteredComplex< CellT >::cells.

◆ getNumber()

template<class CellT >
int_t tFilteredComplex< CellT >::getNumber ( const CellT &  c) const
inline

Finds a cell in the complex.

Returns its number or -1 if not found.

Definition at line 111 of file filtcomplex.h.

References tFilteredComplex< CellT >::cells, and tFilteredComplex< CellT >::size().

◆ operator[]()

template<class CellT >
const CellT & tFilteredComplex< CellT >::operator[] ( int_t  n) const
inline

Returns the given cell in the complex in the reversed order.

Definition at line 136 of file filtcomplex.h.

References tFilteredComplex< CellT >::cells, and tFilteredComplex< CellT >::size().

◆ size()

template<class CellT >
int_t tFilteredComplex< CellT >::size ( ) const
inline

Returns the size of the complex.

Definition at line 124 of file filtcomplex.h.

References tFilteredComplex< CellT >::cells.

Referenced by tFilteredComplex< CellT >::getNumber(), operator<<(), and tFilteredComplex< CellT >::operator[]().

◆ swap()

template<class CellT >
void tFilteredComplex< CellT >::swap ( tFilteredComplex< CellT > &  fc)
inline

Swaps the data with another filtered complex.

Definition at line 145 of file filtcomplex.h.

References tFilteredComplex< CellT >::cells.

Member Data Documentation

◆ cells

template<class CellT>
chomp::homology::hashedset<CellT> tFilteredComplex< CellT >::cells
private

The documentation for this class was generated from the following file: