The Original CHomP Software
|
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. More... | |
~CubicalSet () | |
The destructor. More... | |
CubicalSet (const CubicalSet &c) | |
The copy constructor. More... | |
CubicalSet & | operator= (const CubicalSet &c) |
The assignment operator. More... | |
void | ComputeBettiNumbers (int *result, const char *engine=0, bool quiet=false) const |
Computes the Betti numbers of the cubical set. More... | |
int | Add (const int *coords) |
Adds a cube to the set unless the cube is outside the box. More... | |
int | Delete (const int *coords) |
Deletes a cube from the set. More... | |
bool | Contains (const int *coords) const |
Verifies whether the given cube is contained in the cubical set. More... | |
void | Clear () |
Clears the bitmap and makes the cubical set empty. More... | |
Private Member Functions | |
int | ByteOffset (const int *coords) const |
Computes the right word offset in the buffer. More... | |
int | BitMask (const int *coords) const |
Computes the mask for the bit in the right word. More... | |
bool | Inside (const int *coords) |
Verifies whether the cube is within the bounding box. More... | |
Private Attributes | |
unsigned char * | buffer |
The binary buffer for storing the cubes. More... | |
int | bufsize |
The actual size of the buffer. More... | |
int | dim |
The dimension of the embedding space. More... | |
int * | sizes |
The sizes of the binary data in the buffer. More... | |
int * | minimal |
The coordinates of the minimal vertex of the buffer box. More... | |
int * | wrapping |
The space wrapping in each direction, if defined. More... | |
This class stores a full cubical set and implements some basic operations on such a set, like adding or removing cubes with given coordinates.
|
private |
The binary buffer for storing the cubes.
Definition at line 97 of file cubiset.h.
Referenced by Add(), Clear(), ComputeBettiNumbers(), Contains(), CubicalSet(), Delete(), operator=(), and ~CubicalSet().
|
private |
The actual size of the buffer.
Definition at line 100 of file cubiset.h.
Referenced by Clear(), CubicalSet(), and operator=().
|
private |
The dimension of the embedding space.
Definition at line 103 of file cubiset.h.
Referenced by ByteOffset(), ComputeBettiNumbers(), CubicalSet(), Inside(), and operator=().
|
private |
The coordinates of the minimal vertex of the buffer box.
Definition at line 109 of file cubiset.h.
Referenced by BitMask(), ByteOffset(), CubicalSet(), Inside(), operator=(), and ~CubicalSet().
|
private |
The sizes of the binary data in the buffer.
Definition at line 106 of file cubiset.h.
Referenced by ByteOffset(), ComputeBettiNumbers(), CubicalSet(), Inside(), operator=(), and ~CubicalSet().
|
private |
The space wrapping in each direction, if defined.
Definition at line 112 of file cubiset.h.
Referenced by ComputeBettiNumbers(), CubicalSet(), and ~CubicalSet().