...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
A diagonal matrix adaptator: convert a any matrix into a diagonal matrix expression. More...
Inherits boost::numeric::ublas::banded_adaptor< M >.
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) |
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.