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::matrix_indirect< M, IA > Class Template Reference

A matrix referencing a non continuous submatrix of elements given another matrix of indices. More...

#include <matrix_proxy.hpp>

Inheritance diagram for boost::numeric::ublas::matrix_indirect< M, IA >:
Collaboration diagram for boost::numeric::ublas::matrix_indirect< M, IA >:

Classes

class  const_iterator1
 
class  const_iterator2
 
class  iterator1
 
class  iterator2
 

Public Types

typedef M matrix_type
 
typedef IA indirect_array_type
 
typedef M::size_type size_type
 
typedef M::difference_type difference_type
 
typedef M::value_type value_type
 
typedef M::const_reference const_reference
 
typedef boost::mpl::if_
< boost::is_const< M >
, typename M::const_reference,
typename M::reference >::type 
reference
 
typedef boost::mpl::if_
< boost::is_const< M >
, typename
M::const_closure_type,
typename M::closure_type >
::type 
matrix_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 M::storage_category,
dense_proxy_tag >
::storage_category 
storage_category
 
typedef M::orientation_category orientation_category
 
typedef reverse_iterator_base1
< const_iterator1
const_reverse_iterator1
 
typedef reverse_iterator_base1
< iterator1
reverse_iterator1
 
typedef reverse_iterator_base2
< const_iterator2
const_reverse_iterator2
 
typedef reverse_iterator_base2
< iterator2
reverse_iterator2
 
typedef matrix_indirect< M, IA > expression_type
 
typedef matrix_tag type_category
 

Public Member Functions

BOOST_UBLAS_INLINE matrix_indirect (matrix_type &data, size_type size1, size_type size2)
 
BOOST_UBLAS_INLINE matrix_indirect (matrix_type &data, const indirect_array_type &ia1, const indirect_array_type &ia2)
 
BOOST_UBLAS_INLINE matrix_indirect (const matrix_closure_type &data, const indirect_array_type &ia1, const indirect_array_type &ia2, int)
 
BOOST_UBLAS_INLINE size_type size1 () const
 
BOOST_UBLAS_INLINE size_type size2 () const
 
BOOST_UBLAS_INLINE const
indirect_array_type
indirect1 () const
 
BOOST_UBLAS_INLINE
indirect_array_type
indirect1 ()
 
BOOST_UBLAS_INLINE const
indirect_array_type
indirect2 () const
 
BOOST_UBLAS_INLINE
indirect_array_type
indirect2 ()
 
BOOST_UBLAS_INLINE const
matrix_closure_type
data () const
 
BOOST_UBLAS_INLINE
matrix_closure_type
data ()
 
BOOST_UBLAS_INLINE const_reference operator() (size_type i, size_type j) const
 
BOOST_UBLAS_INLINE reference operator() (size_type i, size_type j)
 
BOOST_UBLAS_INLINE
matrix_indirect< matrix_type,
indirect_array_type
project (const range_type &r1, const range_type &r2) const
 
BOOST_UBLAS_INLINE
matrix_indirect< matrix_type,
indirect_array_type
project (const slice_type &s1, const slice_type &s2) const
 
BOOST_UBLAS_INLINE
matrix_indirect< matrix_type,
indirect_array_type
project (const indirect_array_type &ia1, const indirect_array_type &ia2) const
 
BOOST_UBLAS_INLINE
matrix_indirect
operator= (const matrix_indirect &mi)
 
BOOST_UBLAS_INLINE
matrix_indirect
assign_temporary (matrix_indirect &mi)
 
template<class AE >
BOOST_UBLAS_INLINE
matrix_indirect
operator= (const matrix_expression< AE > &ae)
 
template<class AE >
BOOST_UBLAS_INLINE
matrix_indirect
assign (const matrix_expression< AE > &ae)
 
template<class AE >
BOOST_UBLAS_INLINE
matrix_indirect
operator+= (const matrix_expression< AE > &ae)
 
template<class AE >
BOOST_UBLAS_INLINE
matrix_indirect
plus_assign (const matrix_expression< AE > &ae)
 
template<class AE >
BOOST_UBLAS_INLINE
matrix_indirect
operator-= (const matrix_expression< AE > &ae)
 
template<class AE >
BOOST_UBLAS_INLINE
matrix_indirect
minus_assign (const matrix_expression< AE > &ae)
 
template<class AT >
BOOST_UBLAS_INLINE
matrix_indirect
operator*= (const AT &at)
 
template<class AT >
BOOST_UBLAS_INLINE
matrix_indirect
operator/= (const AT &at)
 
BOOST_UBLAS_INLINE bool same_closure (const matrix_indirect &mi) const
 
