Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::numeric::ublas::vector< T, A >::const_iterator Class Reference

#include <vector.hpp>

Inheritance diagram for boost::numeric::ublas::vector< T, A >::const_iterator:
Collaboration diagram for boost::numeric::ublas::vector< T, A >::const_iterator:

Public Types

typedef vector::difference_type difference_type
 
typedef vector::value_type value_type
 
typedef vector::const_reference reference
 
typedef const vector::pointer pointer
 

Public Member Functions

BOOST_UBLAS_INLINE const_iterator ()
 
BOOST_UBLAS_INLINE const_iterator (const self_type &v, const const_subiterator_type &it)
 
BOOST_UBLAS_INLINE const_iterator (const typename self_type::iterator &it)
 
BOOST_UBLAS_INLINE const_iteratoroperator++ ()
 Increment by 1 the position of the iterator. More...
 
BOOST_UBLAS_INLINE const_iteratoroperator-- ()
 Decrement by 1 the position of the iterator. More...
 
BOOST_UBLAS_INLINE const_iteratoroperator+= (difference_type n)
 Increment by n the position of the iterator. More...
 
BOOST_UBLAS_INLINE const_iteratoroperator-= (difference_type n)
 Decrement by n the position of the iterator. More...
 
BOOST_UBLAS_INLINE difference_type operator- (const const_iterator &it) const
 Return the different in number of positions between 2 iterators. More...
 
BOOST_UBLAS_INLINE const_reference operator* () const
 Dereference an iterator Dereference an iterator: a bounds' check is done before returning the value. More...
 
BOOST_UBLAS_INLINE const_reference operator[] (difference_type n) const
 Dereference an iterator at the n-th forward value Dereference an iterator at the n-th forward value, that is the value pointed by iterator+n. More...
 
BOOST_UBLAS_INLINE size_type index () const
 return the index of the element referenced by the iterator More...
 
BOOST_UBLAS_INLINE const_iteratoroperator= (const const_iterator &it)
 assign the value of an iterator to the iterator More...
 
BOOST_UBLAS_INLINE bool operator== (const const_iterator &it) const
 compare the value of two itetarors More...
 
BOOST_UBLAS_INLINE bool operator< (const const_iterator &it) const
 compare the value of two iterators More...
 

Friends

class iterator
 

Member Typedef Documentation

template<class T, class A>
typedef const vector::pointer boost::numeric::ublas::vector< T, A >::const_iterator::pointer

Constructor & Destructor Documentation

template<class T, class A>
BOOST_UBLAS_INLINE boost::numeric::ublas::vector< T, A >::const_iterator::const_iterator ( )
inline
template<class T, class A>
BOOST_UBLAS_INLINE boost::numeric::ublas::vector< T, A >::const_iterator::const_iterator ( const self_type v,
const const_subiterator_type &  it 
)
inline
template<class T, class A>
BOOST_UBLAS_INLINE boost::numeric::ublas::vector< T, A >::const_iterator::const_iterator ( const typename self_type::iterator it)
inline

Member Function Documentation

template<class T, class A>
BOOST_UBLAS_INLINE size_type boost::numeric::ublas::vector< T, A >::const_iterator::index ( ) const
inline

return the index of the element referenced by the iterator

References boost::numeric::ublas::vector< T, A >::begin(), BOOST_UBLAS_CHECK, and boost::numeric::ublas::vector< T, A >::end().

template<class T, class A>
BOOST_UBLAS_INLINE const_reference boost::numeric::ublas::vector< T, A >::const_iterator::operator* ( ) const
inline

Dereference an iterator Dereference an iterator: a bounds' check is done before returning the value.

A bad_index() expection is returned if out of bounds.

Returns
a const reference to the value pointed by the iterator

References boost::numeric::ublas::vector< T, A >::begin(), BOOST_UBLAS_CHECK, and boost::numeric::ublas::vector< T, A >::end().

template<class T, class A>
BOOST_UBLAS_INLINE const_iterator& boost::numeric::ublas::vector< T, A >::const_iterator::operator++ ( void  )
inline

Increment by 1 the position of the iterator.

Returns
a reference to the const iterator
template<class T, class A>
BOOST_UBLAS_INLINE const_iterator& boost::numeric::ublas::vector< T, A >::const_iterator::operator+= ( difference_type  n)
inline

Increment by n the position of the iterator.

Returns
a reference to the const iterator

References boost::n.

template<class T, class A>
BOOST_UBLAS_INLINE difference_type boost::numeric::ublas::vector< T, A >::const_iterator::operator- ( const const_iterator it) const
inline

Return the different in number of positions between 2 iterators.

References BOOST_UBLAS_CHECK.

template<class T, class A>
BOOST_UBLAS_INLINE const_iterator& boost::numeric::ublas::vector< T, A >::const_iterator::operator-- ( void  )
inline

Decrement by 1 the position of the iterator.

Returns
a reference to the const iterator
template<class T, class A>
BOOST_UBLAS_INLINE const_iterator& boost::numeric::ublas::vector< T, A >::const_iterator::operator-= ( difference_type  n)
inline

Decrement by n the position of the iterator.

Returns
a reference to the const iterator

References boost::n.

template<class T, class A>
BOOST_UBLAS_INLINE bool boost::numeric::ublas::vector< T, A >::const_iterator::operator< ( const const_iterator it) const
inline

compare the value of two iterators

Returns
return true if the left-hand-side iterator refers to a value placed before the right-hand-side iterator

References BOOST_UBLAS_CHECK.

template<class T, class A>
BOOST_UBLAS_INLINE const_iterator& boost::numeric::ublas::vector< T, A >::const_iterator::operator= ( const const_iterator it)
inline

assign the value of an iterator to the iterator

References boost::assign().

template<class T, class A>
BOOST_UBLAS_INLINE bool boost::numeric::ublas::vector< T, A >::const_iterator::operator== ( const const_iterator it) const
inline

compare the value of two itetarors

Returns
true if they reference the same element

References BOOST_UBLAS_CHECK.

template<class T, class A>
BOOST_UBLAS_INLINE const_reference boost::numeric::ublas::vector< T, A >::const_iterator::operator[] ( difference_type  n) const
inline

Dereference an iterator at the n-th forward value Dereference an iterator at the n-th forward value, that is the value pointed by iterator+n.

A bounds' check is done before returning the value. A bad_index() expection is returned if out of bounds.

Returns
a const reference

References boost::n.

Friends And Related Function Documentation

template<class T, class A>
friend class iterator
friend

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