![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
Lightweight matrix expression that proxies a reference to an underlying matrix container. More...
#include <Matrix.hpp>
Inheritance diagram for CDPL::Math::MatrixReference< M >:Public Types | |
| typedef M | MatrixType |
| The wrapped matrix type. More... | |
| typedef M::ValueType | ValueType |
| The element value type of the wrapped matrix. More... | |
| typedef std::conditional< std::is_const< M >::value, typename M::ConstReference, typename M::Reference >::type | Reference |
Mutable reference type (degrades to ConstReference when the wrapped matrix is const). More... | |
| typedef M::ConstReference | ConstReference |
| Constant reference type to an element. More... | |
| typedef M::SizeType | SizeType |
| The unsigned size type of the wrapped matrix. More... | |
| typedef M::DifferenceType | DifferenceType |
| The signed difference type of the wrapped matrix. More... | |
| typedef SelfType | ClosureType |
| Closure type used when this proxy appears inside another expression. More... | |
| typedef const SelfType | ConstClosureType |
| Constant closure type used when this proxy appears inside another expression. More... | |
Public Types inherited from CDPL::Math::MatrixExpression< MatrixReference< M > > | |
| typedef MatrixReference< M > | ExpressionType |
| The derived matrix expression type. More... | |
Public Types inherited from CDPL::Math::Expression< E > | |
| typedef E | ExpressionType |
| The derived expression type (made available to expression-template machinery). More... | |
Public Member Functions | |
| MatrixReference (MatrixType &m) | |
| Constructs the reference proxy referring to m. More... | |
| Reference | operator() (SizeType i, SizeType j) |
| Returns a mutable reference to the element at (i, j). More... | |
| ConstReference | operator() (SizeType i, SizeType j) const |
Returns a const reference to the element at (i, j). More... | |
| SizeType | getSize1 () const |
| Returns the wrapped matrix's number of rows. More... | |
| SizeType | getSize2 () const |
| Returns the wrapped matrix's number of columns. More... | |
| SizeType | getMaxSize () const |
| Returns the wrapped matrix's maximum total element count. More... | |
| SizeType | getMaxSize1 () const |
| Returns the wrapped matrix's maximum number of rows. More... | |
| SizeType | getMaxSize2 () const |
| Returns the wrapped matrix's maximum number of columns. More... | |
| bool | isEmpty () const |
| Tells whether the wrapped matrix is empty. More... | |
| const MatrixType & | getData () const |
Returns a const reference to the wrapped matrix. More... | |
| MatrixType & | getData () |
| Returns a reference to the wrapped matrix. More... | |
| MatrixReference & | operator= (const MatrixReference &r) |
| Copy-assigns the wrapped matrix from the matrix referenced by r. More... | |
| template<typename E > | |
| MatrixReference & | operator= (const MatrixExpression< E > &e) |
| Assigns the matrix expression e to the wrapped matrix. More... | |
| template<typename E > | |
| MatrixReference & | operator+= (const MatrixExpression< E > &e) |
| Adds the matrix expression e element-wise to the wrapped matrix. More... | |
| template<typename E > | |
| MatrixReference & | operator-= (const MatrixExpression< E > &e) |
| Subtracts the matrix expression e element-wise from the wrapped matrix. More... | |
| template<typename T > | |
| std::enable_if< IsScalar< T >::value, MatrixReference >::type & | operator*= (const T &t) |
| Multiplies every element of the wrapped matrix by the scalar t. More... | |
| template<typename T > | |
| std::enable_if< IsScalar< T >::value, MatrixReference >::type & | operator/= (const T &t) |
| Divides every element of the wrapped matrix by the scalar t. More... | |
| template<typename E > | |
| MatrixReference & | assign (const MatrixExpression< E > &e) |
| Assigns the matrix expression e to the wrapped matrix without intermediate temporary. More... | |
| template<typename E > | |
| MatrixReference & | plusAssign (const MatrixExpression< E > &e) |
| Adds the matrix expression e to the wrapped matrix without intermediate temporary. More... | |
| template<typename E > | |
| MatrixReference & | minusAssign (const MatrixExpression< E > &e) |
| Subtracts the matrix expression e from the wrapped matrix without intermediate temporary. More... | |
| void | swap (MatrixReference &r) |
| Swaps the contents of the two wrapped matrices. More... | |
Public Member Functions inherited from CDPL::Math::MatrixExpression< MatrixReference< M > > | |
| const ExpressionType & | operator() () const |
Returns a const reference to the derived matrix expression. More... | |
| ExpressionType & | operator() () |
| Returns a reference to the derived matrix expression. More... | |
Friends | |
| void | swap (MatrixReference &r1, MatrixReference &r2) |
| ADL-enabled free-function form of swap(). More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CDPL::Math::MatrixExpression< MatrixReference< M > > | |
| MatrixExpression () | |
| ~MatrixExpression () | |
Protected Member Functions inherited from CDPL::Math::Expression< E > | |
| Expression () | |
| ~Expression () | |
Lightweight matrix expression that proxies a reference to an underlying matrix container.
| M | The wrapped matrix type. |
| typedef M CDPL::Math::MatrixReference< M >::MatrixType |
The wrapped matrix type.
| typedef M::ValueType CDPL::Math::MatrixReference< M >::ValueType |
The element value type of the wrapped matrix.
| typedef std::conditional<std::is_const<M>::value, typename M::ConstReference, typename M::Reference>::type CDPL::Math::MatrixReference< M >::Reference |
Mutable reference type (degrades to ConstReference when the wrapped matrix is const).
| typedef M::ConstReference CDPL::Math::MatrixReference< M >::ConstReference |
Constant reference type to an element.
| typedef M::SizeType CDPL::Math::MatrixReference< M >::SizeType |
The unsigned size type of the wrapped matrix.
| typedef M::DifferenceType CDPL::Math::MatrixReference< M >::DifferenceType |
The signed difference type of the wrapped matrix.
| typedef SelfType CDPL::Math::MatrixReference< M >::ClosureType |
Closure type used when this proxy appears inside another expression.
| typedef const SelfType CDPL::Math::MatrixReference< M >::ConstClosureType |
Constant closure type used when this proxy appears inside another expression.
|
inlineexplicit |
Constructs the reference proxy referring to m.
| m | The wrapped matrix to proxy. |
|
inline |
Returns a mutable reference to the element at (i, j).
| i | The zero-based row index. |
| j | The zero-based column index. |
|
inline |
Returns a const reference to the element at (i, j).
| i | The zero-based row index. |
| j | The zero-based column index. |
const reference to the element.
|
inline |
Returns the wrapped matrix's number of rows.
|
inline |
Returns the wrapped matrix's number of columns.
|
inline |
Returns the wrapped matrix's maximum total element count.
|
inline |
Returns the wrapped matrix's maximum number of rows.
|
inline |
Returns the wrapped matrix's maximum number of columns.
|
inline |
Tells whether the wrapped matrix is empty.
true if the wrapped matrix has zero rows or zero columns, and false otherwise.
|
inline |
Returns a const reference to the wrapped matrix.
const reference to the wrapped matrix.
|
inline |
Returns a reference to the wrapped matrix.
|
inline |
Copy-assigns the wrapped matrix from the matrix referenced by r.
| r | The source reference proxy. |
|
inline |
Assigns the matrix expression e to the wrapped matrix.
| E | The source matrix expression type. |
| e | The source matrix expression. |
|
inline |
Adds the matrix expression e element-wise to the wrapped matrix.
| E | The source matrix expression type. |
| e | The source matrix expression. |
|
inline |
Subtracts the matrix expression e element-wise from the wrapped matrix.
| E | The source matrix expression type. |
| e | The source matrix expression. |
|
inline |
Multiplies every element of the wrapped matrix by the scalar t.
| T | The scalar type. |
| t | The scalar multiplier. |
|
inline |
Divides every element of the wrapped matrix by the scalar t.
| T | The scalar type. |
| t | The scalar divisor. |
|
inline |
Assigns the matrix expression e to the wrapped matrix without intermediate temporary.
| E | The source matrix expression type. |
| e | The source matrix expression. |
|
inline |
Adds the matrix expression e to the wrapped matrix without intermediate temporary.
| E | The source matrix expression type. |
| e | The source matrix expression. |
|
inline |
Subtracts the matrix expression e from the wrapped matrix without intermediate temporary.
| E | The source matrix expression type. |
| e | The source matrix expression. |
|
inline |
Swaps the contents of the two wrapped matrices.
| r | The reference proxy to swap with. |
|
friend |
ADL-enabled free-function form of swap().
| r1 | The first reference proxy. |
| r2 | The second reference proxy. |