BOOST_UBLAS_INLINE bool operator== (const matrix_indirect &mi) const
 
BOOST_UBLAS_INLINE void swap (matrix_indirect mi)
 
BOOST_UBLAS_INLINE const_iterator1 find1 (int, size_type i, size_type j) const
 
BOOST_UBLAS_INLINE iterator1 find1 (int, size_type i, size_type j)
 
BOOST_UBLAS_INLINE const_iterator2 find2 (int, size_type i, size_type j) const
 
BOOST_UBLAS_INLINE iterator2 find2 (int, size_type i, size_type j)
 
BOOST_UBLAS_INLINE const_iterator1 begin1 () const
 
BOOST_UBLAS_INLINE const_iterator1 cbegin1 () const
 
BOOST_UBLAS_INLINE const_iterator1 end1 () const
 
BOOST_UBLAS_INLINE const_iterator1 cend1 () const
 
BOOST_UBLAS_INLINE iterator1 begin1 ()
 
BOOST_UBLAS_INLINE iterator1 end1 ()
 
BOOST_UBLAS_INLINE const_iterator2 begin2 () const
 
BOOST_UBLAS_INLINE const_iterator2 cbegin2 () const
 
BOOST_UBLAS_INLINE const_iterator2 end2 () const
 
BOOST_UBLAS_INLINE const_iterator2 cend2 () const
 
BOOST_UBLAS_INLINE iterator2 begin2 ()
 
BOOST_UBLAS_INLINE iterator2 end2 ()
 
BOOST_UBLAS_INLINE
const_reverse_iterator1 
rbegin1 () const
 
BOOST_UBLAS_INLINE
const_reverse_iterator1 
crbegin1 () const
 
BOOST_UBLAS_INLINE
const_reverse_iterator1 
rend1 () const
 
BOOST_UBLAS_INLINE
const_reverse_iterator1 
crend1 () const
 
BOOST_UBLAS_INLINE
reverse_iterator1 
rbegin1 ()
 
BOOST_UBLAS_INLINE
reverse_iterator1 
rend1 ()
 
BOOST_UBLAS_INLINE
const_reverse_iterator2 
rbegin2 () const
 
BOOST_UBLAS_INLINE
const_reverse_iterator2 
crbegin2 () const
 
BOOST_UBLAS_INLINE
const_reverse_iterator2 
rend2 () const
 
BOOST_UBLAS_INLINE
const_reverse_iterator2 
crend2 () const
 
BOOST_UBLAS_INLINE
reverse_iterator2 
rbegin2 ()
 
BOOST_UBLAS_INLINE
reverse_iterator2 
rend2 ()
 
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 (matrix_indirect mi1, matrix_indirect mi2)
 

Detailed Description

template<class M, class IA>
class boost::numeric::ublas::matrix_indirect< M, IA >

A matrix referencing a non continuous submatrix of elements given another matrix of indices.

It is the most general version of any submatrices because it uses another matrix of indices to reference the submatrix.

The matrix 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...
  • boost::numeric::ublas::matrix<int> can work too (int can be replaced by another integer type)
  • etc...

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

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

Member Typedef Documentation

template<class M, class IA>
typedef self_type boost::numeric::ublas::matrix_indirect< M, IA >::closure_type
template<class M, class IA>
typedef const self_type boost::numeric::ublas::matrix_indirect< M, IA >::const_closure_type
template<class M, class IA>
typedef M::const_reference boost::numeric::ublas::matrix_indirect< M, IA >::const_reference
template<class M, class IA>
typedef reverse_iterator_base1<const_iterator1> boost::numeric::ublas::matrix_indirect< M, IA >::const_reverse_iterator1
template<class M, class IA>
typedef reverse_iterator_base2<const_iterator2> boost::numeric::ublas::matrix_indirect< M, IA >::const_reverse_iterator2
template<class M, class IA>
typedef M::difference_type boost::numeric::ublas::matrix_indirect< M, IA >::difference_type
template<class M, class IA>
typedef IA boost::numeric::ublas::matrix_indirect< M, IA >::indirect_array_type
template<class M, class IA>
typedef boost::mpl::if_<boost::is_const<M>, typename M::const_closure_type, typename M::closure_type>::type boost::numeric::ublas::matrix_indirect< M, IA >::matrix_closure_type
template<class M, class IA>
typedef M boost::numeric::ublas::matrix_indirect< M, IA >::matrix_type
template<class M, class IA>
typedef M::orientation_category boost::numeric::ublas::matrix_indirect< M, IA >::orientation_category
template<class M, class IA>
typedef boost::mpl::if_<boost::is_const<M>, typename M::const_reference, typename M::reference>::type boost::numeric::ublas::matrix_indirect< M, IA >::reference
template<class M, class IA>
typedef reverse_iterator_base1<iterator1> boost::numeric::ublas::matrix_indirect< M, IA >::reverse_iterator1
template<class M, class IA>
typedef reverse_iterator_base2<iterator2> boost::numeric::ublas::matrix_indirect< M, IA >::reverse_iterator2
template<class M, class IA>
typedef M::size_type boost::numeric::ublas::matrix_indirect< M, IA >::size_type
template<class M, class IA>
typedef storage_restrict_traits<typename M::storage_category, dense_proxy_tag>::storage_category boost::numeric::ublas::matrix_indirect< M, IA >::storage_category
template<class M, class IA>
typedef M::value_type boost::numeric::ublas::matrix_indirect< M, IA >::value_type

