Boost.uBlas 1.49
Linear Algebra in C++: matrices, vectors and numeric algorithms

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 >:

List of all members.

Classes

class  const_iterator
class  iterator

Public Types

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

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)
template<class AE >
BOOST_UBLAS_INLINE
vector_indirect
assign (const vector_expression< AE > &ae)
BOOST_UBLAS_INLINE
vector_indirect
assign_temporary (vector_indirect &vi)
BOOST_UBLAS_INLINE iterator begin ()
BOOST_UBLAS_INLINE const_iterator begin () const
BOOST_UBLAS_INLINE
vector_closure_type
data ()
BOOST_UBLAS_INLINE const
vector_closure_type
data () const
BOOST_UBLAS_INLINE const_iterator end () const
BOOST_UBLAS_INLINE iterator end ()
BOOST_UBLAS_INLINE const_iterator find (size_type i) const
BOOST_UBLAS_INLINE iterator find (size_type i)
BOOST_UBLAS_INLINE
const_indirect_array_type
indirect () const
BOOST_UBLAS_INLINE
indirect_array_type
indirect ()
template<class AE >
BOOST_UBLAS_INLINE
vector_indirect
minus_assign (const vector_expression< AE > &ae)
BOOST_UBLAS_INLINE const_reference operator() (size_type i) const
BOOST_UBLAS_INLINE const
expression_type
operator() () const
BOOST_UBLAS_INLINE reference operator() (size_type i)
BOOST_UBLAS_INLINE
expression_type
operator() ()
template<class AT >
BOOST_UBLAS_INLINE
vector_indirect
operator*= (const AT &at)
template<class AE >
BOOST_UBLAS_INLINE
vector_indirect
operator+= (const vector_expression< AE > &ae)
template<class AE >
BOOST_UBLAS_INLINE
vector_indirect
operator-= (const vector_expression< AE > &ae)
template<class AT >
BOOST_UBLAS_INLINE
vector_indirect
operator/= (const AT &at)
BOOST_UBLAS_INLINE
vector_indirect
operator= (const vector_indirect &vi)
template<class AE >
BOOST_UBLAS_INLINE
vector_indirect
operator= (const vector_expression< AE > &ae)
BOOST_UBLAS_INLINE bool operator== (const vector_indirect &vi) const
BOOST_UBLAS_INLINE const_reference operator[] (size_type i) const
BOOST_UBLAS_INLINE reference operator[] (size_type i)
template<class AE >
BOOST_UBLAS_INLINE
vector_indirect
plus_assign (const vector_expression< AE > &ae)
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< vector_type,
indirect_array_type
project (const range_type &r) const
BOOST_UBLAS_INLINE
const_reverse_iterator 
rbegin () const
BOOST_UBLAS_INLINE reverse_iterator rbegin ()
BOOST_UBLAS_INLINE reverse_iterator rend ()
BOOST_UBLAS_INLINE
const_reverse_iterator 
rend () const
BOOST_UBLAS_INLINE bool same_closure (const vector_indirect &vr) const
BOOST_UBLAS_INLINE size_type size () const
BOOST_UBLAS_INLINE void swap (vector_indirect vi)

Static Public Attributes

static const unsigned complexity

Private Types

typedef IA::const_iterator const_subiterator_type
typedef vector_indirect< V, IA > self_type
typedef IA::const_iterator subiterator_type

Private Attributes

vector_closure_type data_
indirect_array_type ia_

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<>

Definition at line 1131 of file vector_proxy.hpp.


Member Typedef Documentation

template<class V, class IA>
typedef vector_indirect<V, IA> boost::numeric::ublas::vector_indirect< V, IA >::self_type [private]

Definition at line 1134 of file vector_proxy.hpp.

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

Definition at line 1139 of file vector_proxy.hpp.

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

Definition at line 1140 of file vector_proxy.hpp.

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

Definition at line 1141 of file vector_proxy.hpp.

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

Definition at line 1142 of file vector_proxy.hpp.

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

Definition at line 1143 of file vector_proxy.hpp.

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

Definition at line 1144 of file vector_proxy.hpp.

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

Definition at line 1145 of file vector_proxy.hpp.

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

Definition at line 1146 of file vector_proxy.hpp.

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

Definition at line 1149 of file vector_proxy.hpp.

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

