35#ifndef _CHOMP_HOMOLOGY_TABULATE_H_
36#define _CHOMP_HOMOLOGY_TABULATE_H_
60 int read (
int dim,
const char *filename);
63 int write (
int dim,
const char *filename)
const;
71 int define (
int dim,
char *buffer);
78 static int get (
const char *table,
int_t bitnumber);
81 static void set (
char *table,
int_t bitnumber);
102 if ((dim <= 0) || (dim >=
maxdim))
115 if ((dim <= 0) || (dim >=
maxdim))
123 if (table [bitnumber >> 3] & (1 << (bitnumber & 0x07)))
131 table [bitnumber >> 3] |=
132 static_cast<char> (1 << (bitnumber & 0x07));
A class for storing tabulated configurations of neighbors for various dimensions.
int write(int dim, const char *filename) const
Writes tabulated configurations to a file.
int define(int dim, char *buffer)
Sets tabulated configuration bits to a given table.
int read(int dim, const char *filename)
Reads tabulated configurations from a file.
int compute(int dim)
Computes tabulated configurations for a specific dimension.
~Tabulated()
The destructor.
int size[maxdim]
The size of the table in bytes for each dimension.
const char * operator[](int dim) const
Retrieves the buffer allocated for the specific dimension or returns the null pointer if none.
Tabulated()
The default constructor.
bool deallocate[maxdim]
Should the configuration tables be deallocated?
char * tables[maxdim]
The tabulated configurations.
static const int maxdim
The strict upper bound for the supported dimensions.
static int get(const char *table, int_t bitnumber)
Retrieve the given bit from the given table.
static void set(char *table, int_t bitnumber)
Sets the given bit in the given table.
This file contains some precompiler definitions which indicate the operating system and/or compiler u...
int int_t
Index type for indexing arrays, counting cubes, etc.
Tabulated tabulated
The global instance of this class which stores tabulated configurations to use in the full cube reduc...
This namespace contains the entire CHomP library interface.
This file contains some useful functions related to the text input/output procedures.