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_iterator3d_box< MultiComponentContainer3D, N > Class Template Reference

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

#include <component_iterator3d_box.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_typepointer
 
typedef value_typereference
 
typedef component_iterator3d_box self
 
typedef
MultiComponentContainer3D::size_type 
size_type
 

Public Member Functions

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

component_iterator3d_box operators addons

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

Detailed Description

template<class MultiComponentContainer3D, std::size_t N>
class slip::component_iterator3d_box< MultiComponentContainer3D, N >

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

Author
Denis Arrivault <Denis.Arrivault_AT_INRIA.fr>
Version
Fluex 1.0
Date
16/07/2013
Parameters
MultiComponentContainer3DType of 3d container in the component_iterator3d_box
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 box area defined inside the indices range of the 3 container. Those indices are defined as follows :
iterator3d_conventions.jpg
axis and notation conventions

Definition at line 109 of file component_iterator3d_box.hpp.

Member Typedef Documentation

template<class MultiComponentContainer3D , std::size_t N>
typedef MultiComponentContainer3D::value_type slip::component_iterator3d_box< MultiComponentContainer3D, N >::Block

Definition at line 115 of file component_iterator3d_box.hpp.

template<class MultiComponentContainer3D , std::size_t N>
typedef DPoint3d<int> slip::component_iterator3d_box< MultiComponentContainer3D, N >::difference_type

Definition at line 117 of file component_iterator3d_box.hpp.

template<class MultiComponentContainer3D , std::size_t N>
typedef std::random_access_iterator3d_tag slip::component_iterator3d_box< MultiComponentContainer3D, N >::iterator_category

Definition at line 114 of file component_iterator3d_box.hpp.

template<class MultiComponentContainer3D , std::size_t N>
typedef value_type* slip::component_iterator3d_box< MultiComponentContainer3D, N >::pointer

Definition at line 118 of file component_iterator3d_box.hpp.

template<class MultiComponentContainer3D , std::size_t N>
typedef value_type& slip::component_iterator3d_box< MultiComponentContainer3D, N >::reference

Definition at line 119 of file component_iterator3d_box.hpp.

template<class MultiComponentContainer3D , std::size_t N>
typedef component_iterator3d_box slip::component_iterator3d_box< MultiComponentContainer3D, N >::self

Definition at line 121 of file component_iterator3d_box.hpp.

template<class MultiComponentContainer3D , std::size_t N>
typedef MultiComponentContainer3D::size_type slip::component_iterator3d_box< MultiComponentContainer3D, N >::size_type

Definition at line 123 of file component_iterator3d_box.hpp.

template<class MultiComponentContainer3D , std::size_t N>
typedef Block::value_type slip::component_iterator3d_box< MultiComponentContainer3D, N >::value_type

Definition at line 116 of file component_iterator3d_box.hpp.

Constructor & Destructor Documentation

template<class MultiComponentContainer3D , std::size_t N>
slip::component_iterator3d_box< MultiComponentContainer3D, N >::component_iterator3d_box ( )
inline

Constructs a component_iterator3d_box.

The box to iterate is in this case the full container

Definition at line 133 of file component_iterator3d_box.hpp.

template<class MultiComponentContainer3D , std::size_t N>
slip::component_iterator3d_box< MultiComponentContainer3D, N >::component_iterator3d_box ( MultiComponentContainer3D *  c,
std::size_t  cp,
const Box3d< int > &  b 
)
inline

Constructs a component_iterator3d_box.

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

Definition at line 144 of file component_iterator3d_box.hpp.

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

Constructs a copy of the component_iterator3d_box o.

Parameters
ocomponent_iterator3d_box to copy.

Definition at line 159 of file component_iterator3d_box.hpp.

Member Function Documentation

template<class MultiComponentContainer3D , std::size_t N>
MultiComponentContainer3D::component_col_iterator slip::component_iterator3d_box< MultiComponentContainer3D, N >::col_begin ( size_type  slice,
size_type  col 
)
inline

component_iterator3d_box element assignment operator.

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

Definition at line 595 of file component_iterator3d_box.hpp.

template<class MultiComponentContainer3D , std::size_t N>
MultiComponentContainer3D::component_col_iterator slip::component_iterator3d_box< MultiComponentContainer3D, N >::col_end ( size_type  slice,
size_type  col 
)
inline

component_iterator3d_box element assignment operator.

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

Definition at line 609 of file component_iterator3d_box.hpp.

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

Access to the component index of the current component_iterator3d_box.

Returns
the component index

Definition at line 686 of file component_iterator3d_box.hpp.

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

