#include <Grid.hxx>
Inheritance diagram for SeldonData::Grid< T >:
Public Types | |
typedef T | value_type |
typedef T * | pointer |
typedef const T * | const_pointer |
typedef T & | reference |
typedef const T & | const_reference |
Public Member Functions | |
Grid () throw () | |
Default constructor. | |
Grid (int length, int variable=0) throw () | |
Constructor. | |
Grid (const Grid &G) throw () | |
Copy constructor. | |
virtual | ~Grid () throw () |
Destructor. | |
virtual Grid< T > & | operator= (const Grid< T > &) |
Affectation operator. | |
virtual int | GetLength () const |
Returns grid length. | |
virtual int | GetLength (int i) const |
Returns grid length along dimension #i. | |
int | GetVariable () const |
Returns dimension number related to the grid. | |
virtual bool | IsDependent (int i) const |
Returns whether the grid depends on a given dimension. | |
virtual int | GetNbElements () const |
Returns the number of elements in the grid. | |
void | SetVariable (int variable) |
Sets the dimension to which the grid is related. | |
void | SetPointers (int pointers) |
Sets the number of pointers that point to the current grid. | |
int | GetPointers () const |
Returns the number of pointers that point to the current grid. | |
void | SetDuplicate (bool duplicate) |
Sets whether the grid should be duplicated in certain cases. | |
bool | GetDuplicate () const |
Should the grid be duplicated? | |
virtual Grid< T > * | Duplicate () const |
Duplicates the grid and returns a pointer to the new copy. | |
virtual Grid< T > * | Copy () |
Returns a pointer to a copy of the grid or to the grid itself. | |
virtual reference | operator() (int i) |
Returns a reference to the i-th element of the grid. | |
virtual value_type | operator() (int i) const |
Returns i-th element of the grid. | |
virtual reference | Value (int i0, int i1=-1, int i2=-1, int i3=-1, int i4=-1, int i5=-1, int i6=-1, int i7=-1, int i8=-1, int i9=-1) |
Returns a reference to an element of the grid. | |
virtual value_type | Value (int i0, int i1=-1, int i2=-1, int i3=-1, int i4=-1, int i5=-1, int i6=-1, int i7=-1, int i8=-1, int i9=-1) const |
Returns an element of the grid. | |
virtual void | ChangeCoordsInPlace (Function_Base< T > &f, Array< Grid< T > *, 1 > grids) |
Coordinate transformation "in place". | |
virtual void | Print () const |
Displays grid values. | |
Protected Attributes | |
int | length_ |
Length of the grid. | |
int | variable_ |
Dimension related to the grid. | |
bool | duplicate_ |
int | pointers_ |
How many pointers to the current grid. | |
value_type | zero_ |
Zero. |
|
Default constructor. All is set to zero (including grid length). |
|
Constructor.
|
|
Copy constructor.
|
|
Coordinate transformation "in place". Function f takes as inputs all coordinates and transforms those coordinates. This transformation is performed in place because function f works directly on its inputs.
Reimplemented in SeldonData::GeneralGrid< T, n >.
|
|
Returns a pointer to a copy of the grid or to the grid itself. After copy, no memory is shared with the new grid if 'duplicate_' is set to true. Otherwise, the new grid is the same as the current grid, and the returned pointer is the 'this'.
Reimplemented in SeldonData::RegularGrid< T >, and SeldonData::GeneralGrid< T, n >.
|
|
Duplicates the grid and returns a pointer to the new copy. After duplication, no memory is shared with the new grid.
Reimplemented in SeldonData::RegularGrid< T >, and SeldonData::GeneralGrid< T, n >.
|
|
Should the grid be duplicated? When an instance of 'Data' is created, one may want to duplicate the grid or not (if two instances of 'Data' should share a given grid).
|
|
Returns grid length along dimension #i.
Reimplemented in SeldonData::RegularGrid< T >, and SeldonData::GeneralGrid< T, n >.
|
|
Returns grid length.
Reimplemented in SeldonData::RegularGrid< T >, and SeldonData::GeneralGrid< T, n >.
|
|
Returns the number of elements in the grid.
Reimplemented in SeldonData::RegularGrid< T >, and SeldonData::GeneralGrid< T, n >.
|
|
Returns the number of pointers that point to the current grid.
|
|
Returns dimension number related to the grid.
|
|
Returns whether the grid depends on a given dimension.
Reimplemented in SeldonData::GeneralGrid< T, n >.
|
|
Returns i-th element of the grid.
Reimplemented in SeldonData::RegularGrid< T >, and SeldonData::GeneralGrid< T, n >.
|
|
Returns a reference to the i-th element of the grid.
Reimplemented in SeldonData::RegularGrid< T >, and SeldonData::GeneralGrid< T, n >.
|
|
Affectation operator.
Reimplemented in SeldonData::RegularGrid< T >, and SeldonData::GeneralGrid< T, n >.
|
|
Displays grid values. Displays "Empty grid.". Reimplemented in SeldonData::RegularGrid< T >, and SeldonData::GeneralGrid< T, n >.
|
|
Sets whether the grid should be duplicated in certain cases.
|
|
Sets the number of pointers that point to the current grid.
|
|
Sets the dimension to which the grid is related. A grid is used to store coordinates along a given dimension. The function sets this dimension.
|
|
Returns an element of the grid.
Reimplemented in SeldonData::RegularGrid< T >, and SeldonData::GeneralGrid< T, n >.
|
|
Returns a reference to an element of the grid.
Reimplemented in SeldonData::RegularGrid< T >, and SeldonData::GeneralGrid< T, n >.
|
|
When copying the grid, should grid values be duplicated? |