![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
\( N \times N \) diagonal scaling matrix. More...
#include <AffineTransform.hpp>
Inheritance diagram for CDPL::Math::ScalingMatrix< T >:Public Types | |
| typedef T | ValueType |
| The scalar value type. More... | |
| typedef const T | Reference |
Reference type (always a const reference — elements are computed). 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, std::vector< 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< ScalingMatrix< T > > | |
| typedef ScalingMatrix< 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 | |
| ScalingMatrix (SizeType n, const ValueType &sx=ValueType(1), const ValueType &sy=ValueType(1), const ValueType &sz=ValueType(1)) | |
| Constructs an \( N \times N \) scaling matrix with the supplied per-axis scale factors. More... | |
| ScalingMatrix (const ScalingMatrix &m) | |
| Constructs a copy of the scaling matrix m. More... | |
| void | set (const ValueType &sx=ValueType(1), const ValueType &sy=ValueType(1), const ValueType &sz=ValueType(1)) |
| Sets the per-axis scale factors. More... | |
| ConstReference | operator() (SizeType i, SizeType j) const |
| Returns the scaling-matrix entry at (i, j). More... | |
| bool | isEmpty () const |
| Tells whether the matrix is empty (size zero). More... | |
| SizeType | getSize1 () const |
| Returns the dimension N (the row count). More... | |
| SizeType | getSize2 () const |
| Returns the dimension N (the column count). More... | |
| SizeType | getMaxSize1 () const |
| Returns the maximum representable row count. More... | |
| SizeType | getMaxSize2 () const |
| Returns the maximum representable column count. More... | |
| ScalingMatrix & | operator= (const ScalingMatrix &m) |
| Copy-assigns the dimension and the per-axis scale factors from m. More... | |
| void | swap (ScalingMatrix &m) |
| Swaps the dimension and the per-axis scale factors with m. More... | |
| void | resize (SizeType n) |
| Resizes the matrix dimension to n (the scale factors are left unchanged). More... | |
Public Member Functions inherited from CDPL::Math::MatrixContainer< ScalingMatrix< 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 (ScalingMatrix &m1, ScalingMatrix &m2) |
| ADL-enabled free-function form of swap(). More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CDPL::Math::MatrixContainer< ScalingMatrix< 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 () | |
\( N \times N \) diagonal scaling matrix.
The diagonal entries hold the per-axis scale factors; all off-diagonal entries are 0. The size \( N \) is configurable so the matrix can be combined with homogeneous coordinates.
| T | The scalar value type. |
| typedef T CDPL::Math::ScalingMatrix< T >::ValueType |
The scalar value type.
| typedef const T CDPL::Math::ScalingMatrix< T >::Reference |
Reference type (always a const reference — elements are computed).
| typedef const T CDPL::Math::ScalingMatrix< T >::ConstReference |
Constant reference type to an element.
| typedef std::size_t CDPL::Math::ScalingMatrix< T >::SizeType |
The unsigned size type.
| typedef std::ptrdiff_t CDPL::Math::ScalingMatrix< T >::DifferenceType |
The signed difference type.
| typedef MatrixReference<SelfType> CDPL::Math::ScalingMatrix< T >::ClosureType |
Closure type used when this matrix appears inside another expression.
| typedef const MatrixReference<const SelfType> CDPL::Math::ScalingMatrix< T >::ConstClosureType |
Constant closure type used when this matrix appears inside another expression.
| typedef Matrix<T, std::vector<T> > CDPL::Math::ScalingMatrix< T >::MatrixTemporaryType |
Concrete temporary matrix type used by expression-template machinery.
| typedef Vector<T, std::vector<T> > CDPL::Math::ScalingMatrix< T >::VectorTemporaryType |
Concrete temporary vector type used when assembling vectors from this matrix.
|
inlineexplicit |
Constructs an \( N \times N \) scaling matrix with the supplied per-axis scale factors.
| n | The matrix dimension N. |
| sx | The x-axis scale factor (default: 1). |
| sy | The y-axis scale factor (default: 1). |
| sz | The z-axis scale factor (default: 1). |
|
inline |
Constructs a copy of the scaling matrix m.
| m | The scaling matrix to copy. |
|
inline |
Sets the per-axis scale factors.
| sx | The x-axis scale factor (default: 1). |
| sy | The y-axis scale factor (default: 1). |
| sz | The z-axis scale factor (default: 1). |
|
inline |
Returns the scaling-matrix entry at (i, j).
| i | The zero-based row index. |
| j | The zero-based column index. |
0, 1, 2 (1 elsewhere on the diagonal; 0 off the diagonal). | Base::IndexError | if either index is out of range. |
|
inline |
Tells whether the matrix is empty (size zero).
true if N is zero, and false otherwise.
|
inline |
Returns the dimension N (the row count).
|
inline |
Returns the dimension N (the column count).
|
inline |
Returns the maximum representable row count.
|
inline |
Returns the maximum representable column count.
|
inline |
Copy-assigns the dimension and the per-axis scale factors from m.
| m | The source scaling matrix. |
|
inline |
Swaps the dimension and the per-axis scale factors with m.
| m | The scaling matrix to swap with. |
|
inline |
Resizes the matrix dimension to n (the scale factors are left unchanged).
| n | The new dimension. |
|
friend |
ADL-enabled free-function form of swap().
| m1 | The first scaling matrix. |
| m2 | The second scaling matrix. |