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_iterator3d_range< T > 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 <DenseVector3dField3d.hpp>

Public Types

typedef
std::random_access_iterator3d_tag 
iterator_category
 
typedef Container3D::value_type value_type
 
typedef DPoint3d< int > difference_type
 
typedef DPoint2d< int > diff2d
 
typedef Container3D::const_pointer pointer
 
typedef
Container3D::const_reference 
reference
 
typedef const_iterator3d_range self
 
typedef Container3D::size_type size_type
 

Public Member Functions

reference operator* () const
 Dereference operator. Returns the element that the current const_iterator3d_range i point to. More...
 
pointer operator-> () const
 
Constructors & Destructors
 const_iterator3d_range ()
 Constructs a const_iterator3d_range. More...
 
 const_iterator3d_range (Container3D *c, const slip::Range< int > &r1, const slip::Range< int > &r2, const slip::Range< int > &r3)
 Constructs a const_iterator3d_range. More...
 
 const_iterator3d_range (const self &o)
 Constructs a copy of the const_iterator3d_range o. More...
 
Assignment operators and methods
selfoperator= (const self &o)
 Assign a const_iterator3d_range. More...
 
Forward operators addons
selfoperator++ ()
 Preincrement a const_iterator3d_range. Iterate to the next location inside the Range. More...
 
self operator++ (int)
 Postincrement a const_iterator3d_range. Iterate to the next location inside the Range3d. More...
 
Bidirectional operators addons
selfoperator-- ()
 Predecrement a const_iterator3d_range. Iterate to the previous location inside the Range3d. More...
 
self operator-- (int)
 Postdecrement a const_iterator3d_range. Iterate to the previous location inside the Range3d. More...
 
const_iterator3d_range row and col iterators accessors
Container3D::const_row_range_iterator row_begin (size_type slice, size_type row) const
 const_iterator3d_range element assignment operator. More...
 
Container3D::const_row_range_iterator row_end (size_type slice, size_type row) const
 const_iterator3d_range element assignment operator. More...
 
Container3D::const_col_range_iterator col_begin (size_type slice, size_type col) const
 const_iterator3d_range element assignment operator. More...
 
Container3D::const_col_range_iterator col_end (size_type slice, size_type col) const
 const_iterator3d_range element assignment operator. More...
 
Subscripts accessors
int x1 ()
 Access to the first subscript of the current const_iterator3d_range. More...
 
int k ()
 Access to the first subscript of the current const_iterator3d_range. More...
 
int x2 ()
 Access to the second subscript of the current const_iterator3d_range. More...
 
int i ()
 Access to the second subscript of the current const_iterator3d_range. More...
 
int x3 ()
 Access to the third subscript of the current const_iterator3d_range. More...
 
int j ()
 Access to the third subscript of the current const_iterator3d_range. 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_iterator3d_range operators addons

selfoperator+= (const difference_type &d)
 const_iterator3d_range addition. More...
 
selfoperator-= (const difference_type &d)
 const_iterator3d_range substraction. More...
 
self operator+ (const difference_type &d)
 const_iterator3d_range addition. More...
 
self operator- (const difference_type &d)
 const_iterator3d_range substraction. More...
 
reference operator[] (difference_type d) const
 const_iterator3d_range element assignment operator. Equivalent to *(k + d) = t. More...
 
pointer operator[] (diff2d d) const
 const_iterator3d_range element assignment operator. Equivalent to *(k + d) = t. More...
 
pointeroperator[] (int n) const
 const_iterator3d_range element assignment operator. Equivalent to *(k + n). More...
 
difference_type operator- (const self &i1, const self &i2)
 const_iterator3d_range difference operator. More...
 

Detailed Description

template<typename T>
class slip::const_iterator3d_range< T >

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 <arrivault_AT_sic.univ-poitiers.fr>
Version
0.0.1
Date
2007/12/13
Parameters
Container3DType of 3d container in the const_iterator3d_range
Description:
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 :
x1 _(or k)
/\
/
/
(0,0,0)--------> x3 (or j)
|
|
|
|
\|/
x2 (or i)
(0,0,0) is the upper left corner of the 3d container.

Definition at line 119 of file DenseVector3dField3d.hpp.

Member Typedef Documentation

template<typename T >
typedef DPoint2d<int> slip::const_iterator3d_range< T >::diff2d

Definition at line 754 of file iterator3d_range.hpp.

template<typename T >
typedef DPoint3d<int> slip::const_iterator3d_range< T >::difference_type

