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::component_iterator4d_box< MultiComponentContainer4D, N > Class Template Reference

This is some iterator to iterate a 4d MultiComponentContainer into a Box area defined by the indices of the 4d container. More...

#include <component_iterator4d_box.hpp>

Public Types

typedef
std::random_access_iterator4d_tag 
iterator_category
 
typedef
MultiComponentContainer4D::value_type 
Block
 
typedef Block::value_type value_type
 
typedef DPoint4d< int > difference_type
 
typedef value_typepointer
 
typedef value_typereference
 
typedef component_iterator4d_box self
 
typedef
MultiComponentContainer4D::size_type 
size_type
 

Public Member Functions

reference operator* ()
 Dereference assignment operator. Returns the element that the current component_iterator4d_box i point to. More...
 
pointer operator-> ()
 
Constructors & Destructors
 component_iterator4d_box ()
 Constructs a component_iterator4d_box. More...
 
 component_iterator4d_box (MultiComponentContainer4D *c, std::size_t cp, const Box4d< int > &b)
 Constructs a component_iterator4d_box. More...
 
 component_iterator4d_box (const self &o)
 Constructs a copy of the component_iterator4d_box o. More...
 
Assignment operators and methods
selfoperator= (const self &o)
 Assign a component_iterator4d_box. More...
 
Forward operators addons
selfoperator++ ()
 Preincrement a component_iterator4d_box. Iterate to the next location inside the Box4d. More...
 
self operator++ (int)
 Postincrement a component_iterator4d_box. Iterate to the next location inside the Box4d. More...
 
Bidirectional operators addons
selfoperator-- ()
 Predecrement a component_iterator4d_box. Iterate to the previous location inside the Box4d. More...
 
self operator-- (int)
 Postdecrement a component_iterator4d_box. Iterate to the previous location inside the Box4d. More...
 
Indices accessors
int x1 () const
 Access to the first index of the current component_iterator4d_box. More...
 
int t () const
 Access to the first index of the current component_iterator4d_box. More...
 
int x2 () const
 Access to the second index of the current component_iterator4d_box. More...
 
int k () const
 Access to the second index of the current component_iterator4d_box. More...
 
int x3 () const
 Access to the third index of the current component_iterator4d_box. More...
 
int i () const
 Access to the third index of the current component_iterator4d_box. More...
 
int x4 () const
 Access to the fourth index of the current component_iterator4d_box. More...
 
int j () const
 Access to the fourth index of the current component_iterator4d_box. More...
 
size_type cp () const
 Access to the component index of the current component_iterator4d_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...
 

component_iterator4d_box operators addons

selfoperator+= (const difference_type &d)
 component_iterator4d_box addition. More...
 
selfoperator-= (const difference_type &d)
 component_iterator4d_box substraction. More...
 
self operator+ (const difference_type &d)
 component_iterator4d_box addition. More...
 
self operator- (const difference_type &d)
 component_iterator4d_box substraction. More...
 
reference operator[] (difference_type d)
 component_iterator4d_box element assignment operator. Equivalent to *(i + d) = t. More...
 
MultiComponentContainer4D::component_slab_iterator slab_begin (size_type slice, size_type row, size_type col)
 component_iterator4d_box element assignment operator. More...
 
MultiComponentContainer4D::component_slab_iterator slab_end (size_type slice, size_type row, size_type col)
 component_iterator4d_box element assignment operator. More...
 
MultiComponentContainer4D::component_slice_iterator slice_begin (size_type slab, size_type row, size_type col)
 component_iterator4d_box element assignment operator. More...
 
MultiComponentContainer4D::component_slice_iterator slice_end (size_type slab, size_type row, size_type col)
 component_iterator4d_box element assignment operator. More...
 
MultiComponentContainer4D::component_row_iterator row_begin (size_type slab, size_type slice, size_type row)
 component_iterator4d_box element assignment operator. More...
 
MultiComponentContainer4D::component_row_iterator row_end (size_type slab, size_type slice, size_type row)
 component_iterator4d_box element assignment operator. More...
 
MultiComponentContainer4D::component_col_iterator col_begin (size_type slab, size_type slice, size_type col)
 component_iterator4d_box element assignment operator. More...
 
