The Original CHomP Software
|
This class defines a simple table of bit fields with very limited functionality that is used for storing the information on the verified combinations of cubes' neighbors. More...
#include <known.h>
Public Member Functions | |
BitFields () | |
The default constructor. More... | |
~BitFields () | |
The destructor. More... | |
void | setkblimit (int limit=-1, int dim=-1) |
Sets the limit for the number of kilobytes used for BitFields. More... | |
int | getkblimit (int dim=0) const |
Returns the current limit for the given dimension. More... | |
SetOfBitFields * | operator[] (int dim) |
Returns the corresponding bit field set and allocates it if not used so far. More... | |
void | forget (int dim=-1) |
Forgets the given bit field set or all the sets. More... | |
Private Member Functions | |
void | extend (int n) |
Extends the table to the given length if necessary. More... | |
void | allocate (int dim) |
Allocates the specific bit field set. More... | |
Private Attributes | |
SetOfBitFields ** | tab |
The table of bit field sets for each dimension. More... | |
int | len |
The length of the currently allocated table. More... | |
int * | maxkb |
The memory limit for each table (in kilobytes), -1 for none. More... | |
This class defines a simple table of bit fields with very limited functionality that is used for storing the information on the verified combinations of cubes' neighbors.
|
inline |
The default constructor.
Definition at line 98 of file known.h.
chomp::homology::BitFields::~BitFields | ( | ) |
The destructor.
|
private |
Allocates the specific bit field set.
Referenced by operator[]().
|
private |
Extends the table to the given length if necessary.
Referenced by operator[]().
void chomp::homology::BitFields::forget | ( | int | dim = -1 | ) |
Forgets the given bit field set or all the sets.
int chomp::homology::BitFields::getkblimit | ( | int | dim = 0 | ) | const |
Returns the current limit for the given dimension.
|
inline |
Returns the corresponding bit field set and allocates it if not used so far.
If no bit field set is in use, returns 0.
Definition at line 106 of file known.h.
References allocate(), extend(), len, maxkb, and tab.
void chomp::homology::BitFields::setkblimit | ( | int | limit = -1 , |
int | dim = -1 |
||
) |
Sets the limit for the number of kilobytes used for BitFields.
The limit applied to dimension < 0 is copied to all the others and can be retrieved as the limit for dimension 0. The limit for dim. 0 is the default if not defined otherwise.
|
private |
The length of the currently allocated table.
Definition at line 83 of file known.h.
Referenced by BitFields(), and operator[]().
|
private |
The memory limit for each table (in kilobytes), -1 for none.
Definition at line 86 of file known.h.
Referenced by BitFields(), and operator[]().
|
private |
The table of bit field sets for each dimension.
Definition at line 80 of file known.h.
Referenced by BitFields(), and operator[]().