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_range< MultiComponentContainer4d, N > Class Template Reference

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

#include <component_iterator4d_range.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_range self
 
typedef
MultiComponentContainer4d::size_type 
size_type
 

Public Member Functions

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

component_iterator4d_range operators addons

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

Detailed Description

template<class MultiComponentContainer4d, std::size_t N>
class slip::component_iterator4d_range< MultiComponentContainer4d, N >

This is some iterator to iterate a 4d container into two Range defined by the indices and strides 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_range
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 range area defined inside the indices range of the 4d container. Those indices are defined as follows :
iterator4d_conventions.jpg
axis and notation conventions

Definition at line 107 of file component_iterator4d_range.hpp.

Member Typedef Documentation

template<class MultiComponentContainer4d , std::size_t N>
typedef MultiComponentContainer4d::value_type slip::component_iterator4d_range< MultiComponentContainer4d, N >::Block

Definition at line 112 of file component_iterator4d_range.hpp.

template<class MultiComponentContainer4d , std::size_t N>
typedef DPoint4d<int> slip::component_iterator4d_range< MultiComponentContainer4d, N >::difference_type

Definition at line 114 of file component_iterator4d_range.hpp.

template<class MultiComponentContainer4d , std::size_t N>
typedef std::random_access_iterator4d_tag slip::component_iterator4d_range< MultiComponentContainer4d, N >::iterator_category

Definition at line 111 of file component_iterator4d_range.hpp.

template<class MultiComponentContainer4d , std::size_t N>
typedef value_type* slip::component_iterator4d_range< MultiComponentContainer4d, N >::pointer

Definition at line 115 of file component_iterator4d_range.hpp.

template<class MultiComponentContainer4d , std::size_t N>
typedef value_type& slip::component_iterator4d_range< MultiComponentContainer4d, N >::reference

Definition at line 116 of file component_iterator4d_range.hpp.

template<class MultiComponentContainer4d , std::size_t N>
typedef component_iterator4d_range slip::component_iterator4d_range< MultiComponentContainer4d, N >::self

Definition at line 118 of file component_iterator4d_range.hpp.

template<class MultiComponentContainer4d , std::size_t N>
typedef MultiComponentContainer4d::size_type slip::component_iterator4d_range< MultiComponentContainer4d, N >::size_type

Definition at line 120 of file component_iterator4d_range.hpp.

template<class MultiComponentContainer4d , std::size_t N>
typedef Block::value_type slip::component_iterator4d_range< MultiComponentContainer4d, N >::value_type

Definition at line 113 of file component_iterator4d_range.hpp.

Constructor & Destructor Documentation

template<class MultiComponentContainer4d , std::size_t N>
slip::component_iterator4d_range< MultiComponentContainer4d, N >::component_iterator4d_range ( )
inline

Constructs a component_iterator4d_range.

The range to iterate is in this case the full container

Definition at line 130 of file component_iterator4d_range.hpp.

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

Constructs a component_iterator4d_range.

Parameters
cpointer to an existing 4d container
cpindex of the component to iterate
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
r4Range<int> defining the range of indices of the fourth axis to iterate
Precondition
range indices must be inside those of the 4d container

Definition at line 149 of file component_iterator4d_range.hpp.

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

Constructs a copy of the component_iterator4d_range o.

Parameters
ocomponent_iterator4d_range to copy.

Definition at line 169 of file component_iterator4d_range.hpp.

Member Function Documentation

template<class MultiComponentContainer4d , std::size_t N>
MultiComponentContainer4d::component_col_range_iterator slip::component_iterator4d_range< MultiComponentContainer4d, N >::col_begin ( size_type  slab,
size_type  slice,
size_type  col 
)
inline

component_iterator4d_range element assignment operator.

Parameters
slaboffset.
sliceoffset.
rowoffset.
Returns
a range_col_iterator to the first element of range at the slab slab of the slab range, the slice slice of the slice range and the col col of the col range

Definition at line 740 of file component_iterator4d_range.hpp.

template<class MultiComponentContainer4d , std::size_t N>
MultiComponentContainer4d::component_col_range_iterator slip::component_iterator4d_range< MultiComponentContainer4d, N >::col_end ( size_type  slab,
size_type  slice,
size_type  col 
)
inline

component_iterator4d_range element assignment operator.

Parameters
slaboffset.
sliceoffset.
rowoffset.
Returns
a range_col_iterator to the past-the-end element of range at the slab slab of the slab range, the slice slice of the slice range and the col col of the col range

Definition at line 760 of file component_iterator4d_range.hpp.

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

Access to the component index of the current component_iterator4d_range.

Returns
the component index

Definition at line 856 of file component_iterator4d_range.hpp.

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

Access to the third index of the current component_iterator4d_range.

Returns
the third index.

Definition at line 826 of file component_iterator4d_range.hpp.

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

Access to the fourthindex of the current component_iterator4d_range.

Returns
the fourth index.

Definition at line 845 of file component_iterator4d_range.hpp.

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

Access to the second index of the current component_iterator4d_range.

Returns
the second index.

Definition at line 807 of file component_iterator4d_range.hpp.

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

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

Returns
a component_iterator4d_range reference.

Definition at line 215 of file component_iterator4d_range.hpp.

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

component_iterator4d_range addition.

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

Definition at line 548 of file component_iterator4d_range.hpp.

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

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

Definition at line 236 of file component_iterator4d_range.hpp.

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

Postincrement a component_iterator4d_range. Iterate to the next location inside the Range4d.

Definition at line 298 of file component_iterator4d_range.hpp.

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

component_iterator4d_range addition.

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

Definition at line 502 of file component_iterator4d_range.hpp.

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

component_iterator4d_range substraction.

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

Definition at line 563 of file component_iterator4d_range.hpp.

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

Predecrement a component_iterator4d_range. Iterate to the previous location inside the Range4d.

Definition at line 317 of file component_iterator4d_range.hpp.

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

Postdecrement a component_iterator4d_range. Iterate to the previous location inside the Range4d.

Definition at line 382 of file component_iterator4d_range.hpp.

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

component_iterator4d_range substraction.

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

Definition at line 525 of file component_iterator4d_range.hpp.

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

Definition at line 221 of file component_iterator4d_range.hpp.

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

Assign a component_iterator4d_range.

Assign elements of component_iterator4d_range in o.

Parameters
ocomponent_iterator4d_range to get the values from.
Returns
a component_iterator4d_range reference.

Definition at line 188 of file component_iterator4d_range.hpp.

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

component_iterator4d_range 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 602 of file component_iterator4d_range.hpp.

template<class MultiComponentContainer4d , std::size_t N>
MultiComponentContainer4d::component_row_range_iterator slip::component_iterator4d_range< MultiComponentContainer4d, N >::row_begin ( size_type  slab,
size_type  slice,
size_type  row 
)
inline

component_iterator4d_range element assignment operator.

Parameters
slaboffset.
sliceoffset.
rowoffset.
Returns
a row_range_iterator to the first element of range at the slab slab of the slab range, the slice slice of the slice range and the row row of the row range

Definition at line 701 of file component_iterator4d_range.hpp.

template<class MultiComponentContainer4d , std::size_t N>
MultiComponentContainer4d::component_row_range_iterator slip::component_iterator4d_range< MultiComponentContainer4d, N >::row_end ( size_type  slab,
size_type  slice,
size_type  row 
)
inline

component_iterator4d_range element assignment operator.

Parameters
slaboffset.
sliceoffset.
rowoffset.
Returns
a row_range_iterator to the past-the-end element of range at the slab slab of the slab range, the slice slice of the slice range and the row row of the row range

Definition at line 722 of file component_iterator4d_range.hpp.

template<class MultiComponentContainer4d , std::size_t N>
MultiComponentContainer4d::component_slice_range_iterator slip::component_iterator4d_range< MultiComponentContainer4d, N >::slab_begin ( size_type  slice,
size_type  row,
size_type  col 
)
inline

component_iterator4d_range element assignment operator.

Parameters
sliceoffset
rowoffset.
coloffset.
Returns
a slab_range_iterator to the first element of range at the slice slice of the slice range, the row row of the row range and the col col of the col range

Definition at line 625 of file component_iterator4d_range.hpp.

template<class MultiComponentContainer4d , std::size_t N>
MultiComponentContainer4d::component_slice_range_iterator slip::component_iterator4d_range< MultiComponentContainer4d, N >::slab_end ( size_type  slice,
size_type  row,
size_type  col 
)
inline

component_iterator4d_range element assignment operator.

Parameters
sliceoffset
rowoffset.
coloffset.
Returns
a slab_range_iterator to the past-the-end element of range at the slice slice of the slice range, the row row of the row range and the col col of the col range

Definition at line 646 of file component_iterator4d_range.hpp.

template<class MultiComponentContainer4d , std::size_t N>
MultiComponentContainer4d::component_slice_range_iterator slip::component_iterator4d_range< MultiComponentContainer4d, N >::slice_begin ( size_type  slab,
size_type  row,
size_type  col 
)
inline

component_iterator4d_range element assignment operator.

Parameters
slaboffset.
rowoffset.
coloffset.
Returns
a slice_range_iterator to the first element of range at the slab slab of the slab range, the row row of the row range and the col col of the col range

Definition at line 663 of file component_iterator4d_range.hpp.

template<class MultiComponentContainer4d , std::size_t N>
MultiComponentContainer4d::component_slice_range_iterator slip::component_iterator4d_range< MultiComponentContainer4d, N >::slice_end ( size_type  slab,
size_type  row,
size_type  col 
)
inline

component_iterator4d_range element assignment operator.

Parameters
slaboffset.
rowoffset.
coloffset.
Returns
a slice_range_iterator to the past-the-end element of range at the slab slab of the slab range, the row row of the row range and the col col of the col range

Definition at line 684 of file component_iterator4d_range.hpp.

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

Access to the first index of the current component_iterator4d_range.

Returns
the first index.

Definition at line 788 of file component_iterator4d_range.hpp.

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

Access to the first index of the current component_iterator4d_range.

Returns
the first index.

Definition at line 779 of file component_iterator4d_range.hpp.

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

Access to the second index of the current component_iterator4d_range.

Returns
the second index.

Definition at line 798 of file component_iterator4d_range.hpp.

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

Access to the third index of the current component_iterator4d_range.

Returns
the third index.

Definition at line 817 of file component_iterator4d_range.hpp.

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

Access to the fourth index of the current component_iterator4d_range.

Returns
the fourth index.

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

Definition at line 419 of file component_iterator4d_range.hpp.

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

component_iterator4d_range difference operator.

Parameters
i1first component_iterator4d_range.
i2second component_iterator4d_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 579 of file component_iterator4d_range.hpp.

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

< operator.

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

Definition at line 439 of file component_iterator4d_range.hpp.

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

<= operator.

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

Definition at line 467 of file component_iterator4d_range.hpp.

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

Equality operator.

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

Definition at line 403 of file component_iterator4d_range.hpp.

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

operator.

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

Definition at line 453 of file component_iterator4d_range.hpp.

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

>= operator.

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

Definition at line 481 of file component_iterator4d_range.hpp.


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