MultiComponentContainer4D::component_col_iterator col_end (size_type slab, size_type slice, size_type col)
 component_iterator4d_box element assignment operator. More...
 
difference_type operator- (const self &i1, const self &i2)
 component_iterator4d_box difference operator. More...
 

Detailed Description

template<class MultiComponentContainer4D, std::size_t N>
class slip::component_iterator4d_box< MultiComponentContainer4D, N >

This is some iterator to iterate a 4d MultiComponentContainer into a Box area defined by the indices of the 4d container.

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

Definition at line 108 of file component_iterator4d_box.hpp.

Member Typedef Documentation

template<class MultiComponentContainer4D , std::size_t N>
typedef MultiComponentContainer4D::value_type slip::component_iterator4d_box< MultiComponentContainer4D, N >::Block

Definition at line 114 of file component_iterator4d_box.hpp.

template<class MultiComponentContainer4D , std::size_t N>
typedef DPoint4d<int> slip::component_iterator4d_box< MultiComponentContainer4D, N >::difference_type

Definition at line 116 of file component_iterator4d_box.hpp.

template<class MultiComponentContainer4D , std::size_t N>
typedef std::random_access_iterator4d_tag slip::component_iterator4d_box< MultiComponentContainer4D, N >::iterator_category

Definition at line 113 of file component_iterator4d_box.hpp.

template<class MultiComponentContainer4D , std::size_t N>
typedef value_type* slip::component_iterator4d_box< MultiComponentContainer4D, N >::pointer

Definition at line 117 of file component_iterator4d_box.hpp.

template<class MultiComponentContainer4D , std::size_t N>
typedef value_type& slip::component_iterator4d_box< MultiComponentContainer4D, N >::reference

Definition at line 118 of file component_iterator4d_box.hpp.

template<class MultiComponentContainer4D , std::size_t N>
typedef component_iterator4d_box slip::component_iterator4d_box< MultiComponentContainer4D, N >::self

Definition at line 120 of file component_iterator4d_box.hpp.

template<class MultiComponentContainer4D , std::size_t N>
typedef MultiComponentContainer4D::size_type slip::component_iterator4d_box< MultiComponentContainer4D, N >::size_type

Definition at line 122 of file component_iterator4d_box.hpp.

template<class MultiComponentContainer4D , std::size_t N>
typedef Block::value_type slip::component_iterator4d_box< MultiComponentContainer4D, N >::value_type

Definition at line 115 of file component_iterator4d_box.hpp.

Constructor & Destructor Documentation

template<class MultiComponentContainer4D , std::size_t N>
slip::component_iterator4d_box< MultiComponentContainer4D, N >::component_iterator4d_box ( )
inline

Constructs a component_iterator4d_box.

The box to iterate is in this case the full container

Definition at line 132 of file component_iterator4d_box.hpp.

template<class MultiComponentContainer4D , std::size_t N>
slip::component_iterator4d_box< MultiComponentContainer4D, N >::component_iterator4d_box ( MultiComponentContainer4D *  c,
std::size_t  cp,
const Box4d< int > &  b 
)
inline

Constructs a component_iterator4d_box.

Parameters
cpointer to an existing 4d container
cpindex of the component to iterate
bBox4d<int> defining the range of indices to iterate
Precondition
box indices must be inside those of the 4d container

Definition at line 143 of file component_iterator4d_box.hpp.

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

Constructs a copy of the component_iterator4d_box o.

Parameters
ocomponent_iterator4d_box to copy.

Definition at line 159 of file component_iterator4d_box.hpp.

Member Function Documentation

template<class MultiComponentContainer4D , std::size_t N>
MultiComponentContainer4D::component_col_iterator slip::component_iterator4d_box< MultiComponentContainer4D, N >::col_begin ( size_type  slab,
size_type  slice,
size_type  col 
)
inline

component_iterator4d_box element assignment operator.

Parameters
slaboffset
sliceoffset.
rowoffset.
Returns
a col_iterator to the first element of the col col within the slab slab and the slice slice of the box

Definition at line 675 of file component_iterator4d_box.hpp.

template<class MultiComponentContainer4D , std::size_t N>
MultiComponentContainer4D::component_col_iterator slip::component_iterator4d_box< MultiComponentContainer4D, N >::col_end ( size_type  slab,
size_type  slice,
size_type  col 
)
inline

