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_iterator4d_box< Container4D > Class Template Reference

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

#include <iterator4d_box.hpp>

Public Types

typedef
std::random_access_iterator4d_tag 
iterator_category
 
typedef Container4D::value_type value_type
 
typedef slip::DPoint2d< int > diff2d
 
typedef slip::DPoint3d< int > diff3d
 
typedef DPoint4d< int > difference_type
 
typedef Container4D::const_pointer pointer
 
typedef
Container4D::const_reference 
reference
 
typedef const_iterator4d_box self
 
typedef Container4D::size_type size_type
 

Public Member Functions

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

const_iterator4d_box operators addons

selfoperator+= (const difference_type &d)
 const_iterator4d_box addition. More...
 
selfoperator-= (const difference_type &d)
 const_iterator4d_box substraction. More...
 
self operator+ (const difference_type &d)
 const_iterator4d_box addition. More...
 
self operator- (const difference_type &d)
 const_iterator4d_box substraction. More...
 
reference operator[] (difference_type d) const
 const_iterator4d_box element assignment operator. Equivalent to *(k + d) = t. More...
 
pointer operator[] (diff3d d) const
 const_iterator4d_box element assignment operator. Equivalent to *(k + d) = t. More...
 
pointeroperator[] (diff2d d) const
 const_iterator4d_box element assignment operator. Equivalent to *(k + d) = t. More...
 
pointer ** operator[] (int n) const
 const_iterator4d_box element assignment operator. Equivalent to *(k + n). More...
 
Container4D::const_slab_iterator slab_begin (size_type slice, size_type row, size_type col) const
 const_iterator4d_box element assignment operator. More...
 
Container4D::const_slab_iterator slab_end (size_type slice, size_type row, size_type col) const
 const_iterator4d_box element assignment operator. More...
 
Container4D::const_slice_iterator slice_begin (size_type slab, size_type row, size_type col) const
 const_iterator4d_box element assignment operator. More...
 
Container4D::const_slice_iterator slice_end (size_type slab, size_type row, size_type col) const
 const_iterator4d_box element assignment operator. More...
 
Container4D::const_row_iterator row_begin (size_type slab, size_type slice, size_type row) const
 const_iterator4d_box element assignment operator. More...
 
Container4D::const_row_iterator row_end (size_type slab, size_type slice, size_type row) const
 const_iterator4d_box element assignment operator. More...
 
Container4D::const_col_iterator col_begin (size_type slab, size_type slice, size_type col) const
 const_iterator4d_box element assignment operator. More...
 
Container4D::const_col_iterator col_end (size_type slab, size_type slice, size_type col) const
 const_iterator4d_box element assignment operator. More...
 
difference_type operator- (const self &i1, const self &i2)
 const_iterator4d_box difference operator. More...
 

Detailed Description

template<class Container4D>
class slip::const_iterator4d_box< Container4D >

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

Version
Fluex 1.0
Date
2013/07/04
Author
Denis Arrivault <denis.arrivault_AT_inria.fr>
Parameters
Container4DType of 4d container in the const_iterator4d_box
Description:
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 subscripts range of the 4d container. Those subscripts are defined as follows :
iterator4d_conventions.jpg
axis and notation conventions

Definition at line 944 of file iterator4d_box.hpp.

Member Typedef Documentation

template<class Container4D >
typedef slip::DPoint2d<int> slip::const_iterator4d_box< Container4D >::diff2d

Definition at line 950 of file iterator4d_box.hpp.

template<class Container4D >
typedef slip::DPoint3d<int> slip::const_iterator4d_box< Container4D >::diff3d

Definition at line 951 of file iterator4d_box.hpp.

template<class Container4D >
typedef DPoint4d<int> slip::const_iterator4d_box< Container4D >::difference_type

Definition at line 952 of file iterator4d_box.hpp.

template<class Container4D >
typedef std::random_access_iterator4d_tag slip::const_iterator4d_box< Container4D >::iterator_category

Definition at line 948 of file iterator4d_box.hpp.

template<class Container4D >
typedef Container4D::const_pointer slip::const_iterator4d_box< Container4D >::pointer

Definition at line 953 of file iterator4d_box.hpp.

template<class Container4D >
typedef Container4D::const_reference slip::const_iterator4d_box< Container4D >::reference

Definition at line 954 of file iterator4d_box.hpp.

