SLIP  1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | List of all members
slip::const_component_iterator3d_range< MultiComponentContainer3d, N > Class Template Reference

This is some iterator to iterate a 3d container into two Range defined by the indices and strides of the 3d container. More...

#include <component_iterator3d_range.hpp>

Public Types

typedef
std::random_access_iterator3d_tag 
iterator_category
 
typedef
MultiComponentContainer3d::value_type 
Block
 
typedef Block::value_type value_type
 
typedef DPoint3d< int > difference_type
 
typedef value_type const * pointer
 
typedef value_type const & reference
 
typedef
const_component_iterator3d_range 
self
 
typedef
MultiComponentContainer3d::size_type 
size_type
 

Public Member Functions

reference operator* () const
 Dereference operator. Returns the element that the current const_component_iterator3d_range i point to. More...
 
pointer operator-> () const
 
Constructors & Destructors
 const_component_iterator3d_range ()
 Constructs a const_component_iterator3d_range. More...
 
 const_component_iterator3d_range (MultiComponentContainer3d *c, std::size_t cp, const slip::Range< int > &r1, const slip::Range< int > &r2, const slip::Range< int > &r3)
 Constructs a const_component_iterator3d_range. More...
 
 const_component_iterator3d_range (const self &o)
 Constructs a copy of the const_component_iterator3d_range o. More...
 
Assignment operators and methods
selfoperator= (const self &o)
 Assign a const_component_iterator3d_range. More...
 
Forward operators addons
selfoperator++ ()
 Preincrement a const_component_iterator3d_range. Iterate to the next location inside the Range. More...
 
self operator++ (int)
 Postincrement a const_component_iterator3d_range. Iterate to the next location inside the Range3d. More...
 
Bidirectional operators addons
selfoperator-- ()
 Predecrement a const_component_iterator3d_range. Iterate to the previous location inside the Range3d. More...
 
self operator-- (int)
 Postdecrement a const_component_iterator3d_range. Iterate to the previous location inside the Range3d. More...
 
Indices accessors
int x1 () const
 Access to the first index of the current const_component_iterator3d_range. More...
 
int k () const
 Access to the first index of the current const_component_iterator3d_range. More...
 
int x2 () const
 Access to the second index of the current const_component_iterator3d_range. More...
 
int i () const
 Access to the second index of the current const_component_iterator3d_range. More...
 
int x3 () const
 Access to the third index of the current const_component_iterator3d_range. More...
 
int j () const
 Access to the third index of the current const_component_iterator3d_range. More...
 
int cp () const
 Access to the component index of the current const_component_iterator3d_box. More...
 

Friends

Equality comparable operators
bool operator== (const self &i1, const self &i2)
 Equality operator. More...
 
bool operator!= (const self &i1, const self &i2)
 Inequality operator. More...
 
Strict Weakly comparable operators
bool operator< (const self &i1, const self &i2)
 < operator. More...
 
bool operator> (const self &i1, const self &i2)
 

operator.

More...
 
bool operator<= (const self &i1, const self &i2)
 <= operator. More...
 
bool operator>= (const self &i1, const self &i2)
 >= operator. More...
 

const_component_iterator3d_range operators addons

selfoperator+= (const difference_type &d)
 const_component_iterator3d_range addition. More...
 
selfoperator-= (const difference_type &d)
 const_component_iterator3d_range substraction. More...
 
self operator+ (const difference_type &d)
 const_component_iterator3d_range addition. More...
 
self operator- (const difference_type &d)
 const_component_iterator3d_range substraction. More...
 
reference operator[] (difference_type d) const
 const_component_iterator3d_range element assignment operator. Equivalent to *(i + d). More...
 
MultiComponentContainer3d::const_component_slice_range_iterator slice_begin (size_type row, size_type col) const
 const_component_iterator3d_range element assignment operator. More...
 
MultiComponentContainer3d::const_component_slice_range_iterator slice_end (size_type row, size_type col) const
 const_component_iterator3d_range element assignment operator. More...
 
MultiComponentContainer3d::const_component_row_range_iterator row_begin (size_type slice, size_type row) const
 const_component_iterator3d_range element assignment operator. More...
 
MultiComponentContainer3d::const_component_row_range_iterator row_end (size_type slice, size_type row) const
 const_component_iterator3d_range element assignment operator. More...
 
MultiComponentContainer3d::const_component_col_range_iterator col_begin (size_type slice, size_type col) const
 const_component_iterator3d_range element assignment operator. More...
 
MultiComponentContainer3d::const_component_col_range_iterator col_end (size_type slice, size_type col) const
 const_component_iterator3d_range element assignment operator. More...
 
difference_type operator- (const self &i1, const self &i2)
 const_component_iterator3d_range difference operator. More...
 

Detailed Description

template<class MultiComponentContainer3d, std::size_t N>
class slip::const_component_iterator3d_range< MultiComponentContainer3d, N >

This is some iterator to iterate a 3d container into two Range defined by the indices and strides of the 3d container.