Definition at line 753 of file iterator3d_range.hpp.

Definition at line 751 of file iterator3d_range.hpp.

template<typename T >
typedef Container3D::const_pointer slip::const_iterator3d_range< T >::pointer

Definition at line 755 of file iterator3d_range.hpp.

template<typename T >
typedef Container3D::const_reference slip::const_iterator3d_range< T >::reference

Definition at line 756 of file iterator3d_range.hpp.

template<typename T >
typedef const_iterator3d_range slip::const_iterator3d_range< T >::self

Definition at line 758 of file iterator3d_range.hpp.

template<typename T >
typedef Container3D::size_type slip::const_iterator3d_range< T >::size_type

Definition at line 760 of file iterator3d_range.hpp.

template<typename T >
typedef Container3D::value_type slip::const_iterator3d_range< T >::value_type

Definition at line 752 of file iterator3d_range.hpp.

Constructor & Destructor Documentation

template<typename T >
slip::const_iterator3d_range< T >::const_iterator3d_range ( )
inline

Constructs a const_iterator3d_range.

The range to iterate is in this case the full container
Todo:
VERIFY

Definition at line 771 of file iterator3d_range.hpp.

template<typename T >
slip::const_iterator3d_range< T >::const_iterator3d_range ( Container3D *  c,
const slip::Range< int > &  r1,
const slip::Range< int > &  r2,
const slip::Range< int > &  r3 
)
inline

Constructs a const_iterator3d_range.

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

Definition at line 787 of file iterator3d_range.hpp.

template<typename T >
slip::const_iterator3d_range< T >::const_iterator3d_range ( const self o)
inline

Constructs a copy of the const_iterator3d_range o.

Parameters
oconst_iterator3d_range to copy.

Definition at line 801 of file iterator3d_range.hpp.

Member Function Documentation

template<typename T >
Container3D::const_col_range_iterator slip::const_iterator3d_range< T >::col_begin ( size_type  slice,
size_type  col 
) const
inline

const_iterator3d_range element assignment operator.

Parameters
sliceslice offset.
colcol offset.
Returns
a const col_range_iterator to the first element of range at the col col of the container of the slice slice of the range
Todo:
add assert

Definition at line 1247 of file iterator3d_range.hpp.

template<typename T >
Container3D::const_col_range_iterator slip::const_iterator3d_range< T >::col_end ( size_type  slice,
size_type  col 
) const
inline

const_iterator3d_range element assignment operator.

Parameters
sliceslice offset.
colcol offset.
Returns
a const col_range_iterator to the past-the-end element of range at the col col of the container of the slice slice of the range
Todo:
add assert

Definition at line 1263 of file iterator3d_range.hpp.

template<typename T >
int slip::const_iterator3d_range< T >::i ( )
inline

Access to the second subscript of the current const_iterator3d_range.

Returns
the second subscript.

Definition at line 1308 of file iterator3d_range.hpp.

template<typename T >
int slip::const_iterator3d_range< T >::j ( )
inline

Access to the third subscript of the current const_iterator3d_range.

Returns
the third subscript.

Definition at line 1326 of file iterator3d_range.hpp.

template<typename T >
int slip::const_iterator3d_range< T >::k ( )
inline

Access to the first subscript of the current const_iterator3d_range.

Returns
the first subscript.

Definition at line 1290 of file iterator3d_range.hpp.

template<typename T >
reference slip::const_iterator3d_range< T >::operator* ( ) const
inline

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

Returns
a const const_iterator3d_range reference.

Definition at line 845 of file iterator3d_range.hpp.

template<typename T >
self slip::const_iterator3d_range< T >::operator+ ( const difference_type d)
inline

const_iterator3d_range addition.

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

Definition at line 1112 of file iterator3d_range.hpp.

template<typename T >
self& slip::const_iterator3d_range< T >::operator++ ( )
inline

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

Definition at line 869 of file iterator3d_range.hpp.

template<typename T >
self slip::const_iterator3d_range< T >::operator++ ( int  )
inline

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

Definition at line 905 of file iterator3d_range.hpp.

template<typename T >
self& slip::const_iterator3d_range< T >::operator+= ( const difference_type d)
inline

const_iterator3d_range addition.

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

Definition at line 1078 of file iterator3d_range.hpp.

template<typename T >
self slip::const_iterator3d_range< T >::operator- ( const difference_type d)
inline

const_iterator3d_range substraction.

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

Definition at line 1127 of file iterator3d_range.hpp.