template<class Container4D >
typedef const_iterator4d_box slip::const_iterator4d_box< Container4D >::self

Definition at line 956 of file iterator4d_box.hpp.

template<class Container4D >
typedef Container4D::size_type slip::const_iterator4d_box< Container4D >::size_type

Definition at line 958 of file iterator4d_box.hpp.

template<class Container4D >
typedef Container4D::value_type slip::const_iterator4d_box< Container4D >::value_type

Definition at line 949 of file iterator4d_box.hpp.

Constructor & Destructor Documentation

template<class Container4D >
slip::const_iterator4d_box< Container4D >::const_iterator4d_box ( )
inline

Constructs a const_iterator4d_box.

The box to iterate is in this case the full container

Definition at line 968 of file iterator4d_box.hpp.

template<class Container4D >
slip::const_iterator4d_box< Container4D >::const_iterator4d_box ( Container4D *  c,
const Box4d< int > &  b 
)
inline

Constructs a const_iterator4d_box.

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

Definition at line 978 of file iterator4d_box.hpp.

template<class Container4D >
slip::const_iterator4d_box< Container4D >::const_iterator4d_box ( const self o)
inline

Constructs a copy of the const_iterator4d_box o.

Parameters
oconst_iterator4d_box to copy.

Definition at line 995 of file iterator4d_box.hpp.

Member Function Documentation

template<class Container4D >
Container4D::const_col_iterator slip::const_iterator4d_box< Container4D >::col_begin ( size_type  slab,
size_type  slice,
size_type  col 
) const
inline

const_iterator4d_box element assignment operator.

Parameters
slaboffset.
sliceslice offset.
colcol offset.
Returns
a const_col_iterator to the first element of the line defined in the container by (slab,slice,col) indices.
Note
Be careful, row_iterators and col_iterators are iterating threw a row and a column respectively. It is not the case with slab and slice iterators which are iterating cross slabs and slices respectively.
Todo:
add assert

Definition at line 1603 of file iterator4d_box.hpp.

template<class Container4D >
Container4D::const_col_iterator slip::const_iterator4d_box< Container4D >::col_end ( size_type  slab,
size_type  slice,
size_type  col 
) const
inline

const_iterator4d_box element assignment operator.

Parameters
slaboffset.
sliceslice offset.
colcol offset.
Returns
a const_col_iterator to the past-the-end element of the line defined in the container by (slab,slice,col) indices.
Note
Be careful, row_iterators and col_iterators are iterating threw a row and a column respectively. It is not the case with slab and slice iterators which are iterating cross slabs and slices respectively.
Todo:
add assert

Definition at line 1620 of file iterator4d_box.hpp.

template<class Container4D >
int slip::const_iterator4d_box< Container4D >::i ( ) const
inline

Access to the third subscript of the current const_iterator4d_box.

Returns
the third subscript.

Definition at line 1682 of file iterator4d_box.hpp.

template<class Container4D >
int slip::const_iterator4d_box< Container4D >::j ( ) const
inline

Access to the fourth subscript of the current const_iterator4d_box.

Returns
the fourth subscript.

Definition at line 1701 of file iterator4d_box.hpp.

template<class Container4D >
int slip::const_iterator4d_box< Container4D >::k ( ) const
inline

Access to the second subscript of the current const_iterator4d_box.

Returns
the second subscript.

Definition at line 1664 of file iterator4d_box.hpp.

template<class Container4D >
reference slip::const_iterator4d_box< Container4D >::operator* ( ) const
inline

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

Returns
a iterator4d_box reference.

Definition at line 1036 of file iterator4d_box.hpp.

template<class Container4D >
self slip::const_iterator4d_box< Container4D >::operator+ ( const difference_type d)
inline

const_iterator4d_box addition.

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

Definition at line 1391 of file iterator4d_box.hpp.

template<class Container4D >
self& slip::const_iterator4d_box< Container4D >::operator++ ( )
inline

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

Definition at line 1058 of file iterator4d_box.hpp.

template<class Container4D >
self slip::const_iterator4d_box< Container4D >::operator++ ( int  )
inline

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

Definition at line 1136 of file iterator4d_box.hpp.

template<class Container4D >
self& slip::const_iterator4d_box< Container4D >::operator+= ( const difference_type d)
inline

const_iterator4d_box addition.

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

Definition at line 1345 of file iterator4d_box.hpp.