Author
Denis Arrivault <denis.arrivault_AT_inria.fr>
Version
Fluex 1.0
Date
2013/07/18
Parameters
MultiComponentContainer3dType of 3d container in the const_component_iterator3d_range
Nnumber of elements in one block
This iterator is an 3d extension of the random_access_iterator.
It is compatible with the bidirectional_iterator of the Standard library. It iterate into a range area defined inside the indices range of the 3d container. Those indices are defined as follows :
iterator3d_conventions.jpg
axis and notation conventions

Definition at line 758 of file component_iterator3d_range.hpp.

Member Typedef Documentation

template<class MultiComponentContainer3d , std::size_t N>
typedef MultiComponentContainer3d::value_type slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::Block

Definition at line 763 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
typedef DPoint3d<int> slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::difference_type

Definition at line 765 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
typedef std::random_access_iterator3d_tag slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::iterator_category

Definition at line 762 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
typedef value_type const* slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::pointer

Definition at line 766 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
typedef value_type const& slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::reference

Definition at line 767 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
typedef const_component_iterator3d_range slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::self

Definition at line 769 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
typedef MultiComponentContainer3d::size_type slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::size_type

Definition at line 771 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
typedef Block::value_type slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::value_type

Definition at line 764 of file component_iterator3d_range.hpp.

Constructor & Destructor Documentation

template<class MultiComponentContainer3d , std::size_t N>
slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::const_component_iterator3d_range ( )
inline

Constructs a const_component_iterator3d_range.

The range to iterate is in this case the full container

Definition at line 781 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::const_component_iterator3d_range ( MultiComponentContainer3d *  c,
std::size_t  cp,
const slip::Range< int > &  r1,
const slip::Range< int > &  r2,
const slip::Range< int > &  r3 
)
inline

Constructs a const_component_iterator3d_range.

Parameters
cpointer to an existing 3d container
r1Range<int> defining the range of indices of the first axis to iterate
r2Range<int> defining the range of indices of the second axis to iterate
r3Range<int> defining the range of indices of the third axis to iterate
Precondition
range indices must be inside those of the 3d container

Definition at line 796 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::const_component_iterator3d_range ( const self o)
inline

Constructs a copy of the const_component_iterator3d_range o.

Parameters
oconst_component_iterator3d_range to copy.

Definition at line 813 of file component_iterator3d_range.hpp.

Member Function Documentation

template<class MultiComponentContainer3d , std::size_t N>
MultiComponentContainer3d::const_component_col_range_iterator slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::col_begin ( size_type  slice,
size_type  col 
) const
inline

const_component_iterator3d_range element assignment operator.

Parameters
sliceoffset.
rowoffset.
Returns
a const_range_col_iterator to the first element of range at the slice slice of the slice range and at the col col of the col range

Definition at line 1275 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
MultiComponentContainer3d::const_component_col_range_iterator slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::col_end ( size_type  slice,
size_type  col 
) const
inline

const_component_iterator3d_range element assignment operator.

Parameters
sliceoffset.
rowoffset.
Returns
a const_range_col_iterator to the past-the-end element of range at the slice slice of the slice range and at the col col of the col range

Definition at line 1290 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
int slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::cp ( ) const
inline

Access to the component index of the current const_component_iterator3d_box.

Returns
the component index

Definition at line 1364 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
int slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::i ( ) const
inline

Access to the second index of the current const_component_iterator3d_range.

Returns
the second index.

Definition at line 1336 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
int slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::j ( ) const
inline

Access to the third index of the current const_component_iterator3d_range.

Returns
the third index.

Definition at line 1354 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
int slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::k ( ) const
inline

Access to the first index of the current const_component_iterator3d_range.

Returns
the first index.

Definition at line 1317 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
reference slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::operator* ( ) const
inline

Dereference operator. Returns the element that the current const_component_iterator3d_range i point to.

Returns
a const const_component_iterator3d_range reference.

Definition at line 858 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
self slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::operator+ ( const difference_type d)
inline

const_component_iterator3d_range addition.

Parameters
ddifference_type
Returns
a const_component_iterator3d_range reference
Precondition
All the iterators between the current iterator i and i + d must be dereferenceable.

Definition at line 1142 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
self& slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::operator++ ( )
inline

Preincrement a const_component_iterator3d_range. Iterate to the next location inside the Range.

Definition at line 882 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
self slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::operator++ ( int  )
inline

Postincrement a const_component_iterator3d_range. Iterate to the next location inside the Range3d.

Definition at line 921 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
self& slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::operator+= ( const difference_type d)
inline

const_component_iterator3d_range addition.

Parameters
ddifference_type
Returns
a const_component_iterator3d_range reference
Precondition
All the iterators between the current iterator i and i + d must be dereferenceable.

Definition at line 1104 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
self slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::operator- ( const difference_type d)
inline

const_component_iterator3d_range substraction.

Parameters
ddifference_type
Returns
a const_component_iterator3d_range reference
Precondition
All the iterators between the current iterator i and i - d must be dereferenceable.

Definition at line 1157 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
self& slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::operator-- ( )
inline

Predecrement a const_component_iterator3d_range. Iterate to the previous location inside the Range3d.

