Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.

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

Inherits matrix_expression< matrix_indirect< M, IA > >.

List of all members.

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

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 end1 () const
BOOST_UBLAS_INLINE iterator1 begin1 ()
BOOST_UBLAS_INLINE iterator1 end1 ()
BOOST_UBLAS_INLINE const_iterator2 begin2 () const
BOOST_UBLAS_INLINE const_iterator2 end2 () 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 
rend1 () 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 
rend2 () const
BOOST_UBLAS_INLINE
reverse_iterator2 
rbegin2 ()
BOOST_UBLAS_INLINE
reverse_iterator2 
rend2 ()

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 >

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:

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:
V the type of the referenced matrix, for example matrix<double>)
IA the type of index matrix. Default is ublas::indirect_array<>

Generated on Sun Jul 4 20:31:07 2010 for ublas by  doxygen 1.6.1