A vector referencing a non continuous subvector of elements given another vector of indices. More...
#include <vector_proxy.hpp>
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) |
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)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.
V | the type of vector referenced (for example vector<double> ) |
IA | the type of index vector. Default is ublas::indirect_array<> |
typedef self_type boost::numeric::ublas::vector_indirect< V, IA >::closure_type |
typedef const self_type boost::numeric::ublas::vector_indirect< V, IA >::const_closure_type |
typedef const IA boost::numeric::ublas::vector_indirect< V, IA >::const_indirect_array_type |
typedef V::const_reference boost::numeric::ublas::vector_indirect< V, IA >::const_reference |
typedef reverse_iterator_base<const_iterator> boost::numeric::ublas::vector_indirect< V, IA >::const_reverse_iterator |
typedef const V boost::numeric::ublas::vector_indirect< V, IA >::const_vector_type |
typedef V::difference_type boost::numeric::ublas::vector_indirect< V, IA >::difference_type |
|
inherited |
typedef IA boost::numeric::ublas::vector_indirect< V, IA >::indirect_array_type |
typedef basic_range<size_type, difference_type> boost::numeric::ublas::vector_indirect< V, IA >::range_type |
typedef boost::mpl::if_<boost::is_const<V>, typename V::const_reference, typename V::reference>::type boost::numeric::ublas::vector_indirect< V, IA >::reference |
typedef reverse_iterator_base<iterator> boost::numeric::ublas::vector_indirect< V, IA >::reverse_iterator |
typedef V::size_type boost::numeric::ublas::vector_indirect< V, IA >::size_type |
typedef basic_slice<size_type, difference_type> boost::numeric::ublas::vector_indirect< V, IA >::slice_type |
typedef storage_restrict_traits<typename V::storage_category, dense_proxy_tag>::storage_category boost::numeric::ublas::vector_indirect< V, IA >::storage_category |
|
inherited |
typedef V::value_type boost::numeric::ublas::vector_indirect< V, IA >::value_type |
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 |
typedef V boost::numeric::ublas::vector_indirect< V, IA >::vector_type |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References boost::multiprecision::backends::i.
|
inline |
|
inline |
|
inline |
|
inlineinherited |
|
inlineinherited |
|
inline |
|
inline |
|
inline |
References boost::xpressive::at.
|
inline |
References boost::detail::type.
|
inline |
References boost::detail::type.
|
inline |
References boost::xpressive::at.
|
inline |
References boost::detail::type.
|
inline |
References boost::detail::type.
|
inline |
|
inline |
References boost::multiprecision::backends::i.
|
inline |
References boost::multiprecision::backends::i.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References boost::numeric::ublas::vector_indirect< V, IA >::end().
Referenced by boost::numeric::ublas::vector_indirect< V, IA >::crbegin().
|
inline |
|
inline |
References boost::numeric::ublas::vector_indirect< V, IA >::begin().
Referenced by boost::numeric::ublas::vector_indirect< V, IA >::crend().
|
inline |
|
inline |
Referenced by boost::numeric::ublas::vector_indirect< V, IA >::const_iterator::operator-(), boost::numeric::ublas::vector_indirect< V, IA >::iterator::operator-(), boost::numeric::ublas::vector_indirect< V, IA >::const_iterator::operator<(), boost::numeric::ublas::vector_indirect< V, IA >::iterator::operator<(), boost::numeric::ublas::vector_indirect< V, IA >::const_iterator::operator==(), and boost::numeric::ublas::vector_indirect< V, IA >::iterator::operator==().
|
inline |
Referenced by boost::numeric::ublas::vector_indirect< V, IA >::end(), boost::numeric::ublas::vector_indirect< V, IA >::const_iterator::operator*(), boost::numeric::ublas::vector_indirect< V, IA >::iterator::operator*(), boost::numeric::ublas::vector_indirect< V, IA >::project(), and boost::numeric::ublas::vector_indirect< V, IA >::swap().
|
inline |
References BOOST_UBLAS_CHECK, and boost::numeric::ublas::vector_indirect< V, IA >::size().
|
friend |
|
staticinherited |