component_iterator4d_box element assignment operator.

Parameters
slaboffset
sliceoffset.
rowoffset.
Returns
a col_iterator to the first element of the col col within the slab slab and the slice slice of the box

Definition at line 695 of file component_iterator4d_box.hpp.

template<class MultiComponentContainer4D , std::size_t N>
size_type slip::component_iterator4d_box< MultiComponentContainer4D, N >::cp ( ) const
inline

Access to the component index of the current component_iterator4d_box.

Returns
the component index

Definition at line 793 of file component_iterator4d_box.hpp.

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

Access to the third index of the current component_iterator4d_box.

Returns
the third index.

Definition at line 764 of file component_iterator4d_box.hpp.

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

Access to the fourth index of the current component_iterator4d_box.

Returns
the fourth index.

Definition at line 784 of file component_iterator4d_box.hpp.

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

Access to the second index of the current component_iterator4d_box.

Returns
the second index.

Definition at line 744 of file component_iterator4d_box.hpp.

template<class MultiComponentContainer4D , std::size_t N>
reference slip::component_iterator4d_box< MultiComponentContainer4D, N >::operator* ( )
inline

Dereference assignment operator. Returns the element that the current component_iterator4d_box i point to.

Returns
a component_iterator4d_box reference.

Definition at line 201 of file component_iterator4d_box.hpp.

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

component_iterator4d_box addition.

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

Definition at line 503 of file component_iterator4d_box.hpp.

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

Preincrement a component_iterator4d_box. Iterate to the next location inside the Box4d.

Definition at line 223 of file component_iterator4d_box.hpp.

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

Postincrement a component_iterator4d_box. Iterate to the next location inside the Box4d.

Definition at line 267 of file component_iterator4d_box.hpp.

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

component_iterator4d_box addition.

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

Definition at line 455 of file component_iterator4d_box.hpp.

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

component_iterator4d_box substraction.

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

Definition at line 518 of file component_iterator4d_box.hpp.

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

Predecrement a component_iterator4d_box. Iterate to the previous location inside the Box4d.

Definition at line 286 of file component_iterator4d_box.hpp.

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

Postdecrement a component_iterator4d_box. Iterate to the previous location inside the Box4d.

Definition at line 334 of file component_iterator4d_box.hpp.

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

component_iterator4d_box substraction.

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

Definition at line 480 of file component_iterator4d_box.hpp.

template<class MultiComponentContainer4D , std::size_t N>
pointer slip::component_iterator4d_box< MultiComponentContainer4D, N >::operator-> ( )
inline

Definition at line 207 of file component_iterator4d_box.hpp.

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

Assign a component_iterator4d_box.

Assign elements of component_iterator4d_box in o.

Parameters
ocomponent_iterator4d_box to get the values from.
Returns
a component_iterator4d_box reference.

Definition at line 177 of file component_iterator4d_box.hpp.

template<class MultiComponentContainer4D , std::size_t N>
reference slip::component_iterator4d_box< MultiComponentContainer4D, N >::operator[] ( difference_type  d)
inline

component_iterator4d_box element assignment operator. Equivalent to *(i + d) = t.

Parameters
ddifference_type.
Returns
a reference to the 4d container elements
Precondition
(i + d) exists and is dereferenceable.
Postcondition
i[d] is a copy of reference.

Definition at line 551 of file component_iterator4d_box.hpp.

template<class MultiComponentContainer4D , std::size_t N>
MultiComponentContainer4D::component_row_iterator slip::component_iterator4d_box< MultiComponentContainer4D, N >::row_begin ( size_type  slab,
size_type  slice,
size_type  row 
)
inline

component_iterator4d_box element assignment operator.

Parameters
slaboffset
sliceoffset.
rowoffset.
Returns
a row_iterator to the first element of the row row within the slab slab and the slice slice of the box

Definition at line 639 of file component_iterator4d_box.hpp.

template<class MultiComponentContainer4D , std::size_t N>
MultiComponentContainer4D::component_row_iterator slip::component_iterator4d_box< MultiComponentContainer4D, N >::row_end ( size_type  slab,
size_type  slice,
size_type  row 
)
inline

component_iterator4d_box element assignment operator.