Constructor & Destructor Documentation

template<class M, class IA>
BOOST_UBLAS_INLINE boost::numeric::ublas::matrix_indirect< M, IA >::matrix_indirect ( matrix_type data,
size_type  size1,
size_type  size2 
)
inline
template<class M, class IA>
BOOST_UBLAS_INLINE boost::numeric::ublas::matrix_indirect< M, IA >::matrix_indirect ( matrix_type data,
const indirect_array_type ia1,
const indirect_array_type ia2 
)
inline
template<class M, class IA>
BOOST_UBLAS_INLINE boost::numeric::ublas::matrix_indirect< M, IA >::matrix_indirect ( const matrix_closure_type data,
const indirect_array_type ia1,
const indirect_array_type ia2,
int   
)
inline

Member Function Documentation

template<class M, class IA>
template<class AE >
BOOST_UBLAS_INLINE matrix_indirect& boost::numeric::ublas::matrix_indirect< M, IA >::assign ( const matrix_expression< AE > &  ae)
inline
template<class M, class IA>
BOOST_UBLAS_INLINE matrix_indirect& boost::numeric::ublas::matrix_indirect< M, IA >::assign_temporary ( matrix_indirect< M, IA > &  mi)
inline
template<class M, class IA>
BOOST_UBLAS_INLINE iterator1 boost::numeric::ublas::matrix_indirect< M, IA >::begin1 ( )
inline
template<class M, class IA>
BOOST_UBLAS_INLINE iterator2 boost::numeric::ublas::matrix_indirect< M, IA >::begin2 ( )
inline
template<class M, class IA>
BOOST_UBLAS_INLINE const_iterator1 boost::numeric::ublas::matrix_indirect< M, IA >::cbegin1 ( ) const
inline
template<class M, class IA>
BOOST_UBLAS_INLINE const_iterator2 boost::numeric::ublas::matrix_indirect< M, IA >::cbegin2 ( ) const
inline
template<class M, class IA>
BOOST_UBLAS_INLINE const_iterator1 boost::numeric::ublas::matrix_indirect< M, IA >::cend1 ( ) const
inline
template<class M, class IA>
BOOST_UBLAS_INLINE const_iterator2 boost::numeric::ublas::matrix_indirect< M, IA >::cend2 ( ) const
inline
template<class M, class IA>
BOOST_UBLAS_INLINE const_reverse_iterator1 boost::numeric::ublas::matrix_indirect< M, IA >::crbegin1 ( ) const
inline
template<class M, class IA>
BOOST_UBLAS_INLINE const_reverse_iterator2 boost::numeric::ublas::matrix_indirect< M, IA >::crbegin2 ( ) const
inline
template<class M, class IA>
BOOST_UBLAS_INLINE const_reverse_iterator1 boost::numeric::ublas::matrix_indirect< M, IA >::crend1 ( ) const
inline
template<class M, class IA>
BOOST_UBLAS_INLINE const_reverse_iterator2 boost::numeric::ublas::matrix_indirect< M, IA >::crend2 ( ) const
inline
template<class M, class IA>
BOOST_UBLAS_INLINE const matrix_closure_type& boost::numeric::ublas::matrix_indirect< M, IA >::data ( ) const
inline
template<class M, class IA>
BOOST_UBLAS_INLINE matrix_closure_type& boost::numeric::ublas::matrix_indirect< M, IA >::data ( )
inline
template<class M, class IA>
BOOST_UBLAS_INLINE iterator1 boost::numeric::ublas::matrix_indirect< M, IA >::find1 ( int  ,
size_type  i,
size_type  j 
)
inline
template<class M, class IA>
BOOST_UBLAS_INLINE iterator2 boost::numeric::ublas::matrix_indirect< M, IA >::find2 ( int  ,
size_type  i,
size_type  j 
)
inline
template<class M, class IA>
BOOST_UBLAS_INLINE const indirect_array_type& boost::numeric::ublas::matrix_indirect< M, IA >::indirect1 ( ) const
inline
template<class M, class IA>
BOOST_UBLAS_INLINE indirect_array_type& boost::numeric::ublas::matrix_indirect< M, IA >::indirect1 ( )
inline
template<class M, class IA>
BOOST_UBLAS_INLINE const indirect_array_type& boost::numeric::ublas::matrix_indirect< M, IA >::indirect2 ( ) const
inline
template<class M, class IA>
BOOST_UBLAS_INLINE indirect_array_type& boost::numeric::ublas::matrix_indirect< M, IA >::indirect2 ( )
inline
template<class M, class IA>
template<class AE >
BOOST_UBLAS_INLINE matrix_indirect& boost::numeric::ublas::matrix_indirect< M, IA >::minus_assign ( const matrix_expression< AE > &  ae)
inline
BOOST_UBLAS_INLINE const expression_type& boost::numeric::ublas::matrix_expression< matrix_indirect< M, IA > >::operator() ( ) const
inlineinherited
BOOST_UBLAS_INLINE expression_type& boost::numeric::ublas::matrix_expression< matrix_indirect< M, IA > >::operator() ( )
inlineinherited
template<class M, class IA>
BOOST_UBLAS_INLINE const_reference boost::numeric::ublas::matrix_indirect< M, IA >::operator() ( size_type  i,
size_type  j 
) const
inline
template<class M, class IA>
BOOST_UBLAS_INLINE reference boost::numeric::ublas::matrix_indirect< M, IA >::operator() ( size_type  i,
size_type  j 
)
inline
template<class M, class IA>
template<class AT >
BOOST_UBLAS_INLINE matrix_indirect& boost::numeric::ublas::matrix_indirect< M, IA >::operator*= ( const AT &  at)
inline

