This class stores a full cubical set and implements some basic operations on such a set, like adding or removing cubes with given coordinates. More...
#include <cubiset.h>
Public Member Functions | |
CubicalSet (const int *left_coords, const int *right_coords, int dim=EMBEDDING_DIM, const int *space_wrapping=0) | |
The only constructor allowed: Creates an empty cubical bitmap of the given size. | |
~CubicalSet () | |
The destructor. | |
CubicalSet (const CubicalSet &c) | |
The copy constructor. | |
CubicalSet & | operator= (const CubicalSet &c) |
The assignment operator. | |
void | ComputeBettiNumbers (int *result, const char *engine=0, bool quiet=false) const |
Computes the Betti numbers of the cubical set. | |
int | Add (const int *coords) |
Adds a cube to the set unless the cube is outside the box. | |
int | Delete (const int *coords) |
Deletes a cube from the set. | |
bool | Contains (const int *coords) const |
Verifies whether the given cube is contained in the cubical set. | |
void | Clear () |
Clears the bitmap and makes the cubical set empty. | |
Private Member Functions | |
int | ByteOffset (const int *coords) const |
Computes the right word offset in the buffer. | |
int | BitMask (const int *coords) const |
Computes the mask for the bit in the right word. | |
bool | Inside (const int *coords) |
Verifies whether the cube is within the bounding box. | |
Private Attributes | |
unsigned char * | buffer |
The binary buffer for storing the cubes. | |
int | bufsize |
The actual size of the buffer. | |
int | dim |
The dimension of the embedding space. | |
int * | sizes |
The sizes of the binary data in the buffer. | |
int * | minimal |
The coordinates of the minimal vertex of the buffer box. | |
int * | wrapping |
The space wrapping in each direction, if defined. |
This class stores a full cubical set and implements some basic operations on such a set, like adding or removing cubes with given coordinates.
Definition at line 39 of file cubiset.h.
unsigned char* CubicalSet::buffer [private] |
The binary buffer for storing the cubes.
Definition at line 87 of file cubiset.h.
Referenced by Add(), Clear(), ComputeBettiNumbers(), Contains(), CubicalSet(), Delete(), operator=(), and ~CubicalSet().
int CubicalSet::bufsize [private] |
The actual size of the buffer.
Definition at line 90 of file cubiset.h.
Referenced by Clear(), CubicalSet(), and operator=().
int CubicalSet::dim [private] |
The dimension of the embedding space.
Definition at line 93 of file cubiset.h.
Referenced by ByteOffset(), ComputeBettiNumbers(), CubicalSet(), Inside(), and operator=().
int* CubicalSet::minimal [private] |
The coordinates of the minimal vertex of the buffer box.
Definition at line 99 of file cubiset.h.
Referenced by BitMask(), ByteOffset(), CubicalSet(), Inside(), operator=(), and ~CubicalSet().
int* CubicalSet::sizes [private] |
The sizes of the binary data in the buffer.
Definition at line 96 of file cubiset.h.
Referenced by ByteOffset(), ComputeBettiNumbers(), CubicalSet(), Inside(), operator=(), and ~CubicalSet().
int* CubicalSet::wrapping [private] |
The space wrapping in each direction, if defined.
Definition at line 102 of file cubiset.h.
Referenced by ComputeBettiNumbers(), CubicalSet(), and ~CubicalSet().