The Original CHomP Software
|
This class can be used for iterating a rectangular set of points, given its left and right bound. More...
#include <pointset.h>
Public Member Functions | |
tRectangle (const coordtype *_left=NULL, const coordtype *_right=NULL, int _dim=0) | |
The only possible constructor for new objects. More... | |
tRectangle (const tRectangle< coordtype > &r) | |
The copy constructor. More... | |
tRectangle & | operator= (const tRectangle< coordtype > &r) |
The assignment operator. More... | |
~tRectangle () | |
The destructor. More... | |
const coordtype * | get () |
Returns the next point in the recatngle. More... | |
void | reset () |
Resets the current point to the first one in the range. More... | |
Private Member Functions | |
void | initialize (const coordtype *_left=NULL, const coordtype *_right=NULL, int _dim=0) |
Initializes the internal data of an object of this class. More... | |
void | deallocate () |
Deallocates any memory previously allocated for this object. More... | |
Private Attributes | |
int | dim |
The dimension of the space. More... | |
const coordtype * | left |
A pointer to the left point (not allocated!). More... | |
const coordtype * | right |
A pointer to the right point (not allocated!). More... | |
coordtype * | point |
The coordinates of a created point. More... | |
int | firstpoint |
Should the 0 pointer be returned after the last point? More... | |
This class can be used for iterating a rectangular set of points, given its left and right bound.
The source points must exist all the time you use this structure for these points, because they are not copied, only the addresses of their coordinate tables are stored. Example: "rectangle ([0,0], [2,2], 2)" represents a set of four points: [0,0], [0,1], [1,0] and [1,1].
Definition at line 1626 of file pointset.h.
chomp::homology::tRectangle< coordtype >::tRectangle | ( | const coordtype * | _left = NULL , |
const coordtype * | _right = NULL , |
||
int | _dim = 0 |
||
) |
The only possible constructor for new objects.
Definition at line 1699 of file pointset.h.
chomp::homology::tRectangle< coordtype >::tRectangle | ( | const tRectangle< coordtype > & | r | ) |
The copy constructor.
Definition at line 1707 of file pointset.h.
chomp::homology::tRectangle< coordtype >::~tRectangle< coordtype > |
The destructor.
Definition at line 1722 of file pointset.h.
|
private |
Deallocates any memory previously allocated for this object.
Definition at line 1722 of file pointset.h.
const coordtype * chomp::homology::tRectangle< coordtype >::get |
Returns the next point in the recatngle.
If no more points are available then returns 0 and rewinds to the first point.
Definition at line 1746 of file pointset.h.
|
private |
Initializes the internal data of an object of this class.
Definition at line 1677 of file pointset.h.
tRectangle< coordtype > & chomp::homology::tRectangle< coordtype >::operator= | ( | const tRectangle< coordtype > & | r | ) |
The assignment operator.
Definition at line 1714 of file pointset.h.
void chomp::homology::tRectangle< coordtype >::reset | ( | void | ) |
Resets the current point to the first one in the range.
Definition at line 1737 of file pointset.h.
|
private |
The dimension of the space.
Definition at line 1651 of file pointset.h.
|
private |
Should the 0 pointer be returned after the last point?
Definition at line 1663 of file pointset.h.
|
private |
A pointer to the left point (not allocated!).
Definition at line 1654 of file pointset.h.
|
private |
The coordinates of a created point.
Definition at line 1660 of file pointset.h.
|
private |
A pointer to the right point (not allocated!).
Definition at line 1657 of file pointset.h.