template<class Container4D >
self slip::const_iterator4d_box< Container4D >::operator- ( const difference_type d)
inline

const_iterator4d_box substraction.

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

Definition at line 1406 of file iterator4d_box.hpp.

template<class Container4D >
self& slip::const_iterator4d_box< Container4D >::operator-- ( )
inline

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

Definition at line 1155 of file iterator4d_box.hpp.

template<class Container4D >
self slip::const_iterator4d_box< Container4D >::operator-- ( int  )
inline

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

Definition at line 1233 of file iterator4d_box.hpp.

template<class Container4D >
self& slip::const_iterator4d_box< Container4D >::operator-= ( const difference_type d)
inline

const_iterator4d_box substraction.

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

Definition at line 1368 of file iterator4d_box.hpp.

template<class Container4D >
pointer slip::const_iterator4d_box< Container4D >::operator-> ( ) const
inline

Definition at line 1042 of file iterator4d_box.hpp.

template<class Container4D >
self& slip::const_iterator4d_box< Container4D >::operator= ( const self o)
inline

Assign a const_iterator4d_box.

Assign elements of const_iterator4d_box in o.

Parameters
oconst_iterator4d_box to get the values from.
Returns
a const_iterator4d_box reference.

Definition at line 1013 of file iterator4d_box.hpp.

template<class Container4D >
reference slip::const_iterator4d_box< Container4D >::operator[] ( difference_type  d) const
inline

const_iterator4d_box element assignment operator. Equivalent to *(k + d) = t.

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

Definition at line 1437 of file iterator4d_box.hpp.

template<class Container4D >
pointer slip::const_iterator4d_box< Container4D >::operator[] ( diff3d  d) const
inline

const_iterator4d_box element assignment operator. Equivalent to *(k + d) = t.

Parameters
doffset.
Returns
a pointer to the 4d container elements
Precondition
(k + d) exists and is dereferenceable.
Postcondition
k[d] is a copy of pointer.
Todo:
add assert

Definition at line 1452 of file iterator4d_box.hpp.

template<class Container4D >
pointer* slip::const_iterator4d_box< Container4D >::operator[] ( diff2d  d) const
inline

const_iterator4d_box element assignment operator. Equivalent to *(k + d) = t.

Parameters
doffset.
Returns
a pointer to the 4d container elements
Precondition
(k + d) exists and is dereferenceable.
Postcondition
k[d] is a copy of pointer.
Todo:
add assert

Definition at line 1467 of file iterator4d_box.hpp.

template<class Container4D >
pointer** slip::const_iterator4d_box< Container4D >::operator[] ( int  n) const
inline

const_iterator4d_box element assignment operator. Equivalent to *(k + n).

Parameters
noffset.
Returns
a pointer of pointer to the 4d container elements
Precondition
(k + n) exists and is dereferenceable.
Postcondition
k[n] is a copy of pointer of pointer.
Todo:
add assert

Definition at line 1482 of file iterator4d_box.hpp.

template<class Container4D >
Container4D::const_row_iterator slip::const_iterator4d_box< Container4D >::row_begin ( size_type  slab,
size_type  slice,
size_type  row 
) const
inline

const_iterator4d_box element assignment operator.

Parameters
slaboffset.
sliceslice offset.
rowoffset.
Returns
a const_row_iterator to the first element of the line defined in the container by (slab,slice,row) indices.
Note
Be careful, row_iterators and col_iterators are iterating threw a row and a column respectively. It is not the case with slab and slice iterators which are iterating cross slabs and slices respectively.
Todo:
add assert

Definition at line 1568 of file iterator4d_box.hpp.

template<class Container4D >
Container4D::const_row_iterator slip::const_iterator4d_box< Container4D >::row_end ( size_type  slab,
size_type  slice,
size_type  row 
) const
inline

const_iterator4d_box element assignment operator.

Parameters
slaboffset.
sliceslice offset.
rowoffset.
Returns
a const_row_iterator to the past-the-end element of the line defined in the container by (slab,slice,row) indices.
Note
Be careful, row_iterators and col_iterators are iterating threw a row and a column respectively. It is not the case with slab and slice iterators which are iterating cross slabs and slices respectively.
Todo:
add assert

Definition at line 1586 of file iterator4d_box.hpp.

