![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
Matrix-expression proxy that views a contiguous rectangular subrange of an underlying matrix. More...
#include <MatrixProxy.hpp>
Inheritance diagram for CDPL::Math::MatrixRange< 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. 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... | |
| typedef Range< SizeType > | RangeType |
| Range type used to specify the row and column index ranges. More... | |
Public Types inherited from CDPL::Math::MatrixExpression< MatrixRange< M > > | |
| typedef MatrixRange< 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 | |
| MatrixRange (MatrixType &m, const RangeType &r1, const RangeType &r2) | |
| Constructs the matrix range proxy viewing rows in r1 and columns in r2 of m. More... | |
| Reference | operator() (SizeType i, SizeType j) |
| Returns a mutable reference to the element at proxy index (i, j). More... | |
| ConstReference | operator() (SizeType i, SizeType j) const |
Returns a const reference to the element at proxy index (i, j). More... | |
| SizeType | getStart1 () const |
| Returns the row index range's start index in the wrapped matrix. More... | |
| SizeType | getStart2 () const |
| Returns the column index range's start index in the wrapped matrix. More... | |
| SizeType | getSize1 () const |
| Returns the number of rows in the proxy (size of the row range). More... | |
| SizeType | getSize2 () const |
| Returns the number of columns in the proxy (size of the column range). More... | |
| bool | isEmpty () const |
| Tells whether the proxy is empty (either range has size zero). 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... | |
| MatrixRange & | operator= (const MatrixRange &r) |
| Copy-assigns the contents of r to this matrix range (via a temporary to handle aliasing). More... | |
| template<typename E > | |
| MatrixRange & | operator= (const MatrixExpression< E > &e) |
| Assigns the elements of the matrix expression e to this matrix range (via a temporary to handle aliasing). More... | |
| template<typename E > | |
| MatrixRange & | operator+= (const MatrixExpression< E > &e) |
| Adds the elements of the matrix expression e to this matrix range (via a temporary to handle aliasing). More... | |
| template<typename E > | |
| MatrixRange & | operator-= (const MatrixExpression< E > &e) |
| Subtracts the elements of the matrix expression e from this matrix range (via a temporary to handle aliasing). More... | |
| template<typename T > | |
| std::enable_if< IsScalar< T >::value, MatrixRange >::type & | operator*= (const T &t) |
| Multiplies every element of this matrix range by the scalar t. More... | |
| template<typename T > | |
| std::enable_if< IsScalar< T >::value, MatrixRange >::type & | operator/= (const T &t) |
| Divides every element of this matrix range by the scalar t. More... | |
| template<typename E > | |
| MatrixRange & | assign (const MatrixExpression< E > &e) |
| Assigns the elements of the matrix expression e to this matrix range without intermediate temporary. More... | |
| template<typename E > | |
| MatrixRange & | plusAssign (const MatrixExpression< E > &e) |
| Adds the elements of the matrix expression e to this matrix range without intermediate temporary. More... | |
| template<typename E > | |
| MatrixRange & | minusAssign (const MatrixExpression< E > &e) |
| Subtracts the elements of the matrix expression e from this matrix range without intermediate temporary. More... | |
| void | swap (MatrixRange &r) |
| Swaps the contents of this matrix range with those of r (via element-wise swap of the underlying matrix elements). More... | |
Public Member Functions inherited from CDPL::Math::MatrixExpression< MatrixRange< 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 (MatrixRange &r1, MatrixRange &r2) |
| ADL-enabled free-function form of swap(). More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CDPL::Math::MatrixExpression< MatrixRange< M > > | |
| MatrixExpression () | |
| ~MatrixExpression () | |
Protected Member Functions inherited from CDPL::Math::Expression< E > | |
| Expression () | |
| ~Expression () | |
Matrix-expression proxy that views a contiguous rectangular subrange of an underlying matrix.
| M | The wrapped matrix type. |
| typedef M CDPL::Math::MatrixRange< M >::MatrixType |
The wrapped matrix type.
| typedef M::SizeType CDPL::Math::MatrixRange< M >::SizeType |
The size type used by the wrapped matrix.
| typedef M::DifferenceType CDPL::Math::MatrixRange< M >::DifferenceType |
The signed difference type used by the wrapped matrix.
| typedef M::ValueType CDPL::Math::MatrixRange< M >::ValueType |
The element value type of the wrapped matrix.
| typedef M::ConstReference CDPL::Math::MatrixRange< 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::MatrixRange< 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::MatrixRange< M >::MatrixClosureType |
Closure type used to store the wrapped matrix internally.
| typedef const SelfType CDPL::Math::MatrixRange< M >::ConstClosureType |
Constant closure type used when this proxy appears inside another expression.
| typedef SelfType CDPL::Math::MatrixRange< M >::ClosureType |
Closure type used when this proxy appears inside another expression.
| typedef Range<SizeType> CDPL::Math::MatrixRange< M >::RangeType |
Range type used to specify the row and column index ranges.
|
inline |
Constructs the matrix range proxy viewing rows in r1 and columns in r2 of m.
| m | The wrapped matrix. |
| r1 | The row index range. |
| r2 | The column index range. |
|
inline |
Returns a mutable reference to the element at proxy index (i, j).
| i | The zero-based proxy row index. |
| j | The zero-based proxy column index. |
m(r1(i), r2(j)).
|
inline |
Returns a const reference to the element at proxy index (i, j).
| i | The zero-based proxy row index. |
| j | The zero-based proxy column index. |
const reference to the underlying element m(r1(i), r2(j)).
|
inline |
Returns the row index range's start index in the wrapped matrix.
|
inline |
Returns the column index range's start index in the wrapped matrix.
|
inline |
Returns the number of rows in the proxy (size of the row range).
|
inline |
Returns the number of columns in the proxy (size of the column range).
|
inline |
Tells whether the proxy is empty (either range has size zero).
true if either range has zero size, 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 matrix range (via a temporary to handle aliasing).
| r | The source matrix range. |
|
inline |
Assigns the elements of the matrix expression e to this matrix range (via a temporary to handle aliasing).
| E | The source matrix expression type. |
| e | The source matrix expression. |
|
inline |
Adds the elements of the matrix expression e to this matrix range (via a temporary to handle aliasing).
| E | The source matrix expression type. |
| e | The source matrix expression. |
|
inline |
Subtracts the elements of the matrix expression e from this matrix range (via a temporary to handle aliasing).
| E | The source matrix expression type. |
| e | The source matrix expression. |
|
inline |
Multiplies every element of this matrix range by the scalar t.
| T | The scalar type. |
| t | The scalar multiplier. |
|
inline |
Divides every element of this matrix range by the scalar t.
| T | The scalar type. |
| t | The scalar divisor. |
|
inline |
Assigns the elements of the matrix expression e to this matrix range without intermediate temporary.
| E | The source matrix expression type. |
| e | The source matrix expression. |
|
inline |
Adds the elements of the matrix expression e to this matrix range without intermediate temporary.
| E | The source matrix expression type. |
| e | The source matrix expression. |
|
inline |
Subtracts the elements of the matrix expression e from this matrix range without intermediate temporary.
| E | The source matrix expression type. |
| e | The source matrix expression. |
|
inline |
Swaps the contents of this matrix range with those of r (via element-wise swap of the underlying matrix elements).
| r | The matrix range to swap with. |
|
friend |
ADL-enabled free-function form of swap().
| r1 | The first matrix range. |
| r2 | The second matrix range. |