Definition at line 1152 of file vector_proxy.hpp.

Definition at line 1153 of file vector_proxy.hpp.

Definition at line 1154 of file vector_proxy.hpp.

template<class V, class IA>
typedef const self_type boost::numeric::ublas::vector_indirect< V, IA >::const_closure_type

Definition at line 1155 of file vector_proxy.hpp.

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

Definition at line 1156 of file vector_proxy.hpp.

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

Definition at line 1158 of file vector_proxy.hpp.

template<class V, class IA>
typedef IA::const_iterator boost::numeric::ublas::vector_indirect< V, IA >::const_subiterator_type [private]

Definition at line 1334 of file vector_proxy.hpp.

template<class V, class IA>
typedef IA::const_iterator boost::numeric::ublas::vector_indirect< V, IA >::subiterator_type [private]

Definition at line 1335 of file vector_proxy.hpp.

Definition at line 1569 of file vector_proxy.hpp.

Definition at line 1570 of file vector_proxy.hpp.

Definition at line 188 of file expression_types.hpp.


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]

Definition at line 1162 of file vector_proxy.hpp.

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]

Definition at line 1165 of file vector_proxy.hpp.

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]

Definition at line 1168 of file vector_proxy.hpp.


Member Function Documentation

template<class V, class IA>
BOOST_UBLAS_INLINE size_type boost::numeric::ublas::vector_indirect< V, IA >::size ( ) const [inline]

Definition at line 1173 of file vector_proxy.hpp.

template<class V, class IA>
BOOST_UBLAS_INLINE const_indirect_array_type& boost::numeric::ublas::vector_indirect< V, IA >::indirect ( ) const [inline]

Definition at line 1177 of file vector_proxy.hpp.

template<class V, class IA>
BOOST_UBLAS_INLINE indirect_array_type& boost::numeric::ublas::vector_indirect< V, IA >::indirect ( ) [inline]

Definition at line 1181 of file vector_proxy.hpp.

template<class V, class IA>
BOOST_UBLAS_INLINE const vector_closure_type& boost::numeric::ublas::vector_indirect< V, IA >::data ( ) const [inline]

Definition at line 1187 of file vector_proxy.hpp.

template<class V, class IA>
BOOST_UBLAS_INLINE vector_closure_type& boost::numeric::ublas::vector_indirect< V, IA >::data ( ) [inline]

Definition at line 1191 of file vector_proxy.hpp.

template<class V, class IA>
BOOST_UBLAS_INLINE const_reference boost::numeric::ublas::vector_indirect< V, IA >::operator() ( size_type  i) const [inline]

Definition at line 1198 of file vector_proxy.hpp.

template<class V, class IA>
BOOST_UBLAS_INLINE reference boost::numeric::ublas::vector_indirect< V, IA >::operator() ( size_type  i) [inline]

Definition at line 1202 of file vector_proxy.hpp.

template<class V, class IA>
BOOST_UBLAS_INLINE const_reference boost::numeric::ublas::vector_indirect< V, IA >::operator[] ( size_type  i) const [inline]

Definition at line 1207 of file vector_proxy.hpp.

template<class V, class IA>
BOOST_UBLAS_INLINE reference boost::numeric::ublas::vector_indirect< V, IA >::operator[] ( size_type  i) [inline]

Definition at line 1211 of file vector_proxy.hpp.

template<class V, class IA>
BOOST_UBLAS_INLINE vector_indirect<vector_type, indirect_array_type> boost::numeric::ublas::vector_indirect< V, IA >::project ( const range_type r) const [inline]

Definition at line 1230 of file vector_proxy.hpp.

template<class V, class IA>
BOOST_UBLAS_INLINE vector_indirect<vector_type, indirect_array_type> boost::numeric::ublas::vector_indirect< V, IA >::project ( const slice_type s) const [inline]

Definition at line 1234 of file vector_proxy.hpp.

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]

Definition at line 1238 of file vector_proxy.hpp.

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]

Definition at line 1244 of file vector_proxy.hpp.

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]

Definition at line 1250 of file vector_proxy.hpp.

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]

Definition at line 1257 of file vector_proxy.hpp.

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]

Definition at line 1263 of file vector_proxy.hpp.

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]

