![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
Vector-expression proxy that views a single row of an underlying matrix. More...
#include <MatrixProxy.hpp>
Inheritance diagram for CDPL::Math::MatrixRow< M >:Public Types | |
| typedef M | MatrixType |
| The wrapped matrix type. More... | |
| typedef M::SizeType | SizeType |
| The size type used by the wrapped matrix. More... | |
| typedef M::DifferenceType | DifferenceType |
| The signed difference type used by the wrapped matrix. More... | |
| typedef M::ValueType | ValueType |
| The element value type of the wrapped matrix. More... | |
| typedef M::ConstReference | ConstReference |
| Constant reference type to an element. 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 std::conditional< std::is_const< M >::value, typename M::ConstClosureType, typename M::ClosureType >::type | MatrixClosureType |
| Closure type used to store the wrapped matrix internally (mutable or const flavor). More... | |
| typedef const SelfType | ConstClosureType |
| Constant closure type used when this proxy appears inside another expression. More... | |
| typedef SelfType | ClosureType |
| Closure type used when this proxy appears inside another expression. More... | |
Public Types inherited from CDPL::Math::VectorExpression< MatrixRow< M > > | |
| typedef MatrixRow< M > | ExpressionType |
| The derived vector 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 | |
| MatrixRow (MatrixType &m, SizeType i) | |
| Constructs the row proxy viewing row i of m. More... | |
| Reference | operator() (SizeType i) |
| Returns a mutable reference to the element at column i of the row. More... | |
| ConstReference | operator() (SizeType i) const |
Returns a const reference to the element at column i of the row. More... | |
| Reference | operator[] (SizeType i) |
| Returns a mutable reference to the element at column i of the row (alias for operator()). More... | |
| ConstReference | operator[] (SizeType i) const |
Returns a const reference to the element at column i of the row (alias for operator()). More... | |
| SizeType | getIndex () const |
| Returns the row index this proxy refers to within the wrapped matrix. More... | |
| SizeType | getSize () const |
| Returns the size of the row (number of columns of the wrapped matrix). More... | |
| bool | isEmpty () const |
| Tells whether the row is empty (the wrapped matrix has zero columns). More... | |
| MatrixClosureType & | getData () |
| Returns a reference to the wrapped matrix (via its stored closure). More... | |
| const MatrixClosureType & | getData () const |
Returns a const reference to the wrapped matrix (via its stored closure). More... | |
| MatrixRow & | operator= (const MatrixRow &r) |
| Copy-assigns the contents of r to this row (via a temporary to handle aliasing). More... | |
| template<typename E > | |
| MatrixRow & | operator= (const VectorExpression< E > &e) |
| Assigns the elements of the vector expression e to this row (via a temporary to handle aliasing). More... | |
| template<typename E > | |
| MatrixRow & | operator+= (const VectorExpression< E > &e) |
| Adds the elements of the vector expression e to this row (via a temporary to handle aliasing). More... | |
| template<typename E > | |
| MatrixRow & | operator-= (const VectorExpression< E > &e) |
| Subtracts the elements of the vector expression e from this row (via a temporary to handle aliasing). More... | |
| template<typename T > | |
| std::enable_if< IsScalar< T >::value, MatrixRow >::type & | operator*= (const T &t) |
| Multiplies every element of this row by the scalar t. More... | |
| template<typename T > | |
| std::enable_if< IsScalar< T >::value, MatrixRow >::type & | operator/= (const T &t) |
| Divides every element of this row by the scalar t. More... | |
| template<typename E > | |
| MatrixRow & | assign (const VectorExpression< E > &e) |
| Assigns the elements of the vector expression e to this row without intermediate temporary. More... | |
| template<typename E > | |
| MatrixRow & | plusAssign (const VectorExpression< E > &e) |
| Adds the elements of the vector expression e to this row without intermediate temporary. More... | |
| template<typename E > | |
| MatrixRow & | minusAssign (const VectorExpression< E > &e) |
| Subtracts the elements of the vector expression e from this row without intermediate temporary. More... | |
| void | swap (MatrixRow &r) |
| Swaps the contents of this row with those of r (via element-wise swap of the underlying matrix elements). More... | |
Public Member Functions inherited from CDPL::Math::VectorExpression< MatrixRow< M > > | |
| const ExpressionType & | operator() () const |
Returns a const reference to the derived vector expression. More... | |
| ExpressionType & | operator() () |
| Returns a reference to the derived vector expression. More... | |
Friends | |
| void | swap (MatrixRow &r1, MatrixRow &r2) |
| ADL-enabled free-function form of swap(). More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CDPL::Math::VectorExpression< MatrixRow< M > > | |
| VectorExpression () | |
| ~VectorExpression () | |
Protected Member Functions inherited from CDPL::Math::Expression< E > | |
| Expression () | |
| ~Expression () | |
Vector-expression proxy that views a single row of an underlying matrix.
| M | The wrapped matrix type. |
| typedef M CDPL::Math::MatrixRow< M >::MatrixType |
The wrapped matrix type.
| typedef M::SizeType CDPL::Math::MatrixRow< M >::SizeType |
The size type used by the wrapped matrix.
| typedef M::DifferenceType CDPL::Math::MatrixRow< M >::DifferenceType |
The signed difference type used by the wrapped matrix.
| typedef M::ValueType CDPL::Math::MatrixRow< M >::ValueType |
The element value type of the wrapped matrix.
| typedef M::ConstReference CDPL::Math::MatrixRow< M >::ConstReference |
Constant reference type to an element.
| typedef std::conditional<std::is_const<M>::value, typename M::ConstReference, typename M::Reference>::type CDPL::Math::MatrixRow< M >::Reference |
Mutable reference type (degrades to ConstReference when the wrapped matrix is const).
| typedef std::conditional<std::is_const<M>::value, typename M::ConstClosureType, typename M::ClosureType>::type CDPL::Math::MatrixRow< M >::MatrixClosureType |
Closure type used to store the wrapped matrix internally (mutable or const flavor).
| typedef const SelfType CDPL::Math::MatrixRow< M >::ConstClosureType |
Constant closure type used when this proxy appears inside another expression.
| typedef SelfType CDPL::Math::MatrixRow< M >::ClosureType |
Closure type used when this proxy appears inside another expression.
|
inline |
Constructs the row proxy viewing row i of m.
| m | The wrapped matrix. |
| i | The zero-based row index to view. |
|
inline |
Returns a mutable reference to the element at column i of the row.
| i | The zero-based column index. |
m(index, i).
|
inline |
Returns a const reference to the element at column i of the row.
| i | The zero-based column index. |
const reference to the underlying element m(index, i).
|
inline |
Returns a mutable reference to the element at column i of the row (alias for operator()).
| i | The zero-based column index. |
|
inline |
Returns a const reference to the element at column i of the row (alias for operator()).
| i | The zero-based column index. |
const reference to the underlying element.
|
inline |
Returns the row index this proxy refers to within the wrapped matrix.
|
inline |
Returns the size of the row (number of columns of the wrapped matrix).
|
inline |
Tells whether the row is empty (the wrapped matrix has zero columns).
true if the wrapped matrix has zero columns, and false otherwise.
|
inline |
Returns a reference to the wrapped matrix (via its stored closure).
|
inline |
Returns a const reference to the wrapped matrix (via its stored closure).
const reference to the wrapped matrix closure.
|
inline |
Copy-assigns the contents of r to this row (via a temporary to handle aliasing).
| r | The source row. |
|
inline |
Assigns the elements of the vector expression e to this row (via a temporary to handle aliasing).
| E | The source vector expression type. |
| e | The source vector expression. |
|
inline |
Adds the elements of the vector expression e to this row (via a temporary to handle aliasing).
| E | The source vector expression type. |
| e | The source vector expression. |
|
inline |
Subtracts the elements of the vector expression e from this row (via a temporary to handle aliasing).
| E | The source vector expression type. |
| e | The source vector expression. |
|
inline |
Multiplies every element of this row by the scalar t.
| T | The scalar type. |
| t | The scalar multiplier. |
|
inline |
Divides every element of this row by the scalar t.
| T | The scalar type. |
| t | The scalar divisor. |
|
inline |
Assigns the elements of the vector expression e to this row without intermediate temporary.
| E | The source vector expression type. |
| e | The source vector expression. |
|
inline |
Adds the elements of the vector expression e to this row without intermediate temporary.
| E | The source vector expression type. |
| e | The source vector expression. |
|
inline |
Subtracts the elements of the vector expression e from this row without intermediate temporary.
| E | The source vector expression type. |
| e | The source vector expression. |
|
inline |
Swaps the contents of this row with those of r (via element-wise swap of the underlying matrix elements).
| r | The row to swap with. |
ADL-enabled free-function form of swap().
| r1 | The first row. |
| r2 | The second row. |