Jet  v1.3.3
Public Member Functions | List of all members
jet::MatrixDiagonal< T, E > Class Template Reference

Diagonal matrix expression. More...

#include <jet/matrix_expression.h>

Inheritance diagram for jet::MatrixDiagonal< T, E >:
jet::MatrixExpression< T, MatrixDiagonal< T, E > >

Public Member Functions

 MatrixDiagonal (const E &u, bool isDiag)
 
Size2 size () const
 Size of the matrix. More...
 
size_t rows () const
 Number of rows. More...
 
size_t cols () const
 Number of columns. More...
 
operator() (size_t i, size_t j) const
 Returns matrix element at (i, j). More...
 
- Public Member Functions inherited from jet::MatrixExpression< T, MatrixDiagonal< T, E > >
Size2 size () const
 Size of the matrix. More...
 
size_t rows () const
 Number of rows. More...
 
size_t cols () const
 Number of columns. More...
 
const MatrixDiagonal< T, E > & operator() () const
 Returns actual implementation (the subclass). More...
 

Detailed Description

template<typename T, typename E>
class jet::MatrixDiagonal< T, E >

Diagonal matrix expression.

This matrix expression represents a diagonal matrix for given input matrix expression.

Template Parameters
TReal number type.
EInput expression type.

Constructor & Destructor Documentation

◆ MatrixDiagonal()

template<typename T , typename E >
jet::MatrixDiagonal< T, E >::MatrixDiagonal ( const E &  u,
bool  isDiag 
)

Constructs diagonal matrix expression for given input expression.

Parameters
isDiag- True for diagonal matrix, false for off-diagonal.

Member Function Documentation

◆ cols()

template<typename T , typename E >
size_t jet::MatrixDiagonal< T, E >::cols ( ) const

Number of columns.

◆ operator()()

template<typename T , typename E >
T jet::MatrixDiagonal< T, E >::operator() ( size_t  i,
size_t  j 
) const

Returns matrix element at (i, j).

◆ rows()

template<typename T , typename E >
size_t jet::MatrixDiagonal< T, E >::rows ( ) const

Number of rows.

◆ size()

template<typename T , typename E >
Size2 jet::MatrixDiagonal< T, E >::size ( ) const

Size of the matrix.


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