Definition at line 1269 of file vector_proxy.hpp.

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]

Definition at line 1275 of file vector_proxy.hpp.

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]

Definition at line 1281 of file vector_proxy.hpp.

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]

Definition at line 1287 of file vector_proxy.hpp.

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]

Definition at line 1293 of file vector_proxy.hpp.

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]

Definition at line 1299 of file vector_proxy.hpp.

template<class V, class IA>
BOOST_UBLAS_INLINE bool boost::numeric::ublas::vector_indirect< V, IA >::same_closure ( const vector_indirect< V, IA > &  vr) const [inline]

Definition at line 1306 of file vector_proxy.hpp.

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]

Definition at line 1312 of file vector_proxy.hpp.

template<class V, class IA>
BOOST_UBLAS_INLINE void boost::numeric::ublas::vector_indirect< V, IA >::swap ( vector_indirect< V, IA >  vi) [inline]

Definition at line 1318 of file vector_proxy.hpp.

template<class V, class IA>
BOOST_UBLAS_INLINE const_iterator boost::numeric::ublas::vector_indirect< V, IA >::find ( size_type  i) const [inline]

Definition at line 1349 of file vector_proxy.hpp.

template<class V, class IA>
BOOST_UBLAS_INLINE iterator boost::numeric::ublas::vector_indirect< V, IA >::find ( size_type  i) [inline]

Definition at line 1357 of file vector_proxy.hpp.

template<class V, class IA>
BOOST_UBLAS_INLINE const_iterator boost::numeric::ublas::vector_indirect< V, IA >::begin ( ) const [inline]

Definition at line 1460 of file vector_proxy.hpp.

template<class V, class IA>
BOOST_UBLAS_INLINE const_iterator boost::numeric::ublas::vector_indirect< V, IA >::end ( ) const [inline]

Definition at line 1464 of file vector_proxy.hpp.

template<class V, class IA>
BOOST_UBLAS_INLINE iterator boost::numeric::ublas::vector_indirect< V, IA >::begin ( ) [inline]

Definition at line 1560 of file vector_proxy.hpp.

template<class V, class IA>
BOOST_UBLAS_INLINE iterator boost::numeric::ublas::vector_indirect< V, IA >::end ( ) [inline]

Definition at line 1564 of file vector_proxy.hpp.

template<class V, class IA>
BOOST_UBLAS_INLINE const_reverse_iterator boost::numeric::ublas::vector_indirect< V, IA >::rbegin ( ) const [inline]

Definition at line 1573 of file vector_proxy.hpp.

template<class V, class IA>
BOOST_UBLAS_INLINE const_reverse_iterator boost::numeric::ublas::vector_indirect< V, IA >::rend ( ) const [inline]

Definition at line 1577 of file vector_proxy.hpp.

template<class V, class IA>
BOOST_UBLAS_INLINE reverse_iterator boost::numeric::ublas::vector_indirect< V, IA >::rbegin ( ) [inline]

Definition at line 1581 of file vector_proxy.hpp.

template<class V, class IA>
BOOST_UBLAS_INLINE reverse_iterator boost::numeric::ublas::vector_indirect< V, IA >::rend ( ) [inline]

Definition at line 1585 of file vector_proxy.hpp.

BOOST_UBLAS_INLINE const expression_type& boost::numeric::ublas::vector_expression< vector_indirect< V, IA > >::operator() ( ) const [inline, inherited]

Definition at line 194 of file expression_types.hpp.

BOOST_UBLAS_INLINE expression_type& boost::numeric::ublas::vector_expression< vector_indirect< V, IA > >::operator() ( ) [inline, inherited]

Definition at line 198 of file expression_types.hpp.


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]

Definition at line 1327 of file vector_proxy.hpp.


Member Data Documentation

template<class V, class IA>
vector_closure_type boost::numeric::ublas::vector_indirect< V, IA >::data_ [private]

Definition at line 1590 of file vector_proxy.hpp.

template<class V, class IA>
indirect_array_type boost::numeric::ublas::vector_indirect< V, IA >::ia_ [private]

Definition at line 1591 of file vector_proxy.hpp.

const unsigned boost::numeric::ublas::vector_expression< vector_indirect< V, IA > >::complexity [static, inherited]

Definition at line 186 of file expression_types.hpp.


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