Access to the second index of the current component_iterator3d_box.

Returns
the second index.

Definition at line 657 of file component_iterator3d_box.hpp.

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

Access to the third index of the current component_iterator3d_box.

Returns
the third index.

Definition at line 677 of file component_iterator3d_box.hpp.

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

Access to the first index of the current component_iterator3d_box.

Returns
the first index.

Definition at line 636 of file component_iterator3d_box.hpp.

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

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

Returns
a component_iterator3d_box reference.

Definition at line 200 of file component_iterator3d_box.hpp.

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

component_iterator3d_box addition.

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

Definition at line 476 of file component_iterator3d_box.hpp.

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

Preincrement a component_iterator3d_box. Iterate to the next location inside the Box3d.

Definition at line 222 of file component_iterator3d_box.hpp.

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

Postincrement a component_iterator3d_box. Iterate to the next location inside the Box3d.

Definition at line 257 of file component_iterator3d_box.hpp.

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

component_iterator3d_box addition.

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

Definition at line 434 of file component_iterator3d_box.hpp.

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

component_iterator3d_box substraction.

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

Definition at line 491 of file component_iterator3d_box.hpp.

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

Predecrement a component_iterator3d_box. Iterate to the previous location inside the Box3d.

Definition at line 276 of file component_iterator3d_box.hpp.

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

Postdecrement a component_iterator3d_box. Iterate to the previous location inside the Box3d.

Definition at line 313 of file component_iterator3d_box.hpp.

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

component_iterator3d_box substraction.

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

Definition at line 456 of file component_iterator3d_box.hpp.

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

Definition at line 206 of file component_iterator3d_box.hpp.

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

Assign a component_iterator3d_box.

Assign elements of component_iterator3d_box in o.

Parameters
ocomponent_iterator3d_box to get the values from.
Returns
a component_iterator3d_box reference.

Definition at line 177 of file component_iterator3d_box.hpp.

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

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

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

Definition at line 524 of file component_iterator3d_box.hpp.

template<class MultiComponentContainer3D , std::size_t N>
MultiComponentContainer3D::component_row_iterator slip::component_iterator3d_box< MultiComponentContainer3D, N >::row_begin ( size_type  slice,
size_type  row 
)
inline

component_iterator3d_box element assignment operator.

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

Definition at line 567 of file component_iterator3d_box.hpp.

template<class MultiComponentContainer3D , std::size_t N>
MultiComponentContainer3D::component_row_iterator slip::component_iterator3d_box< MultiComponentContainer3D, N >::row_end ( size_type  slice,
size_type  row 
)
inline

component_iterator3d_box element assignment operator.

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

Definition at line 581 of file component_iterator3d_box.hpp.

template<class MultiComponentContainer3D , std::size_t N>
MultiComponentContainer3D::component_slice_iterator slip::component_iterator3d_box< MultiComponentContainer3D, N >::slice_begin ( size_type  row,
size_type  col 
)
inline

component_iterator3d_box element assignment operator.

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

Definition at line 540 of file component_iterator3d_box.hpp.

template<class MultiComponentContainer3D , std::size_t N>
MultiComponentContainer3D::component_slice_iterator slip::component_iterator3d_box< MultiComponentContainer3D, N >::slice_end ( size_type  row,
size_type  col 
)
inline

component_iterator3d_box element assignment operator.

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

Definition at line 554 of file component_iterator3d_box.hpp.

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

Access to the first index of the current component_iterator3d_box.

Returns
the first index.

Definition at line 626 of file component_iterator3d_box.hpp.

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

Access to the second index of the current component_iterator3d_box.

Returns
the second index.

Definition at line 647 of file component_iterator3d_box.hpp.

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

Access to the third index of the current component_iterator3d_box.

Returns
the third index.

Definition at line 667 of file component_iterator3d_box.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 component_iterator3d_box.
i2second component_iterator3d_box.
Returns
true if !(i1 == i2)

Definition at line 350 of file component_iterator3d_box.hpp.

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

component_iterator3d_box difference operator.

Parameters
i1first component_iterator3d_box.
i2second component_iterator3d_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 507 of file component_iterator3d_box.hpp.

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

< operator.

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

Definition at line 372 of file component_iterator3d_box.hpp.

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

<= operator.

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

Definition at line 399 of file component_iterator3d_box.hpp.

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

Equality operator.

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

Definition at line 334 of file component_iterator3d_box.hpp.

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

operator.

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

Definition at line 386 of file component_iterator3d_box.hpp.

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

>= operator.

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

Definition at line 413 of file component_iterator3d_box.hpp.


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