KADATH
|
Version of the Index
class optimized for incremental access to Array components.
More...
#include <array_iterator.hpp>
Public Member Functions | |
Array_iterator (int ndim, int tndim) | |
Constructor. More... | |
Array_iterator (const Dim_array &dim) | |
Standard constructor. More... | |
int | get_ndim () const |
Returns the number of dimensions. More... | |
int | get_position () const |
Accessor for the value member. More... | |
bool | operator== (Array_iterator const &xx) const |
Comparison operator. More... | |
Array_iterator & | set_value (int _position) |
Set position. More... | |
Array_iterator & | set (Array_iterator const &_so) |
Set the position of the iterator at the same as the one of the source. More... | |
bool | check_value () |
Sylvain's stuff. More... | |
void | set_start () |
Sets the iterator at the start. More... | |
Dim_array const & | get_sizes () const |
Returns all the dimensions. More... | |
bool | inc (int increm, int var=0) |
Increments the position of the Array_iterator . More... | |
bool | inc1 (int var) |
Optimized unit increment with respect to the passed index number. More... | |
bool | inc () |
Optimized unit increment. More... | |
Protected Attributes | |
Dim_array | sizes |
Sizes of the associated Array . More... | |
Memory_mapped_array< int > | steps |
The incremental index step with respect to each dimensions. More... | |
int | position |
Corresponding value for 1D indexing . More... | |
Friends | |
template<class > | |
class | Array |
Version of the Index
class optimized for incremental access to Array components.
Definition at line 18 of file array_iterator.hpp.
|
inlineexplicit |
Constructor.
Definition at line 32 of file array_iterator.hpp.
References Kadath::Dim_array::set(), sizes, and steps.
|
inlineexplicit |
Standard constructor.
All the positions are set to zero.
dim | [input] Sizes in each dimensions. |
Definition at line 38 of file array_iterator.hpp.
References Kadath::Dim_array::get_ndim(), sizes, and steps.
|
inline |
|
inline |
Returns the number of dimensions.
Definition at line 46 of file array_iterator.hpp.
References Kadath::Dim_array::get_ndim(), and sizes.
|
inline |
Accessor for the value
member.
Definition at line 48 of file array_iterator.hpp.
References position.
|
inline |
|
inline |
Optimized unit increment.
true
while the last component index is not passed. Definition at line 86 of file array_iterator.hpp.
References check_value(), and position.
|
inline |
Increments the position of the Array_iterator
.
If one reaches the last point of a dimension, then the next one is increased.
increm | [input] value of the increment. |
var | [input] dimension to be incremented. |
false
if the result is outside the Array
and true
otherwise. Definition at line 75 of file array_iterator.hpp.
References check_value(), position, and steps.
|
inline |
Optimized unit increment with respect to the passed index number.
var | index number |
true
while the last component index is not passed. Definition at line 81 of file array_iterator.hpp.
References check_value(), position, and steps.
|
inline |
Comparison operator.
Definition at line 51 of file array_iterator.hpp.
References get_ndim(), and position.
|
inline |
Set the position of the iterator at the same as the one of the source.
_so | iterator to copy the position from. |
Definition at line 59 of file array_iterator.hpp.
References position.
|
inline |
Sets the iterator at the start.
Definition at line 63 of file array_iterator.hpp.
References position.
|
inline |
|
protected |
Corresponding value for 1D indexing .
Definition at line 28 of file array_iterator.hpp.
|
protected |
Sizes of the associated Array
.
When used with a Tensor
, it is the dimension, for each tensorial index.
Definition at line 25 of file array_iterator.hpp.
|
protected |
The incremental index step with respect to each dimensions.
Definition at line 27 of file array_iterator.hpp.