template<typename T >
self& slip::const_iterator3d_range< T >::operator-- ( )
inline

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

Definition at line 924 of file iterator3d_range.hpp.

template<typename T >
self slip::const_iterator3d_range< T >::operator-- ( int  )
inline

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

Definition at line 960 of file iterator3d_range.hpp.

template<typename T >
self& slip::const_iterator3d_range< T >::operator-= ( const difference_type d)
inline

const_iterator3d_range substraction.

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

Definition at line 1095 of file iterator3d_range.hpp.

template<typename T >
pointer slip::const_iterator3d_range< T >::operator-> ( ) const
inline

Definition at line 851 of file iterator3d_range.hpp.

template<typename T >
self& slip::const_iterator3d_range< T >::operator= ( const self o)
inline

Assign a const_iterator3d_range.

Assign elements of const_iterator3d_range in o.

Parameters
oconst_iterator3d_range to get the values from.
Returns
a const_iterator3d_range reference.

Definition at line 820 of file iterator3d_range.hpp.

template<typename T >
reference slip::const_iterator3d_range< T >::operator[] ( difference_type  d) const
inline

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

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

Definition at line 1164 of file iterator3d_range.hpp.

template<typename T >
pointer slip::const_iterator3d_range< T >::operator[] ( diff2d  d) const
inline

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

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

Definition at line 1181 of file iterator3d_range.hpp.

template<typename T >
pointer* slip::const_iterator3d_range< T >::operator[] ( int  n) const
inline

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

Parameters
noffset.
Returns
a const pointer of pointer to the 3d container elements
Precondition
(k + n) exists and is dereferenceable.
Todo:
add assert

Definition at line 1196 of file iterator3d_range.hpp.

template<typename T >
Container3D::const_row_range_iterator slip::const_iterator3d_range< T >::row_begin ( size_type  slice,
size_type  row 
) const
inline

const_iterator3d_range element assignment operator.

Parameters
sliceslice offset.
rowoffset.
Returns
a const_row_range_iterator to the first element of range at the row row of range of the slice slice of the range
Todo:
add assert

Definition at line 1216 of file iterator3d_range.hpp.

template<typename T >
Container3D::const_row_range_iterator slip::const_iterator3d_range< T >::row_end ( size_type  slice,
size_type  row 
) const
inline

const_iterator3d_range element assignment operator.

Parameters
sliceslice offset.
rowoffset.
Returns
a const_row_range_iterator to the past-the-end element of range at the row row of range of the slice slice of the range
Todo:
add assert

Definition at line 1232 of file iterator3d_range.hpp.

template<typename T >
int slip::const_iterator3d_range< T >::x1 ( )
inline

Access to the first subscript of the current const_iterator3d_range.

Returns
the first subscript.

Definition at line 1281 of file iterator3d_range.hpp.

template<typename T >
int slip::const_iterator3d_range< T >::x2 ( )
inline

Access to the second subscript of the current const_iterator3d_range.

Returns
the second subscript.

Definition at line 1299 of file iterator3d_range.hpp.

template<typename T >
int slip::const_iterator3d_range< T >::x3 ( )
inline

Access to the third subscript of the current const_iterator3d_range.

Returns
the third subscript.

Definition at line 1317 of file iterator3d_range.hpp.

Friends And Related Function Documentation

template<typename T >
bool operator!= ( const self i1,
const self i2 
)
friend

Inequality operator.

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

Definition at line 996 of file iterator3d_range.hpp.

template<typename T >
difference_type operator- ( const self i1,
const self i2 
)
friend

const_iterator3d_range difference operator.

Parameters
i1first const_iterator3d_range.
i2second const_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 1143 of file iterator3d_range.hpp.

template<typename T >
bool operator< ( const self i1,
const self i2 
)
friend

< operator.

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

Definition at line 1015 of file iterator3d_range.hpp.

template<typename T >
bool operator<= ( const self i1,
const self i2 
)
friend

<= operator.

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

Definition at line 1043 of file iterator3d_range.hpp.

template<typename T >
bool operator== ( const self i1,
const self i2 
)
friend

Equality operator.

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

Definition at line 981 of file iterator3d_range.hpp.

template<typename T >
bool operator> ( const self i1,
const self i2 
)
friend

operator.

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

Definition at line 1029 of file iterator3d_range.hpp.

template<typename T >
bool operator>= ( const self i1,
const self i2 
)
friend

>= operator.

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

Definition at line 1057 of file iterator3d_range.hpp.


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