Definition at line 940 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
self slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::operator-- ( int  )
inline

Postdecrement a const_component_iterator3d_range. Iterate to the previous location inside the Range3d.

Definition at line 982 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
self& slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::operator-= ( const difference_type d)
inline

const_component_iterator3d_range substraction.

Parameters
ddifference_type
Returns
a const_component_iterator3d_range reference
Precondition
All the iterators between the current iterator i and i - d must be dereferenceable.

Definition at line 1123 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
pointer slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::operator-> ( ) const
inline

Definition at line 864 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
self& slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::operator= ( const self o)
inline

Assign a const_component_iterator3d_range.

Assign elements of const_component_iterator3d_range in o.

Parameters
oconst_component_iterator3d_range to get the values from.
Returns
a const_component_iterator3d_range reference.

Definition at line 832 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
reference slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::operator[] ( difference_type  d) const
inline

const_component_iterator3d_range element assignment operator. Equivalent to *(i + d).

Parameters
ddifference_type.
Returns
a const reference to the 3d container elements
Precondition
(i + d) exists and is dereferenceable.

Definition at line 1193 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
MultiComponentContainer3d::const_component_row_range_iterator slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::row_begin ( size_type  slice,
size_type  row 
) const
inline

const_component_iterator3d_range element assignment operator.

Parameters
sliceoffset.
rowoffset.
Returns
a const_row_range_iterator to the first element of range at the slice slice of the slice range and the row row of the row range

Definition at line 1243 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
MultiComponentContainer3d::const_component_row_range_iterator slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::row_end ( size_type  slice,
size_type  row 
) const
inline

const_component_iterator3d_range element assignment operator.

Parameters
sliceoffset.
rowoffset.
Returns
a const_row_range_iterator to the past-the-end element of range at the slice slice of the slice range and the row row of the row range

Definition at line 1259 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
MultiComponentContainer3d::const_component_slice_range_iterator slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::slice_begin ( size_type  row,
size_type  col 
) const
inline

const_component_iterator3d_range element assignment operator.

Parameters
rowoffset.
coloffset.
Returns
a const_slice_range_iterator to the first element of range at the row row of the row range and the col col of the col range

Definition at line 1212 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
MultiComponentContainer3d::const_component_slice_range_iterator slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::slice_end ( size_type  row,
size_type  col 
) const
inline

const_component_iterator3d_range element assignment operator.

Parameters
rowoffset.
coloffset.
Returns
a const_slice_range_iterator to the past-the-end element of range at the row row of the row range and the col col of the col range

Definition at line 1228 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
int slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::x1 ( ) const
inline

Access to the first index of the current const_component_iterator3d_range.

Returns
the first index.

Definition at line 1308 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
int slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::x2 ( ) const
inline

Access to the second index of the current const_component_iterator3d_range.

Returns
the second index.

Definition at line 1327 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
int slip::const_component_iterator3d_range< MultiComponentContainer3d, N >::x3 ( ) const
inline

Access to the third index of the current const_component_iterator3d_range.

Returns
the third index.

Definition at line 1345 of file component_iterator3d_range.hpp.

Friends And Related Function Documentation

template<class MultiComponentContainer3d , std::size_t N>
bool operator!= ( const self i1,
const self i2 
)
friend

Inequality operator.

Parameters
i1first const_component_iterator3d_range.
i2second const_component_iterator3d_range.
Returns
true if !(i1 == i2)

Definition at line 1019 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
difference_type operator- ( const self i1,
const self i2 
)
friend

const_component_iterator3d_range difference operator.

Parameters
i1first const_component_iterator3d_range.
i2second const_component_iterator3d_range.
Returns
a difference_type d such that i1 = i2 + stride*d.
Precondition
Either i1 is reachable from i2, or i2 is reachable from i1.
Both strides must be equal

Definition at line 1173 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
bool operator< ( const self i1,
const self i2 
)
friend

< operator.

Parameters
i1first iterator3d_box.
i2second iterator3d_box.
Returns
true i1.pos_ < i2_pos

Definition at line 1039 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
bool operator<= ( const self i1,
const self i2 
)
friend

<= operator.

Parameters
i1first iterator3d_box.
i2second iterator3d_box.
Returns
true if !(i2 < i1)

Definition at line 1067 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
bool operator== ( const self i1,
const self i2 
)
friend

Equality operator.

Parameters
i1first const_component_iterator3d_range.
i2second const_component_iterator3d_range.
Returns
true if i1 and i2 point to the same element of the 3d container

Definition at line 1003 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
bool operator> ( const self i1,
const self i2 
)
friend

operator.

Parameters
i1first iterator3d_box.
i2second iterator3d_box.
Returns
true i2 < i1

Definition at line 1053 of file component_iterator3d_range.hpp.

template<class MultiComponentContainer3d , std::size_t N>
bool operator>= ( const self i1,
const self i2 
)
friend

>= operator.

Parameters
i1first iterator3d_box.
i2second iterator3d_box.
Returns
true if !(i1 < i2)

Definition at line 1081 of file component_iterator3d_range.hpp.


The documentation for this class was generated from the following file: