Jive reference manual
List of all members | Public Types | Public Member Functions | Static Public Attributes | Related Functions
jem::ArrayIterator< T, N > Class Template Reference

#include <jem/base/array/Iterator.h>

Public Types

enum  EndTag { END_TAG }
 
typedef std::bidirectional_iterator_tag iterator_category
 
typedef idx_t difference_type
 
typedef T value_type
 
typedef T & reference
 
typedef T * pointer
 
typedef ArrayIterator Self
 
typedef Tuple< idx_t, N > Index
 
typedef Tuple< idx_t, N > Shape
 

Public Member Functions

 ArrayIterator ()
 
 ArrayIterator (T *data, const Shape &shape, const Shape &stride)
 
 ArrayIterator (T *data, const Shape &shape, const Shape &stride, EndTag tag)
 
 ArrayIterator (const Self &rhs)
 
Selfoperator++ ()
 
Self operator++ (int)
 
Selfoperator-- ()
 
Self operator-- (int)
 
reference operator* () const
 
pointer operator-> () const
 
bool operator== (const Self &rhs) const
 
bool operator!= (const Self &rhs) const
 

Static Public Attributes

static const int LAST_DIM = N - 1
 

Related Functions

(Note that these are not member functions.)

template<class T >
idx_t distance (const ArrayIterator< T, 1 > &first, const ArrayIterator< T, 1 > &last)
 returns the number of elements stored in between two array iterators. More...
 

Member Typedef Documentation

template<class T , int N>
typedef std::bidirectional_iterator_tag jem::ArrayIterator< T, N >::iterator_category
template<class T , int N>
typedef idx_t jem::ArrayIterator< T, N >::difference_type
template<class T , int N>
typedef T jem::ArrayIterator< T, N >::value_type
template<class T , int N>
typedef T& jem::ArrayIterator< T, N >::reference
template<class T , int N>
typedef T* jem::ArrayIterator< T, N >::pointer
template<class T , int N>
typedef ArrayIterator jem::ArrayIterator< T, N >::Self
template<class T , int N>
typedef Tuple<idx_t,N> jem::ArrayIterator< T, N >::Index
template<class T , int N>
typedef Tuple<idx_t,N> jem::ArrayIterator< T, N >::Shape

Member Enumeration Documentation

template<class T , int N>
enum jem::ArrayIterator::EndTag
Enumerator
END_TAG 

Constructor & Destructor Documentation

template<class T , int N>
jem::ArrayIterator< T, N >::ArrayIterator ( )
template<class T , int N>
jem::ArrayIterator< T, N >::ArrayIterator ( T *  data,
const Shape shape,
const Shape stride 
)
template<class T , int N>
jem::ArrayIterator< T, N >::ArrayIterator ( T *  data,
const Shape shape,
const Shape stride,
EndTag  tag 
)
template<class T , int N>
jem::ArrayIterator< T, N >::ArrayIterator ( const Self rhs)

Member Function Documentation

template<class T , int N>
Self& jem::ArrayIterator< T, N >::operator++ ( )
template<class T , int N>
Self jem::ArrayIterator< T, N >::operator++ ( int  )
template<class T , int N>
Self& jem::ArrayIterator< T, N >::operator-- ( )
template<class T , int N>
Self jem::ArrayIterator< T, N >::operator-- ( int  )
template<class T , int N>
reference jem::ArrayIterator< T, N >::operator* ( ) const
template<class T , int N>
pointer jem::ArrayIterator< T, N >::operator-> ( ) const
template<class T , int N>
bool jem::ArrayIterator< T, N >::operator== ( const Self rhs) const
template<class T , int N>
bool jem::ArrayIterator< T, N >::operator!= ( const Self rhs) const

Friends And Related Function Documentation

template<class T >
idx_t distance ( const ArrayIterator< T, 1 > &  first,
const ArrayIterator< T, 1 > &  last 
)
related

Returns the the number of elements stored in between two array iterators. Both iterators should be associated with the same Array.

Parameters
first- array iterator referred to the first element
last- array iterator referred to the last element
Returns
the distance, or the number of elements stored, between the elements referred to by the first and last iterator.

Member Data Documentation

template<class T , int N>
const int jem::ArrayIterator< T, N >::LAST_DIM = N - 1
static