Parameters
slaboffset
sliceoffset.
rowoffset.
Returns
a row_iterator to the past-the-end element of the row row within the slab slab and the slice slice of the box

Definition at line 659 of file component_iterator4d_box.hpp.

template<class MultiComponentContainer4D , std::size_t N>
MultiComponentContainer4D::component_slab_iterator slip::component_iterator4d_box< MultiComponentContainer4D, N >::slab_begin ( size_type  slice,
size_type  row,
size_type  col 
)
inline

component_iterator4d_box element assignment operator.

Parameters
sliceoffset.
rowoffset.
coloffset
Returns
a slab_iterator to the first element of the line (slice,row,col) threw the slabs in the box.

Definition at line 569 of file component_iterator4d_box.hpp.

template<class MultiComponentContainer4D , std::size_t N>
MultiComponentContainer4D::component_slab_iterator slip::component_iterator4d_box< MultiComponentContainer4D, N >::slab_end ( size_type  slice,
size_type  row,
size_type  col 
)
inline

component_iterator4d_box element assignment operator.

Parameters
sliceoffset.
rowrow offset.
colcol offset.
Returns
a slab_iterator to the last element of line (slice,row,col) threw the slabs in the box.

Definition at line 589 of file component_iterator4d_box.hpp.

template<class MultiComponentContainer4D , std::size_t N>
MultiComponentContainer4D::component_slice_iterator slip::component_iterator4d_box< MultiComponentContainer4D, N >::slice_begin ( size_type  slab,
size_type  row,
size_type  col 
)
inline

component_iterator4d_box element assignment operator.

Parameters
slaboffset
rowoffset.
coloffset
Returns
a slice_iterator to the first element of the line (slab,row,col) threw the slices in the box.

Definition at line 604 of file component_iterator4d_box.hpp.

template<class MultiComponentContainer4D , std::size_t N>
MultiComponentContainer4D::component_slice_iterator slip::component_iterator4d_box< MultiComponentContainer4D, N >::slice_end ( size_type  slab,
size_type  row,
size_type  col 
)
inline

component_iterator4d_box element assignment operator.

Parameters
slaboffset
rowrow offset.
colcol offset.
Returns
a slice_iterator to the last element of line (slab,row,col) threw the slices in the box.

Definition at line 624 of file component_iterator4d_box.hpp.

template<class MultiComponentContainer4D , std::size_t N>
int slip::component_iterator4d_box< MultiComponentContainer4D, N >::t ( ) const
inline

Access to the first index of the current component_iterator4d_box.

Returns
the first index.

Definition at line 724 of file component_iterator4d_box.hpp.

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

Access to the first index of the current component_iterator4d_box.

Returns
the first index.

Definition at line 714 of file component_iterator4d_box.hpp.

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

Access to the second index of the current component_iterator4d_box.

Returns
the second index.

Definition at line 734 of file component_iterator4d_box.hpp.

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

Access to the third index of the current component_iterator4d_box.

Returns
the third index.

Definition at line 754 of file component_iterator4d_box.hpp.

template<class MultiComponentContainer4D , std::size_t N>
int slip::component_iterator4d_box< MultiComponentContainer4D, N >::x4 ( ) const
inline

Access to the fourth index of the current component_iterator4d_box.

Returns
the fourth index.

Definition at line 774 of file component_iterator4d_box.hpp.

Friends And Related Function Documentation

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

Inequality operator.

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

Definition at line 371 of file component_iterator4d_box.hpp.

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

component_iterator4d_box difference operator.

Parameters
i1first component_iterator4d_box.
i2second component_iterator4d_box.
Returns
a difference_type d such that i1 = i2 + d.
Precondition
Either i1 is reachable from i2, or i2 is reachable from i1.

Definition at line 534 of file component_iterator4d_box.hpp.

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

< operator.

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

Definition at line 393 of file component_iterator4d_box.hpp.

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

<= operator.

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

Definition at line 420 of file component_iterator4d_box.hpp.

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

Equality operator.

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

Definition at line 355 of file component_iterator4d_box.hpp.

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

operator.

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

Definition at line 407 of file component_iterator4d_box.hpp.

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

>= operator.

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

Definition at line 434 of file component_iterator4d_box.hpp.


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