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_slice< V > Class Template Reference

A vector referencing a non continuous subvector of elements of vector v containing all elements specified by slice. More...

#include <vector_proxy.hpp>

Inheritance diagram for boost::numeric::ublas::vector_slice< V >:
Collaboration diagram for boost::numeric::ublas::vector_slice< V >:

Classes

class  const_iterator
 
class  iterator
 

Public Types

typedef const V const_vector_type
 
typedef V vector_type
 
typedef V::size_type size_type
 
typedef V::difference_type difference_type
 
typedef V::value_type value_type
 
typedef V::const_reference const_reference
 
typedef boost::mpl::if_
< boost::is_const< V >
, typename V::const_reference,
typename V::reference >::type 
reference
 
typedef boost::mpl::if_
< boost::is_const< V >
, typename
V::const_closure_type,
typename V::closure_type >
::type 
vector_closure_type
 
typedef basic_range< size_type,
difference_type
range_type
 
typedef basic_slice< size_type,
difference_type
slice_type
 
typedef const self_type const_closure_type
 
typedef self_type closure_type
 
typedef
storage_restrict_traits
< typename V::storage_category,
dense_proxy_tag >
::storage_category 
storage_category
 
typedef reverse_iterator_base
< const_iterator
const_reverse_iterator
 
typedef reverse_iterator_base
< iterator
reverse_iterator
 
typedef vector_slice< V > expression_type
 
typedef vector_tag type_category
 

Public Member Functions

BOOST_UBLAS_INLINE vector_slice (vector_type &data, const slice_type &s)
 
BOOST_UBLAS_INLINE vector_slice (const vector_closure_type &data, const slice_type &s, int)
 
BOOST_UBLAS_INLINE size_type start () const
 
BOOST_UBLAS_INLINE difference_type stride () const
 
BOOST_UBLAS_INLINE size_type size () const
 
BOOST_UBLAS_INLINE const
vector_closure_type
data () const
 
BOOST_UBLAS_INLINE
vector_closure_type
data ()
 
BOOST_UBLAS_INLINE const_reference operator() (size_type i) const
 
BOOST_UBLAS_INLINE reference operator() (size_type i)
 
BOOST_UBLAS_INLINE const_reference operator[] (size_type i) const
 
BOOST_UBLAS_INLINE reference operator[] (size_type i)
 
BOOST_UBLAS_INLINE
vector_slice< vector_type
project (const range_type &r) const
 
BOOST_UBLAS_INLINE
vector_slice< vector_type
project (const slice_type &s) const
 
BOOST_UBLAS_INLINE vector_sliceoperator= (const vector_slice &vs)
 
BOOST_UBLAS_INLINE vector_sliceassign_temporary (vector_slice &vs)
 
template<class AE >
BOOST_UBLAS_INLINE vector_sliceoperator= (const vector_expression< AE > &ae)
 
template<class AE >
BOOST_UBLAS_INLINE vector_sliceassign (const vector_expression< AE > &ae)
 
template<class AE >
BOOST_UBLAS_INLINE vector_sliceoperator+= (const vector_expression< AE > &ae)
 
template<class AE >
BOOST_UBLAS_INLINE vector_sliceplus_assign (const vector_expression< AE > &ae)
 
template<class AE >
BOOST_UBLAS_INLINE vector_sliceoperator-= (const vector_expression< AE > &ae)
 
template<class AE >
BOOST_UBLAS_INLINE vector_sliceminus_assign (const vector_expression< AE > &ae)
 
template<class AT >
BOOST_UBLAS_INLINE vector_sliceoperator*= (const AT &at)
 
template<class AT >
BOOST_UBLAS_INLINE vector_sliceoperator/= (const AT &at)
 
BOOST_UBLAS_INLINE bool same_closure (const vector_slice &vr) const
 
BOOST_UBLAS_INLINE bool operator== (const vector_slice &vs) const
 
BOOST_UBLAS_INLINE void swap (vector_slice vs)
 
BOOST_UBLAS_INLINE const_iterator find (size_type i) const
 
BOOST_UBLAS_INLINE iterator find (size_type i)
 
BOOST_UBLAS_INLINE const_iterator begin () const
 
BOOST_UBLAS_INLINE const_iterator cbegin () const
 
BOOST_UBLAS_INLINE const_iterator end () const
 
BOOST_UBLAS_INLINE const_iterator cend () const
 
