#include <Grid.hxx>
Inheritance diagram for SeldonData::GeneralGrid< T, n >:
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 | |
GeneralGrid () throw () | |
Default constructor. | |
GeneralGrid (Array< value_type, n > &values, int variable, const TinyVector< int, n > &dependencies) throw () | |
GeneralGrid (const TinyVector< int, n > &values_shape, int variable, const TinyVector< int, n > &dependencies) throw () | |
Main constructor. | |
GeneralGrid (const GeneralGrid< T, n > &G) throw () | |
Copy constructor for general grids. | |
GeneralGrid (const Grid< T > &G) throw () | |
Copy constructor. | |
~GeneralGrid () throw () | |
Destructor. | |
GeneralGrid< T, n > & | operator= (const Grid< T > &) |
Affectation operator. | |
GeneralGrid< T, n > & | operator= (const GeneralGrid< T, n > &) |
Affectation operator for general grids. | |
int | GetLength () const |
Returns grid length. | |
int | GetLength (int i) const |
Returns grid length along dimension #i. | |
int | GetNbElements () const |
Returns the number of elements in the grid. | |
Array< value_type, n > & | GetArray () |
Returns a reference to the array storing points coordinates. | |
const Array< value_type, n > & | GetArray () const |
Returns a reference to the array storing points coordinates. | |
Array< int, 1 > & | GetDependencies () |
Returns a reference to dependencies array. | |
const Array< int, 1 > & | GetDependencies () const |
Returns a reference to dependencies array. | |
int | GetMainVariable () const |
bool | IsDependent (int i) const |
Returns whether the grid depends on a given dimension. | |
Grid< T > * | Duplicate () const |
Duplicates the grid and returns a pointer to the new copy. | |
Grid< T > * | Copy () |
Returns a pointer to a copy of the grid or to the grid itself. | |
reference | operator() (int i) |
Not defined. | |
value_type | operator() (int i) const |
Not defined. | |
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. | |
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. | |
void | ChangeCoordsInPlace (Function_Base< T > &f, Array< Grid< T > *, 1 > grids) |
Not defined. | |
template<class F> void | Apply (F &function) |
Applies a given function on all elements. | |
template<class T0, class F> void | Apply (GeneralGrid< T0, n > &, F &function) |
void | Print () const |
Displays grid values. | |
Protected Attributes | |
Array< value_type, n > | values_ |
Grid values. | |
Array< int, 1 > | dependencies_ |
Dimension upon which the grid depends. |
|
Default constructor. All is set to zero (including grid length). |
|
Main constructor. Constructs a general grid related to dimension 'variable'. The number of coordinates to be stored is provided through 'values_shape'. The number of elements of 'values' is the number 'n' of dimension upon which the grid depends. 'dependencies' gives upon which dimensions the grid depends. Notice that 'dependencies' must contain 'variable'.
|
|
Copy constructor for general grids.
|
|
Copy constructor.
|
|
|
|
Applies a given function on all elements.
|
|
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 from SeldonData::Grid< T >.
|
|
Duplicates the grid and returns a pointer to the new copy. After duplication, no memory is shared with the new grid.
Reimplemented from SeldonData::Grid< T >.
|
|
Returns a reference to the array storing points coordinates.
|
|
Returns a reference to the array storing points coordinates.
|
|
Returns a reference to dependencies array.
|
|
Returns a reference to dependencies array.
|
|
Returns grid length along dimension #i.
Reimplemented from SeldonData::Grid< T >.
|
|
Returns grid length.
Reimplemented from SeldonData::Grid< T >.
|
|
For instance, let the grid be related to direction z. If coordinate along z depends upon x and z, then the array storing coordinateds is a (Nx, Nz) matrix. If the "0-th dimension" of the matrix corresponds to x, then the "1-st dimension" is the dimension of the array corresponding to the dimension related to the grid (i.e. z). So, this function will return 1.
|
|
Returns the number of elements in the grid.
Reimplemented from SeldonData::Grid< T >.
|
|
Returns whether the grid depends on a given dimension.
Reimplemented from SeldonData::Grid< T >.
|
|
Affectation operator for general grids.
|
|
Affectation operator.
Reimplemented from SeldonData::Grid< T >.
|
|
Displays grid values. Displays "General grid:" followed by dimensions and the grid values. Reimplemented from SeldonData::Grid< T >.
|
|
Returns an element of the grid.
Reimplemented from SeldonData::Grid< T >.
|
|
Returns a reference to an element of the grid.
Reimplemented from SeldonData::Grid< T >.
|