#include <Grid.hxx>
Inheritance diagram for SeldonData::RegularGrid< 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 | |
RegularGrid () throw () | |
Default constructor. | |
RegularGrid (int length, int variable=0) throw () | |
Constructor. | |
RegularGrid (value_type start, value_type inc, int length, int variable=0) throw () | |
Constructor. | |
RegularGrid (const Array< value_type, 1 > &values, int variable=0) throw () | |
RegularGrid (const Grid< T > &G) throw () | |
Copy constructor. | |
RegularGrid (const RegularGrid< T > &G) throw () | |
Copy constructor for regular grids. | |
~RegularGrid () throw () | |
Destructor. | |
RegularGrid< T > & | operator= (const Grid< T > &) |
Affectation operator. | |
RegularGrid< T > & | operator= (const RegularGrid< T > &) |
Affectation operator for regular 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, 1 > & | GetArray () |
Returns a reference to the array storing points coordinates. | |
const Array< value_type, 1 > & | GetArray () const |
Returns a reference to the array storing points coordinates. | |
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) |
Returns a reference to the i-th element of the grid. | |
value_type | operator() (int i) const |
Returns the i-th element of the grid. | |
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. | |
template<class F> | |
void | Apply (F &function) |
Applies a given function on all elements. | |
template<class T0, class F> | |
void | Apply (RegularGrid< T0 > &, F &function) |
void | Print () const |
Displays grid values. | |
Protected Attributes | |
Array< value_type, 1 > | values_ |
Grid values. |
|
Default constructor. All is set to zero (including grid length). |
|
Constructor. Constructs a regular grid of length 'length', related to dimension 'dimension', with zero as initial point, and with one as increment.
|
|
Constructor. Constructs a regular grid of length 'length', related to dimension 'variable', with 'start' as initial point, and 'inc' as increment.
|
|
Copy constructor.
|
|
Copy constructor for regular grids.
|
|
|
|
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 grid length along dimension #i.
Reimplemented from SeldonData::Grid< T >. |
|
Returns grid length.
Reimplemented from SeldonData::Grid< T >. |
|
Returns the number of elements in the grid.
Reimplemented from SeldonData::Grid< T >. |
|
Returns the i-th element of the grid.
Reimplemented from SeldonData::Grid< T >. |
|
Returns a reference to the i-th element of the grid.
Reimplemented from SeldonData::Grid< T >. |
|
Affectation operator for regular grids.
|
|
Affectation operator.
Reimplemented from SeldonData::Grid< T >. |
|
Displays grid values. Displays "Regular grid:" followed by the dimension 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 >. |