BOOST_UBLAS_INLINE iterator begin ()
 
BOOST_UBLAS_INLINE iterator end ()
 
BOOST_UBLAS_INLINE
const_reverse_iterator 
rbegin () const
 
BOOST_UBLAS_INLINE
const_reverse_iterator 
crbegin () const
 
BOOST_UBLAS_INLINE
const_reverse_iterator 
rend () const
 
BOOST_UBLAS_INLINE
const_reverse_iterator 
crend () const
 
BOOST_UBLAS_INLINE reverse_iterator rbegin ()
 
BOOST_UBLAS_INLINE reverse_iterator rend ()
 
BOOST_UBLAS_INLINE const
expression_type
operator() () const
 
BOOST_UBLAS_INLINE
expression_type
operator() ()
 

Static Public Attributes

static const unsigned complexity
 

Friends

BOOST_UBLAS_INLINE friend void swap (vector_slice vs1, vector_slice vs2)
 

Detailed Description

template<class V>
class boost::numeric::ublas::vector_slice< V >

A vector referencing a non continuous subvector of elements of vector v containing all elements specified by slice.

A vector slice can be used as a normal vector in any expression. If the specified slice falls outside that of the index slice of the vector, then the vector_slice is not a well formed Vector Expression and access to an element outside of index slice of the vector is undefined.

A slice is a generalization of a range. In a range going from $a$ to $b$, all elements belong to the range. In a slice, a $step$ can be specified meaning to take one element over $step$ in the range specified from $a$ to $b$. Obviously, a slice with a $step$ of 1 is equivalent to a range.

Template Parameters
Vthe type of vector referenced (for example vector<double>)

Member Typedef Documentation

template<class V>
typedef const self_type boost::numeric::ublas::vector_slice< V >::const_closure_type
template<class V>
typedef V::const_reference boost::numeric::ublas::vector_slice< V >::const_reference
template<class V>
typedef reverse_iterator_base<const_iterator> boost::numeric::ublas::vector_slice< V >::const_reverse_iterator
template<class V>
typedef const V boost::numeric::ublas::vector_slice< V >::const_vector_type
template<class V>
typedef V::difference_type boost::numeric::ublas::vector_slice< V >::difference_type
template<class V>
typedef boost::mpl::if_<boost::is_const<V>, typename V::const_reference, typename V::reference>::type boost::numeric::ublas::vector_slice< V >::reference
template<class V>
typedef reverse_iterator_base<iterator> boost::numeric::ublas::vector_slice< V >::reverse_iterator
template<class V>
typedef V::size_type boost::numeric::ublas::vector_slice< V >::size_type
template<class V>
typedef storage_restrict_traits<typename V::storage_category, dense_proxy_tag>::storage_category boost::numeric::ublas::vector_slice< V >::storage_category
template<class V>
typedef V::value_type boost::numeric::ublas::vector_slice< V >::value_type
template<class V>
typedef boost::mpl::if_<boost::is_const<V>, typename V::const_closure_type, typename V::closure_type>::type boost::numeric::ublas::vector_slice< V >::vector_closure_type
template<class V>
typedef V boost::numeric::ublas::vector_slice< V >::vector_type

Constructor & Destructor Documentation

template<class V>
BOOST_UBLAS_INLINE boost::numeric::ublas::vector_slice< V >::vector_slice ( vector_type data,
const slice_type s 
)
inline
template<class V>
BOOST_UBLAS_INLINE boost::numeric::ublas::vector_slice< V >::vector_slice ( const vector_closure_type data,
const slice_type s,
int   
)
inline

Member Function Documentation

