LSSTApplications  10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
ndarray::detail::StridedIterator< T > Class Template Reference

#include <StridedIterator.h>

Inheritance diagram for ndarray::detail::StridedIterator< T >:

Public Types

typedef T Value
 
typedef T & Reference
 

Public Member Functions

 StridedIterator ()
 
 StridedIterator (T *data, int stride)
 
 StridedIterator (StridedIterator const &other)
 
template<typename U >
 StridedIterator (StridedIterator< U > const &other)
 
StridedIteratoroperator= (StridedIterator const &other)
 
template<typename U >
StridedIteratoroperator= (StridedIterator< U > const &other)
 

Private Member Functions

Reference dereference () const
 
void increment ()
 
void decrement ()
 
void advance (int n)
 
template<typename U >
int distance_to (StridedIterator< U > const &other) const
 
template<typename U >
bool equal (StridedIterator< U > const &other) const
 

Private Attributes

T * _data
 
int _stride
 

Friends

class boost::iterator_core_access
 
template<typename OtherT >
class StridedIterator
 

Detailed Description

template<typename T>
class ndarray::detail::StridedIterator< T >

Definition at line 44 of file StridedIterator.h.

Member Typedef Documentation

template<typename T>
typedef T& ndarray::detail::StridedIterator< T >::Reference

Definition at line 51 of file StridedIterator.h.

template<typename T>
typedef T ndarray::detail::StridedIterator< T >::Value

Definition at line 50 of file StridedIterator.h.

Constructor & Destructor Documentation

template<typename T>
ndarray::detail::StridedIterator< T >::StridedIterator ( )
inline
template<typename T>
ndarray::detail::StridedIterator< T >::StridedIterator ( T *  data,
int  stride 
)
inline

Definition at line 55 of file StridedIterator.h.

template<typename T>
ndarray::detail::StridedIterator< T >::StridedIterator ( StridedIterator< T > const &  other)
inline

Definition at line 57 of file StridedIterator.h.

template<typename T>
template<typename U >
ndarray::detail::StridedIterator< T >::StridedIterator ( StridedIterator< U > const &  other)
inline

Definition at line 60 of file StridedIterator.h.

60  : _data(other._data), _stride(other._stride) {
61  BOOST_STATIC_ASSERT((boost::is_convertible<U*,T*>::value));
62  }

Member Function Documentation

template<typename T>
void ndarray::detail::StridedIterator< T >::advance ( int  n)
inlineprivate
template<typename T>
void ndarray::detail::StridedIterator< T >::decrement ( )
inlineprivate
template<typename T>
Reference ndarray::detail::StridedIterator< T >::dereference ( ) const
inlineprivate

Definition at line 86 of file StridedIterator.h.

template<typename T>
template<typename U >
int ndarray::detail::StridedIterator< T >::distance_to ( StridedIterator< U > const &  other) const
inlineprivate

Definition at line 93 of file StridedIterator.h.

93  {
94  return std::distance(_data, other._data) / _stride;
95  }
template<typename T>
template<typename U >
bool ndarray::detail::StridedIterator< T >::equal ( StridedIterator< U > const &  other) const
inlineprivate

Definition at line 98 of file StridedIterator.h.

98  {
99  return _data == other._data;
100  }
template<typename T>
void ndarray::detail::StridedIterator< T >::increment ( )
inlineprivate
template<typename T>
StridedIterator& ndarray::detail::StridedIterator< T >::operator= ( StridedIterator< T > const &  other)
inline

Definition at line 64 of file StridedIterator.h.

64  {
65  if (&other != this) {
66  _data = other._data;
67  _stride = other._stride;
68  }
69  return *this;
70  }
template<typename T>
template<typename U >
StridedIterator& ndarray::detail::StridedIterator< T >::operator= ( StridedIterator< U > const &  other)
inline

Definition at line 73 of file StridedIterator.h.

73  {
74  BOOST_STATIC_ASSERT((boost::is_convertible<U*,T*>::value));
75  _data = other._data;
76  _stride = other._stride;
77  return *this;
78  }

Friends And Related Function Documentation

template<typename T>
template<typename OtherT >
friend class StridedIterator
friend

Definition at line 84 of file StridedIterator.h.

template<typename T>
friend class boost::iterator_core_access
friend

Definition at line 82 of file StridedIterator.h.

Member Data Documentation

template<typename T>
T* ndarray::detail::StridedIterator< T >::_data
private

Definition at line 102 of file StridedIterator.h.

template<typename T>
int ndarray::detail::StridedIterator< T >::_stride
private

Definition at line 103 of file StridedIterator.h.


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