ublas: boost::numeric::ublas::diagonal_adaptor< M > Class Template Reference

# boost::numeric::ublas::diagonal_adaptor< M > Class Template Reference

A diagonal matrix adaptator: convert a any matrix into a diagonal matrix expression. More...

Inherits boost::numeric::ublas::banded_adaptor< M >.

List of all members.

## Public Types
typedef M | matrix_type
typedef banded_adaptor< M > | adaptor_type
## Public Member Functions
BOOST_UBLAS_INLINE | diagonal_adaptor (matrix_type &data)
BOOST_UBLAS_INLINE diagonal_adaptor & | operator= (const diagonal_adaptor &m)
template<class AE >
BOOST_UBLAS_INLINE diagonal_adaptor & | operator= (const matrix_expression< AE > &ae)

## Detailed Description

### template<class M>
class boost::numeric::ublas::diagonal_adaptor< M >

For a -dimensional matrix, the `diagonal_adaptor` will provide a diagonal matrix with and , if then .

Storage and location are based on those of the underlying matrix. This is important because a `diagonal_adaptor` does not copy the matrix data to a new place. Therefore, modifying values in a `diagonal_adaptor` matrix will also modify the underlying matrix too.

Template Parameters:

  | M | the type of matrix used to generate the diagonal matrix