template<class V>
template<class AE >
BOOST_UBLAS_INLINE vector_slice& boost::numeric::ublas::vector_slice< V >::assign ( const vector_expression< AE > &  ae)
inline
template<class V>
BOOST_UBLAS_INLINE vector_slice& boost::numeric::ublas::vector_slice< V >::assign_temporary ( vector_slice< V > &  vs)
inline
template<class V>
BOOST_UBLAS_INLINE iterator boost::numeric::ublas::vector_slice< V >::begin ( void  )
inline
template<class V>
BOOST_UBLAS_INLINE const_iterator boost::numeric::ublas::vector_slice< V >::cbegin ( ) const
inline
template<class V>
BOOST_UBLAS_INLINE const_iterator boost::numeric::ublas::vector_slice< V >::cend ( ) const
inline
template<class V>
BOOST_UBLAS_INLINE const_reverse_iterator boost::numeric::ublas::vector_slice< V >::crbegin ( ) const
inline
template<class V>
BOOST_UBLAS_INLINE const_reverse_iterator boost::numeric::ublas::vector_slice< V >::crend ( ) const
inline
template<class V>
BOOST_UBLAS_INLINE const vector_closure_type& boost::numeric::ublas::vector_slice< V >::data ( ) const
inline
template<class V>
BOOST_UBLAS_INLINE vector_closure_type& boost::numeric::ublas::vector_slice< V >::data ( )
inline
template<class V>
template<class AE >
BOOST_UBLAS_INLINE vector_slice& boost::numeric::ublas::vector_slice< V >::minus_assign ( const vector_expression< AE > &  ae)
inline
BOOST_UBLAS_INLINE const expression_type& boost::numeric::ublas::vector_expression< vector_slice< V > >::operator() ( ) const
inlineinherited
BOOST_UBLAS_INLINE expression_type& boost::numeric::ublas::vector_expression< vector_slice< V > >::operator() ( )
inlineinherited
template<class V>
BOOST_UBLAS_INLINE const_reference boost::numeric::ublas::vector_slice< V >::operator() ( size_type  i) const
inline
template<class V>
BOOST_UBLAS_INLINE reference boost::numeric::ublas::vector_slice< V >::operator() ( size_type  i)
inline
template<class V>
template<class AT >
BOOST_UBLAS_INLINE vector_slice& boost::numeric::ublas::vector_slice< V >::operator*= ( const AT &  at)
inline

References boost::xpressive::at.

template<class V>
template<class AE >
BOOST_UBLAS_INLINE vector_slice& boost::numeric::ublas::vector_slice< V >::operator+= ( const vector_expression< AE > &  ae)
inline

References boost::detail::type.

template<class V>
template<class AE >
BOOST_UBLAS_INLINE vector_slice& boost::numeric::ublas::vector_slice< V >::operator-= ( const vector_expression< AE > &  ae)
inline

References boost::detail::type.

template<class V>
template<class AT >
BOOST_UBLAS_INLINE vector_slice& boost::numeric::ublas::vector_slice< V >::operator/= ( const AT &  at)
inline

References boost::xpressive::at.

template<class V>
BOOST_UBLAS_INLINE vector_slice& boost::numeric::ublas::vector_slice< V >::operator= ( const vector_slice< V > &  vs)
inline

References boost::detail::type.

template<class V>
template<class AE >
BOOST_UBLAS_INLINE vector_slice& boost::numeric::ublas::vector_slice< V >::operator= ( const vector_expression< AE > &  ae)
inline

References boost::detail::type.

template<class V>
BOOST_UBLAS_INLINE bool boost::numeric::ublas::vector_slice< V >::operator== ( const vector_slice< V > &  vs) const
inline
template<class V>
BOOST_UBLAS_INLINE const_reference boost::numeric::ublas::vector_slice< V >::operator[] ( size_type  i) const
inline
template<class V>
BOOST_UBLAS_INLINE reference boost::numeric::ublas::vector_slice< V >::operator[] ( size_type  i)
inline
template<class V>
template<class AE >
BOOST_UBLAS_INLINE vector_slice& boost::numeric::ublas::vector_slice< V >::plus_assign ( const vector_expression< AE > &  ae)
inline
template<class V>
BOOST_UBLAS_INLINE reverse_iterator boost::numeric::ublas::vector_slice< V >::rbegin ( )
inline
template<class V>
BOOST_UBLAS_INLINE reverse_iterator boost::numeric::ublas::vector_slice< V >::rend ( )
inline
template<class V>
BOOST_UBLAS_INLINE size_type boost::numeric::ublas::vector_slice< V >::start ( ) const
inline
template<class V>
BOOST_UBLAS_INLINE difference_type boost::numeric::ublas::vector_slice< V >::stride ( ) const
inline
template<class V>
BOOST_UBLAS_INLINE void boost::numeric::ublas::vector_slice< V >::swap ( vector_slice< V >  vs)
inline

Friends And Related Function Documentation

template<class V>
BOOST_UBLAS_INLINE friend void swap ( vector_slice< V >  vs1,
vector_slice< V >  vs2 
)
friend

Member Data Documentation

const unsigned boost::numeric::ublas::vector_expression< vector_slice< V > >::complexity
staticinherited

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