The Original CHomP Software
|
This class represents a set of points in R^n with integer coordinates. More...
#include <pointset.h>
Public Types | |
typedef coordtype | CoordType |
The type of coordinates. More... | |
Public Member Functions | |
tPointset (int_t initialsize=0, int bequiet=1) | |
Default constructor for a set of points with the initial size of the set defined here if an upper bound for the size of the set is known and thus it is smart to allocate less memory. More... | |
tPointset (const tPointset< coordtype > &p) | |
The copy constructor. More... | |
tPointset & | operator= (const tPointset< coordtype > &p) |
The assignment operator. More... | |
~tPointset () | |
The destructor. More... | |
int | dimension (int d) |
Sets the dimension of points. More... | |
int | dimension () const |
Returns the dimension of points. More... | |
double * | gridsize (double *g=0) |
Gets or sets the size of the grid in R^n. More... | |
double * | gridsize (double g) |
Sets the grid size (if the same in all the directions). More... | |
double * | gridsize (int direction, double g) |
Sets the grid size in one particular direction. More... | |
const coordtype * | wrapspace (const coordtype *w=NULL) |
const coordtype * | wrapspace (coordtype w) |
const coordtype * | wrapspace (int direction, coordtype w) |
int | check (int_t n) const |
int | check (const coordtype *c) const |
int | checkRounded (const double *c) const |
int_t | getnumber (const coordtype *c) const |
int_t | getnumberRounded (const double *c) const |
coordtype * | operator[] (int_t n) const |
coordtype * | getpoint (int_t n) const |
coordtype * | getpoint (coordtype *c) const |
coordtype * | getpointRounded (double *c) const |
coordtype * | getpointMiddle (int_t n, double *c) const |
int_t | add (const coordtype *c) |
int_t | addRounded (double *c) |
tPointset & | add (const tPointset< coordtype > &p) |
int | remove (int_t n) |
int | remove (const coordtype *c) |
int | removeRounded (const double *c) |
int | remove (const tPointset< coordtype > &p) |
int_t | size () const |
Returns the number of points in the set. More... | |
bool | empty () const |
Returns true if and only if the set of points is empty. More... | |
int_t | gethashsize () const |
void | swap (tPointset< coordtype > &other) |
Swaps the data with another object of the same type. More... | |
Static Public Member Functions | |
static int | defaultdimension (int d=0) |
Sets or gets the default dimension of points. More... | |
Public Attributes | |
int | quiet |
Returns the number of points by simply projecting the set onto an integer number. More... | |
psethashstat * | stat |
coordtype * | minimal |
coordtype * | maximal |
int | wereremoved |
Protected Member Functions | |
void | initialize (int_t initialsize, int bequiet) |
void | deallocate () |
int_t | hashfindpoint (const coordtype *c, int_t *addposition=NULL, int wrapped=0) const |
void | rehash (int_t newsize=0) |
Protected Attributes | |
int | dim |
int_t | npoints |
int_t | ntables |
int | tablepoints |
coordtype ** | tables |
double * | grid |
coordtype * | wrap |
coordtype * | temp |
int_t | hashsize |
int_t | hashcleared |
int_t * | hashtable |
unsigned | initsize |
Static Protected Attributes | |
static int | defaultdim = 0 |
static double * | defaultgrid = NULL |
static coordtype * | defaultwrap = NULL |
This class represents a set of points in R^n with integer coordinates.
Definition at line 481 of file pointset.h.
typedef coordtype chomp::homology::tPointset< coordtype >::CoordType |
The type of coordinates.
Definition at line 485 of file pointset.h.
|
inline |
Default constructor for a set of points with the initial size of the set defined here if an upper bound for the size of the set is known and thus it is smart to allocate less memory.
If dimension, grid size and space wrapping was defined for any pointset, these values are automatically copied to all the pointsets created further (until changed).
Definition at line 1223 of file pointset.h.
|
inline |
The copy constructor.
Definition at line 1230 of file pointset.h.
|
inline |
The destructor.
Definition at line 1276 of file pointset.h.
|
inline |
Definition at line 1047 of file pointset.h.
References chomp::homology::copycoord(), and chomp::homology::wrapcoord().
|
inline |
|
inline |
Definition at line 1150 of file pointset.h.
References chomp::homology::roundpoint().
|
inline |
Definition at line 1327 of file pointset.h.
|
inline |
Definition at line 1321 of file pointset.h.
|
inline |
Definition at line 1333 of file pointset.h.
|
inlineprotected |
Definition at line 1238 of file pointset.h.
|
inlinestatic |
Sets or gets the default dimension of points.
Definition at line 699 of file pointset.h.
|
inline |
Returns the dimension of points.
Definition at line 891 of file pointset.h.
|
inline |
Sets the dimension of points.
Definition at line 857 of file pointset.h.
|
inline |
Returns true if and only if the set of points is empty.
Definition at line 903 of file pointset.h.
|
inline |
Definition at line 1435 of file pointset.h.
|
inline |
Definition at line 1295 of file pointset.h.
|
inline |
Definition at line 1309 of file pointset.h.
References chomp::homology::roundpoint().
|
inline |
Definition at line 1345 of file pointset.h.
|
inline |
Definition at line 1339 of file pointset.h.
|
inline |
Definition at line 1357 of file pointset.h.
|
inline |
Definition at line 1351 of file pointset.h.
|
inline |
Gets or sets the size of the grid in R^n.
Definition at line 775 of file pointset.h.
|
inline |
Sets the grid size (if the same in all the directions).
Definition at line 764 of file pointset.h.
|
inline |
Sets the grid size in one particular direction.
Definition at line 724 of file pointset.h.
|
inlineprotected |
Definition at line 949 of file pointset.h.
References chomp::homology::pointhashadd(), chomp::homology::pointhashkey(), chomp::homology::thesame(), and chomp::homology::wrapcoord().
|
inlineprotected |
Definition at line 1175 of file pointset.h.
|
inline |
The assignment operator.
Definition at line 1276 of file pointset.h.
|
inline |
Definition at line 940 of file pointset.h.
|
inlineprotected |
Definition at line 991 of file pointset.h.
References chomp::homology::ceilprimenumber(), and chomp::homology::sout.
|
inline |
Definition at line 1414 of file pointset.h.
|
inline |
|
inline |
Definition at line 1370 of file pointset.h.
References chomp::homology::copycoord().
|
inline |
Definition at line 1420 of file pointset.h.
|
inline |
Returns the number of points in the set.
Definition at line 897 of file pointset.h.
|
inline |
Swaps the data with another object of the same type.
Definition at line 909 of file pointset.h.
References chomp::multiwork::swap().
|
inline |
Definition at line 842 of file pointset.h.
|
inline |
Definition at line 831 of file pointset.h.
|
inline |
Definition at line 790 of file pointset.h.
|
staticprotected |
Definition at line 648 of file pointset.h.
|
staticprotected |
Definition at line 649 of file pointset.h.
|
staticprotected |
Definition at line 650 of file pointset.h.
|
protected |
Definition at line 622 of file pointset.h.
|
protected |
Definition at line 638 of file pointset.h.
|
protected |
Definition at line 663 of file pointset.h.
|
protected |
Definition at line 660 of file pointset.h.
|
protected |
Definition at line 666 of file pointset.h.
|
protected |
Definition at line 669 of file pointset.h.
coordtype * chomp::homology::tPointset< coordtype >::maximal |
Definition at line 608 of file pointset.h.
coordtype* chomp::homology::tPointset< coordtype >::minimal |
Definition at line 608 of file pointset.h.
|
protected |
Definition at line 625 of file pointset.h.
|
protected |
Definition at line 628 of file pointset.h.
int chomp::homology::tPointset< coordtype >::quiet |
Returns the number of points by simply projecting the set onto an integer number.
WARNING: This function is DEPRECATED! Use the functions "size" and "empty" instead.
Definition at line 593 of file pointset.h.
psethashstat* chomp::homology::tPointset< coordtype >::stat |
Definition at line 605 of file pointset.h.
|
protected |
Definition at line 631 of file pointset.h.
|
protected |
Definition at line 635 of file pointset.h.
|
protected |
Definition at line 645 of file pointset.h.
int chomp::homology::tPointset< coordtype >::wereremoved |
Definition at line 614 of file pointset.h.
|
protected |
Definition at line 641 of file pointset.h.