MoochoPack: Miscellaneous Utilities for MOOCHO  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type > Class Template Reference

C++ Standard Library compatable iterator class for accesing nonunit stride arrays of data. More...

#include <StrideIterPack_StrideIter.hpp>

Public Member Functions

difference_type operator- (const stride_iter &itr) const
 distance = itr1 - itr2 (distance between elements) More...
 

typedefs

typedef
std::random_access_iterator_tag 
iterator_category
 
typedef T_iterator_type iterator_type
 
typedef T_value_type value_type
 
typedef T_reference_type reference
 
typedef T_pointer_type pointer
 
typedef T_difference_type difference_type
 

Constructors. Uses default copy constructor and assignment operator

 stride_iter ()
 constructs to a null iterator More...
 
 stride_iter (iterator_type current)
 constructs to the standard iterator (behaves as) (increment 1). Allows conversion from iterator. More...
 
 stride_iter (iterator_type current, difference_type stride)
 constructs to the desired sliced iterator More...
 
template<class Iter , class Val , class Ref , class Ptr , class Diff >
 stride_iter (const stride_iter< Iter, Val, Ref, Ptr, Diff > &rhs)
 convert type of iterators (mainly for non-const to const) More...
 
template<class Iter , class Val , class Ref , class Ptr , class Diff >
stride_iteroperator= (const stride_iter< Iter, Val, Ref, Ptr, Diff > &rhs)
 assign different types of iterators (mainly for non-const to const) More...
 

Access

reference operator* () const
 
pointer operator-> () const
 
reference operator[] (difference_type n) const
 

Incrementation

stride_iteroperator++ ()
 ++itr More...
 
const stride_iter operator++ (int)
 itr++ More...
 
stride_iteroperator-- ()
 –itr More...
 
const stride_iter operator-- (int)
 itr– More...
 
stride_iter operator+ (difference_type n)
 itr + n More...
 
const stride_iter operator+ (difference_type n) const
 itr + n More...
 
stride_iteroperator+= (difference_type n)
 itr += n More...
 
stride_iter operator- (difference_type n)
 itr - n More...
 
const stride_iter operator- (difference_type n) const
 itr - n More...
 
stride_iteroperator-= (difference_type n)
 itr -= n More...
 

Implimentation access

iterator_type current () const
 
difference_type stride () const
 

Detailed Description

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
class StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >

C++ Standard Library compatable iterator class for accesing nonunit stride arrays of data.

Random access iterator adaptor for non-unit strides. This iterator does not have any range checking for maximum efficency. It was desinged with the purpose of allowing a slice from an array (BLAS matrix row) to be used. It, however can be used with any random access iterator. There are several non-member functions that can be used with this class.

Definition at line 59 of file StrideIterPack_StrideIter.hpp.

Member Typedef Documentation

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
typedef std::random_access_iterator_tag StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::iterator_category

Definition at line 65 of file StrideIterPack_StrideIter.hpp.

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
typedef T_iterator_type StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::iterator_type

Definition at line 67 of file StrideIterPack_StrideIter.hpp.

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
typedef T_value_type StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::value_type

Definition at line 69 of file StrideIterPack_StrideIter.hpp.

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
typedef T_reference_type StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::reference

Definition at line 71 of file StrideIterPack_StrideIter.hpp.

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
typedef T_pointer_type StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::pointer

Definition at line 73 of file StrideIterPack_StrideIter.hpp.

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
typedef T_difference_type StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::difference_type

Definition at line 75 of file StrideIterPack_StrideIter.hpp.

Constructor & Destructor Documentation

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::stride_iter ( )
inline

constructs to a null iterator

Definition at line 83 of file StrideIterPack_StrideIter.hpp.

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::stride_iter ( iterator_type  current)
inline

constructs to the standard iterator (behaves as) (increment 1). Allows conversion from iterator.

Definition at line 86 of file StrideIterPack_StrideIter.hpp.

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::stride_iter ( iterator_type  current,
difference_type  stride 
)
inline

constructs to the desired sliced iterator

Definition at line 89 of file StrideIterPack_StrideIter.hpp.

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
template<class Iter , class Val , class Ref , class Ptr , class Diff >
StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::stride_iter ( const stride_iter< Iter, Val, Ref, Ptr, Diff > &  rhs)
inline

convert type of iterators (mainly for non-const to const)

Definition at line 93 of file StrideIterPack_StrideIter.hpp.

Member Function Documentation

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
template<class Iter , class Val , class Ref , class Ptr , class Diff >
stride_iter& StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::operator= ( const stride_iter< Iter, Val, Ref, Ptr, Diff > &  rhs)
inline

assign different types of iterators (mainly for non-const to const)

Definition at line 97 of file StrideIterPack_StrideIter.hpp.

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
reference StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::operator* ( ) const
inline

Definition at line 107 of file StrideIterPack_StrideIter.hpp.

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
pointer StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::operator-> ( ) const
inline

Definition at line 111 of file StrideIterPack_StrideIter.hpp.

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
reference StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::operator[] ( difference_type  n) const
inline

Definition at line 115 of file StrideIterPack_StrideIter.hpp.

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
stride_iter& StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::operator++ ( )
inline

++itr

Definition at line 125 of file StrideIterPack_StrideIter.hpp.

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
const stride_iter StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::operator++ ( int  )
inline

itr++

Definition at line 130 of file StrideIterPack_StrideIter.hpp.

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
stride_iter& StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::operator-- ( )
inline

–itr

Definition at line 135 of file StrideIterPack_StrideIter.hpp.

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
const stride_iter StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::operator-- ( int  )
inline

itr–

Definition at line 140 of file StrideIterPack_StrideIter.hpp.

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
stride_iter StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::operator+ ( difference_type  n)
inline

itr + n

Definition at line 145 of file StrideIterPack_StrideIter.hpp.

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
const stride_iter StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::operator+ ( difference_type  n) const
inline

itr + n

Definition at line 149 of file StrideIterPack_StrideIter.hpp.

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
stride_iter& StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::operator+= ( difference_type  n)
inline

itr += n

Definition at line 153 of file StrideIterPack_StrideIter.hpp.

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
stride_iter StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::operator- ( difference_type  n)
inline

itr - n

Definition at line 158 of file StrideIterPack_StrideIter.hpp.

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
const stride_iter StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::operator- ( difference_type  n) const
inline

itr - n

Definition at line 162 of file StrideIterPack_StrideIter.hpp.

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
stride_iter& StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::operator-= ( difference_type  n)
inline

itr -= n

Definition at line 166 of file StrideIterPack_StrideIter.hpp.

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
difference_type StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::operator- ( const stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type > &  itr) const
inline

distance = itr1 - itr2 (distance between elements)

Definition at line 174 of file StrideIterPack_StrideIter.hpp.

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
iterator_type StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::current ( ) const
inline

Definition at line 182 of file StrideIterPack_StrideIter.hpp.

template<class T_iterator_type, class T_value_type, class T_reference_type, class T_pointer_type, class T_difference_type>
difference_type StrideIterPack::stride_iter< T_iterator_type, T_value_type, T_reference_type, T_pointer_type, T_difference_type >::stride ( ) const
inline

Definition at line 187 of file StrideIterPack_StrideIter.hpp.


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