References boost::xpressive::at.

template<class M, class IA>
template<class AE >
BOOST_UBLAS_INLINE matrix_indirect& boost::numeric::ublas::matrix_indirect< M, IA >::operator+= ( const matrix_expression< AE > &  ae)
inline

References boost::detail::type.

template<class M, class IA>
template<class AE >
BOOST_UBLAS_INLINE matrix_indirect& boost::numeric::ublas::matrix_indirect< M, IA >::operator-= ( const matrix_expression< AE > &  ae)
inline

References boost::detail::type.

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

References boost::xpressive::at.

template<class M, class IA>
BOOST_UBLAS_INLINE matrix_indirect& boost::numeric::ublas::matrix_indirect< M, IA >::operator= ( const matrix_indirect< M, IA > &  mi)
inline
template<class M, class IA>
template<class AE >
BOOST_UBLAS_INLINE matrix_indirect& boost::numeric::ublas::matrix_indirect< M, IA >::operator= ( const matrix_expression< AE > &  ae)
inline

References boost::detail::type.

template<class M, class IA>
BOOST_UBLAS_INLINE bool boost::numeric::ublas::matrix_indirect< M, IA >::operator== ( const matrix_indirect< M, IA > &  mi) const
inline
template<class M, class IA>
template<class AE >
BOOST_UBLAS_INLINE matrix_indirect& boost::numeric::ublas::matrix_indirect< M, IA >::plus_assign ( const matrix_expression< AE > &  ae)
inline
template<class M, class IA>
BOOST_UBLAS_INLINE reverse_iterator1 boost::numeric::ublas::matrix_indirect< M, IA >::rbegin1 ( )
inline
template<class M, class IA>
BOOST_UBLAS_INLINE reverse_iterator2 boost::numeric::ublas::matrix_indirect< M, IA >::rbegin2 ( )
inline
template<class M, class IA>
BOOST_UBLAS_INLINE reverse_iterator1 boost::numeric::ublas::matrix_indirect< M, IA >::rend1 ( )
inline
template<class M, class IA>
BOOST_UBLAS_INLINE reverse_iterator2 boost::numeric::ublas::matrix_indirect< M, IA >::rend2 ( )
inline

Friends And Related Function Documentation

template<class M, class IA>
BOOST_UBLAS_INLINE friend void swap ( matrix_indirect< M, IA >  mi1,
matrix_indirect< M, IA >  mi2 
)
friend

Member Data Documentation

const unsigned boost::numeric::ublas::matrix_expression< matrix_indirect< M, IA > >::complexity
staticinherited

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