![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
Constant matrix expression in which every entry equals the same scalar value. More...
#include <Matrix.hpp>
Inheritance diagram for CDPL::Math::ScalarMatrix< T >:Public Types | |
| typedef T | ValueType |
| The scalar value type. More... | |
| typedef const T & | Reference |
Reference type (always a const reference — elements are immutable). More... | |
| typedef const T & | ConstReference |
| Constant reference type to the common value. More... | |
| typedef std::size_t | SizeType |
| The unsigned size type. More... | |
| typedef std::ptrdiff_t | DifferenceType |
| The signed difference type. More... | |
| typedef MatrixReference< SelfType > | ClosureType |
| Closure type used when this matrix appears inside another expression. More... | |
| typedef const MatrixReference< const SelfType > | ConstClosureType |
| Constant closure type used when this matrix appears inside another expression. More... | |
| typedef Matrix< T > | MatrixTemporaryType |
| Concrete temporary matrix type used by expression-template machinery. More... | |
| typedef Vector< T, std::vector< T > > | VectorTemporaryType |
| Concrete temporary vector type used when assembling vectors from this matrix. More... | |
Public Types inherited from CDPL::Math::MatrixContainer< ScalarMatrix< T > > | |
| typedef ScalarMatrix< T > | ContainerType |
| The derived matrix container type. More... | |
Public Types inherited from CDPL::Math::MatrixExpression< E > | |
| typedef E | 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 | |
| ScalarMatrix () | |
| Constructs an empty scalar matrix. More... | |
| ScalarMatrix (SizeType m, SizeType n, const ValueType &v=ValueType()) | |
| Constructs a scalar matrix of size \( m \times n \) in which every entry equals v. More... | |
| ScalarMatrix (const ScalarMatrix &m) | |
| Constructs a copy of the scalar matrix m. More... | |
| ConstReference | operator() (SizeType i, SizeType j) const |
Returns a const reference to the common entry value. More... | |
| bool | isEmpty () const |
| Tells whether the matrix is empty. More... | |
| SizeType | getSize1 () const |
| Returns the logical number of rows. More... | |
| SizeType | getSize2 () const |
| Returns the logical number of columns. More... | |
| SizeType | getMaxSize1 () const |
| Returns the maximum representable row count. More... | |
| SizeType | getMaxSize2 () const |
| Returns the maximum representable column count. More... | |
| ScalarMatrix & | operator= (const ScalarMatrix &m) |
| Copy-assigns the dimensions and common value from m. More... | |
| void | swap (ScalarMatrix &m) |
| Swaps the dimensions and common value with m. More... | |
| void | resize (SizeType m, SizeType n) |
| Resizes the dimensions to \( m \times n \). More... | |
Public Member Functions inherited from CDPL::Math::MatrixContainer< ScalarMatrix< T > > | |
| const ContainerType & | operator() () const |
Returns a const reference to the derived matrix container. More... | |
| ContainerType & | operator() () |
| Returns a reference to the derived matrix container. More... | |
Public Member Functions inherited from CDPL::Math::MatrixExpression< E > | |
| 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 (ScalarMatrix &m1, ScalarMatrix &m2) |
| ADL-enabled free-function form of swap(). More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CDPL::Math::MatrixContainer< ScalarMatrix< T > > | |
| MatrixContainer () | |
| ~MatrixContainer () | |
Protected Member Functions inherited from CDPL::Math::MatrixExpression< E > | |
| MatrixExpression () | |
| ~MatrixExpression () | |
Protected Member Functions inherited from CDPL::Math::Expression< E > | |
| Expression () | |
| ~Expression () | |
Constant matrix expression in which every entry equals the same scalar value.
| T | The scalar value type. |
| typedef T CDPL::Math::ScalarMatrix< T >::ValueType |
The scalar value type.
| typedef const T& CDPL::Math::ScalarMatrix< T >::Reference |
Reference type (always a const reference — elements are immutable).
| typedef const T& CDPL::Math::ScalarMatrix< T >::ConstReference |
Constant reference type to the common value.
| typedef std::size_t CDPL::Math::ScalarMatrix< T >::SizeType |
The unsigned size type.
| typedef std::ptrdiff_t CDPL::Math::ScalarMatrix< T >::DifferenceType |
The signed difference type.
| typedef MatrixReference<SelfType> CDPL::Math::ScalarMatrix< T >::ClosureType |
Closure type used when this matrix appears inside another expression.
| typedef const MatrixReference<const SelfType> CDPL::Math::ScalarMatrix< T >::ConstClosureType |
Constant closure type used when this matrix appears inside another expression.
| typedef Matrix<T> CDPL::Math::ScalarMatrix< T >::MatrixTemporaryType |
Concrete temporary matrix type used by expression-template machinery.
| typedef Vector<T, std::vector<T> > CDPL::Math::ScalarMatrix< T >::VectorTemporaryType |
Concrete temporary vector type used when assembling vectors from this matrix.
|
inline |
Constructs an empty scalar matrix.
|
inline |
Constructs a scalar matrix of size \( m \times n \) in which every entry equals v.
| m | The number of rows. |
| n | The number of columns. |
| v | The common entry value. |
|
inline |
Constructs a copy of the scalar matrix m.
| m | The scalar matrix to copy. |
|
inline |
Returns a const reference to the common entry value.
| i | The zero-based row index. |
| j | The zero-based column index. |
const reference to the common entry value. | Base::IndexError | if either index is out of range. |
|
inline |
Tells whether the matrix is empty.
true if either dimension is zero, and false otherwise.
|
inline |
Returns the logical number of rows.
|
inline |
Returns the logical number of columns.
|
inline |
Returns the maximum representable row count.
|
inline |
Returns the maximum representable column count.
|
inline |
Copy-assigns the dimensions and common value from m.
| m | The source scalar matrix. |
|
inline |
Swaps the dimensions and common value with m.
| m | The scalar matrix to swap with. |
|
inline |
Resizes the dimensions to \( m \times n \).
| m | The new row count. |
| n | The new column count. |
|
friend |
ADL-enabled free-function form of swap().
| m1 | The first scalar matrix. |
| m2 | The second scalar matrix. |