![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
Functor producing the diagonal-matrix entry at (i, j) from a vector expression ( \( e(i) \) on the diagonal, 0 elsewhere).
More...
#include <Functional.hpp>
Inheritance diagram for CDPL::Math::DiagonalMatrixFromVector< V >:Public Types | |
| typedef VectorScalarUnaryFunctor< V >::ResultType | ResultType |
| typedef VectorScalarUnaryFunctor< V >::SizeType | SizeType |
Public Types inherited from CDPL::Math::VectorMatrixUnaryFunctor< V > | |
| typedef V::ValueType | ResultType |
| The matrix-entry result type (the vector's element value type). More... | |
| typedef V::SizeType | SizeType |
| The unsigned size type used by the vector. More... | |
Static Public Member Functions | |
| template<typename E > | |
| static ResultType | apply (const VectorExpression< E > &e, SizeType i, SizeType j) |
Returns \( e(i) \) if i equals j, otherwise 0. More... | |
Functor producing the diagonal-matrix entry at (i, j) from a vector expression ( \( e(i) \) on the diagonal, 0 elsewhere).
| V | The vector expression type. |
| typedef VectorScalarUnaryFunctor<V>::ResultType CDPL::Math::DiagonalMatrixFromVector< V >::ResultType |
| typedef VectorScalarUnaryFunctor<V>::SizeType CDPL::Math::DiagonalMatrixFromVector< V >::SizeType |
|
inlinestatic |
Returns \( e(i) \) if i equals j, otherwise 0.
| E | The vector expression type. |
| e | The vector expression. |
| i | The zero-based row index. |
| j | The zero-based column index. |