template<class Container4D >
Container4D::const_slab_iterator slip::const_iterator4d_box< Container4D >::slab_begin ( size_type  slice,
size_type  row,
size_type  col 
) const
inline

const_iterator4d_box element assignment operator.

Parameters
sliceoffset.
rowoffset.
coloffset
Returns
a const_slab_iterator to the first element of the line defined in the container by (slice,row,col) indices.
Todo:
add assert

Definition at line 1498 of file iterator4d_box.hpp.

template<class Container4D >
Container4D::const_slab_iterator slip::const_iterator4d_box< Container4D >::slab_end ( size_type  slice,
size_type  row,
size_type  col 
) const
inline

const_iterator4d_box element assignment operator.

Parameters
sliceoffset.
rowrow offset.
colcol offset.
Returns
a const_slab_iterator to the past-the-end element of the line defined in the container by (slice,row,col) indices.
Todo:
add assert

Definition at line 1516 of file iterator4d_box.hpp.

template<class Container4D >
Container4D::const_slice_iterator slip::const_iterator4d_box< Container4D >::slice_begin ( size_type  slab,
size_type  row,
size_type  col 
) const
inline

const_iterator4d_box element assignment operator.

Parameters
slaboffset.
rowoffset.
coloffset
Returns
a const_slice_iterator to the first element of the line defined in the container by (slab,row,col) indices.
Todo:
add assert

Definition at line 1532 of file iterator4d_box.hpp.

template<class Container4D >
Container4D::const_slice_iterator slip::const_iterator4d_box< Container4D >::slice_end ( size_type  slab,
size_type  row,
size_type  col 
) const
inline

const_iterator4d_box element assignment operator.

Parameters
slaboffset.
rowrow offset.
colcol offset.
Returns
a const_slice_iterator to the past-the-end element of the line defined in the container by (slab,row,col) indices.
Todo:
add assert

Definition at line 1550 of file iterator4d_box.hpp.

template<class Container4D >
int slip::const_iterator4d_box< Container4D >::t ( ) const
inline

Access to the first subscript of the current const_iterator4d_box.

Returns
the first subscript.

Definition at line 1646 of file iterator4d_box.hpp.

template<class Container4D >
int slip::const_iterator4d_box< Container4D >::x1 ( ) const
inline

Access to the first subscript of the current const_iterator4d_box.

Returns
the first subscript.

Definition at line 1637 of file iterator4d_box.hpp.

template<class Container4D >
int slip::const_iterator4d_box< Container4D >::x2 ( ) const
inline

Access to the second subscript of the current const_iterator4d_box.

Returns
the second subscript.

Definition at line 1655 of file iterator4d_box.hpp.

template<class Container4D >
int slip::const_iterator4d_box< Container4D >::x3 ( ) const
inline

Access to the third subscript of the current const_iterator4d_box.

Returns
the third subscript.

Definition at line 1673 of file iterator4d_box.hpp.

template<class Container4D >
int slip::const_iterator4d_box< Container4D >::x4 ( ) const
inline

Access to the fourth subscript of the current const_iterator4d_box.

Returns
the fourth subscript.

Definition at line 1692 of file iterator4d_box.hpp.

Friends And Related Function Documentation

template<class Container4D >
bool operator!= ( const self i1,
const self i2 
)
friend

Inequality operator.

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

Definition at line 1269 of file iterator4d_box.hpp.

template<class Container4D >
difference_type operator- ( const self i1,
const self i2 
)
friend

const_iterator4d_box difference operator.

Parameters
i1first const_iterator4d_box.
i2second const_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 1421 of file iterator4d_box.hpp.

template<class Container4D >
bool operator< ( const self i1,
const self i2 
)
friend

< operator.

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

Definition at line 1288 of file iterator4d_box.hpp.

template<class Container4D >
bool operator<= ( const self i1,
const self i2 
)
friend

<= operator.

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

Definition at line 1314 of file iterator4d_box.hpp.

template<class Container4D >
bool operator== ( const self i1,
const self i2 
)
friend

Equality operator.

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

Definition at line 1254 of file iterator4d_box.hpp.

template<class Container4D >
bool operator> ( const self i1,
const self i2 
)
friend

operator.

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

Definition at line 1301 of file iterator4d_box.hpp.

template<class Container4D >
bool operator>= ( const self i1,
const self i2 
)
friend

>= operator.

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

Definition at line 1326 of file iterator4d_box.hpp.


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