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_indirect< V, IA > Class Template Reference

A vector referencing a non continuous subvector of elements given another vector of indices. More...

#include <vector_proxy.hpp>

Inheritance diagram for boost::numeric::ublas::vector_indirect< V, IA >:
Collaboration diagram for boost::numeric::ublas::vector_indirect< V, IA >:

Classes

class  const_iterator
 
class  iterator
 

Public Types

typedef const V const_vector_type
 
typedef V vector_type
 
typedef const IA const_indirect_array_type
 
typedef IA indirect_array_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_indirect< V, IA > expression_type
 
typedef vector_tag type_category
 

Public Member Functions

BOOST_UBLAS_INLINE vector_indirect (vector_type &data, size_type size)
 
BOOST_UBLAS_INLINE vector_indirect (vector_type &data, const indirect_array_type &ia)
 
BOOST_UBLAS_INLINE vector_indirect (const vector_closure_type &data, const indirect_array_type &ia, int)
 
BOOST_UBLAS_INLINE size_type size () const
 
BOOST_UBLAS_INLINE
const_indirect_array_type
indirect () const
 
BOOST_UBLAS_INLINE
indirect_array_type
indirect ()
 
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_indirect< vector_type,
indirect_array_type
project (const range_type &r) const
 
BOOST_UBLAS_INLINE
vector_indirect< vector_type,
indirect_array_type
project (const slice_type &s) const
 
BOOST_UBLAS_INLINE
vector_indirect< vector_type,
indirect_array_type
project (const indirect_array_type &ia) const
 
BOOST_UBLAS_INLINE
vector_indirect
operator= (const vector_indirect &vi)
 
BOOST_UBLAS_INLINE
vector_indirect
assign_temporary (vector_indirect &vi)
 
template<class AE >
BOOST_UBLAS_INLINE
vector_indirect
operator= (const vector_expression< AE > &ae)
 
template<class AE >
BOOST_UBLAS_INLINE
vector_indirect
assign (const vector_expression< AE > &ae)
 
template<class AE >
BOOST_UBLAS_INLINE
vector_indirect
operator+= (const vector_expression< AE > &ae)
 
template<class AE >
BOOST_UBLAS_INLINE
vector_indirect
plus_assign (const vector_expression< AE > &ae)
 
template<class AE >
BOOST_UBLAS_INLINE
vector_indirect
operator-= (const vector_expression< AE > &ae)
 
template<class AE >
BOOST_UBLAS_INLINE
vector_indirect
minus_assign (const vector_expression< AE > &ae)
 
template<class AT >
BOOST_UBLAS_INLINE
vector_indirect
operator*= (const AT &at)
 
template<class AT >
BOOST_UBLAS_INLINE
vector_indirect
operator/= (const AT &at)
 
BOOST_UBLAS_INLINE bool same_closure (const vector_indirect &) const
 
BOOST_UBLAS_INLINE bool operator== (const vector_indirect &vi) const
 
BOOST_UBLAS_INLINE void swap (vector_indirect vi)
 
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_indirect vi1, vector_indirect vi2)
 

Detailed Description

template<class V, class IA>
class boost::numeric::ublas::vector_indirect< V, IA >

A vector referencing a non continuous subvector of elements given another vector of indices.

It is the most general version of any subvectors because it uses another vector of indices to reference the subvector.

The vector of indices can be of any type with the restriction that its elements must be type-compatible with the size_type of the container. In practice, the following are good candidates:

  • boost::numeric::ublas::indirect_array<A> where A can be int, size_t, long, etc...
  • std::vector<A> where A can int, size_t, long, etc...
  • boost::numeric::ublas::vector<int> can work too (int can be replaced by another integer type)
  • etc...

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

Template Parameters
Vthe type of vector referenced (for example vector<double>)
IAthe type of index vector. Default is ublas::indirect_array<>

Member Typedef Documentation

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

Constructor & Destructor Documentation

template<class V, class IA>
BOOST_UBLAS_INLINE boost::numeric::ublas::vector_indirect< V, IA >::vector_indirect ( vector_type data,
size_type  size 
)
inline
template<class V, class IA>
BOOST_UBLAS_INLINE boost::numeric::ublas::vector_indirect< V, IA >::vector_indirect ( vector_type data,
const indirect_array_type ia 
)
inline
template<class V, class IA>
BOOST_UBLAS_INLINE boost::numeric::ublas::vector_indirect< V, IA >::vector_indirect ( const vector_closure_type data,
const indirect_array_type ia,
int   
)
inline

Member Function Documentation

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

References boost::xpressive::at.

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

References boost::detail::type.

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

References boost::detail::type.

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

References boost::xpressive::at.

template<class V, class IA>
BOOST_UBLAS_INLINE vector_indirect& boost::numeric::ublas::vector_indirect< V, IA >::operator= ( const vector_indirect< V, IA > &  vi)
inline

References boost::detail::type.

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

References boost::detail::type.

template<class V, class IA>
BOOST_UBLAS_INLINE bool boost::numeric::ublas::vector_indirect< V, IA >::operator== ( const vector_indirect< V, IA > &  vi) const
inline
template<class V, class IA>
BOOST_UBLAS_INLINE const_reference boost::numeric::ublas::vector_indirect< V, IA >::operator[] ( size_type  i) const
inline
template<class V, class IA>
BOOST_UBLAS_INLINE reference boost::numeric::ublas::vector_indirect< V, IA >::operator[] ( size_type  i)
inline
template<class V, class IA>
template<class AE >
BOOST_UBLAS_INLINE vector_indirect& boost::numeric::ublas::vector_indirect< V, IA >::plus_assign ( const vector_expression< AE > &  ae)
inline
template<class V, class IA>
BOOST_UBLAS_INLINE vector_indirect<vector_type, indirect_array_type> boost::numeric::ublas::vector_indirect< V, IA >::project ( const indirect_array_type ia) const
inline
template<class V, class IA>
BOOST_UBLAS_INLINE reverse_iterator boost::numeric::ublas::vector_indirect< V, IA >::rbegin ( )
inline
template<class V, class IA>
BOOST_UBLAS_INLINE reverse_iterator boost::numeric::ublas::vector_indirect< V, IA >::rend ( )
inline
template<class V, class IA>
BOOST_UBLAS_INLINE void boost::numeric::ublas::vector_indirect< V, IA >::swap ( vector_indirect< V, IA >  vi)
inline

Friends And Related Function Documentation

template<class V, class IA>
BOOST_UBLAS_INLINE friend void swap ( vector_indirect< V, IA >  vi1,
vector_indirect< V, IA >  vi2 
)
friend

Member Data Documentation

const unsigned boost::numeric::ublas::vector_expression< vector_indirect< V, IA > >::complexity
staticinherited

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