![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
Constant identity-matrix expression ( \( 1 \) on the diagonal, \( 0 \) elsewhere). More...
#include <Matrix.hpp>
Inheritance diagram for CDPL::Math::IdentityMatrix< 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 an element. 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< IdentityMatrix< T > > | |
| typedef IdentityMatrix< 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 | |
| IdentityMatrix () | |
| Constructs an empty identity matrix. More... | |
| IdentityMatrix (SizeType m, SizeType n) | |
Constructs an identity matrix of size \( m \times n \) (1 on the diagonal, 0 elsewhere). More... | |
| IdentityMatrix (const IdentityMatrix &m) | |
| Constructs a copy of the identity matrix m. More... | |
| ConstReference | operator() (SizeType i, SizeType j) const |
Returns a const reference to either 1 (if i equals j) or 0. 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... | |
| IdentityMatrix & | operator= (const IdentityMatrix &m) |
| Copy-assigns the dimensions from m. More... | |
| void | swap (IdentityMatrix &m) |
| Swaps the dimensions 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< IdentityMatrix< 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 (IdentityMatrix &m1, IdentityMatrix &m2) |
| ADL-enabled free-function form of swap(). More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CDPL::Math::MatrixContainer< IdentityMatrix< 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 identity-matrix expression ( \( 1 \) on the diagonal, \( 0 \) elsewhere).
| T | The scalar value type. |
| typedef T CDPL::Math::IdentityMatrix< T >::ValueType |
The scalar value type.
| typedef const T& CDPL::Math::IdentityMatrix< T >::Reference |
Reference type (always a const reference — elements are immutable).
| typedef const T& CDPL::Math::IdentityMatrix< T >::ConstReference |
Constant reference type to an element.
| typedef std::size_t CDPL::Math::IdentityMatrix< T >::SizeType |
The unsigned size type.
| typedef std::ptrdiff_t CDPL::Math::IdentityMatrix< T >::DifferenceType |
The signed difference type.
| typedef MatrixReference<SelfType> CDPL::Math::IdentityMatrix< T >::ClosureType |
Closure type used when this matrix appears inside another expression.
| typedef const MatrixReference<const SelfType> CDPL::Math::IdentityMatrix< T >::ConstClosureType |
Constant closure type used when this matrix appears inside another expression.
| typedef Matrix<T> CDPL::Math::IdentityMatrix< T >::MatrixTemporaryType |
Concrete temporary matrix type used by expression-template machinery.
| typedef Vector<T, std::vector<T> > CDPL::Math::IdentityMatrix< T >::VectorTemporaryType |
Concrete temporary vector type used when assembling vectors from this matrix.
|
inline |
Constructs an empty identity matrix.
|
inline |
Constructs an identity matrix of size \( m \times n \) (1 on the diagonal, 0 elsewhere).
| m | The number of rows. |
| n | The number of columns. |
|
inline |
Constructs a copy of the identity matrix m.
| m | The identity matrix to copy. |
|
inline |
Returns a const reference to either 1 (if i equals j) or 0.
| i | The zero-based row index. |
| j | The zero-based column index. |
const reference to either 1 (on the diagonal) or 0 (off the diagonal). | 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 from m.
| m | The source identity matrix. |
|
inline |
Swaps the dimensions with m.
| m | The identity 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 identity matrix. |
| m2 | The second identity matrix. |