![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
Lightweight matrix container that wraps a nested std::initializer_list of T values.
More...
#include <Matrix.hpp>
Inheritance diagram for CDPL::Math::InitListMatrix< T >:Public Types | |
| typedef InitListMatrix | SelfType |
| Convenience alias for this instantiation. More... | |
| typedef std::initializer_list< std::initializer_list< T > > | InitializerListType |
The nested std::initializer_list type wrapped by this matrix. More... | |
| typedef InitializerListType::value_type::value_type | ValueType |
| The scalar value type. More... | |
| typedef InitializerListType::value_type::const_reference | ConstReference |
| Constant reference type to an element. More... | |
| typedef InitializerListType::value_type::reference | Reference |
| Mutable reference type to an element. More... | |
| typedef InitializerListType::size_type | SizeType |
| The unsigned size type. More... | |
| typedef std::ptrdiff_t | DifferenceType |
| The signed difference type. More... | |
| typedef SelfType | ClosureType |
| Closure type used when this matrix appears inside another expression. More... | |
| typedef 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 by expression-template machinery. More... | |
Public Types inherited from CDPL::Math::MatrixContainer< InitListMatrix< T > > | |
| typedef InitListMatrix< 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 | |
| InitListMatrix (InitializerListType l) | |
Constructs an InitListMatrix wrapping the nested initializer list l. More... | |
| Reference | operator() (SizeType i, SizeType j) |
| Returns a mutable reference to the element at row i and column j. More... | |
| ConstReference | operator() (SizeType i, SizeType j) const |
Returns a const reference to the element at row i and column j. More... | |
| SizeType | getSize1 () const |
| Returns the number of rows. More... | |
| SizeType | getSize2 () const |
| Returns the number of columns (the longest row length). More... | |
| bool | isEmpty () const |
| Tells whether the matrix is empty (zero rows or zero columns). More... | |
Public Member Functions inherited from CDPL::Math::MatrixContainer< InitListMatrix< 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... | |
Additional Inherited Members | |
Protected Member Functions inherited from CDPL::Math::MatrixContainer< InitListMatrix< 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 () | |
Lightweight matrix container that wraps a nested std::initializer_list of T values.
| T | The scalar value type. |
| typedef InitListMatrix CDPL::Math::InitListMatrix< T >::SelfType |
Convenience alias for this instantiation.
| typedef std::initializer_list<std::initializer_list<T> > CDPL::Math::InitListMatrix< T >::InitializerListType |
The nested std::initializer_list type wrapped by this matrix.
| typedef InitializerListType::value_type::value_type CDPL::Math::InitListMatrix< T >::ValueType |
The scalar value type.
| typedef InitializerListType::value_type::const_reference CDPL::Math::InitListMatrix< T >::ConstReference |
Constant reference type to an element.
| typedef InitializerListType::value_type::reference CDPL::Math::InitListMatrix< T >::Reference |
Mutable reference type to an element.
| typedef InitializerListType::size_type CDPL::Math::InitListMatrix< T >::SizeType |
The unsigned size type.
| typedef std::ptrdiff_t CDPL::Math::InitListMatrix< T >::DifferenceType |
The signed difference type.
| typedef SelfType CDPL::Math::InitListMatrix< T >::ClosureType |
Closure type used when this matrix appears inside another expression.
| typedef const SelfType CDPL::Math::InitListMatrix< T >::ConstClosureType |
Constant closure type used when this matrix appears inside another expression.
| typedef Matrix<T, std::vector<T> > CDPL::Math::InitListMatrix< T >::MatrixTemporaryType |
Concrete temporary matrix type used by expression-template machinery.
| typedef Vector<T, std::vector<T> > CDPL::Math::InitListMatrix< T >::VectorTemporaryType |
Concrete temporary vector type used by expression-template machinery.
|
inline |
Constructs an InitListMatrix wrapping the nested initializer list l.
The second-dimension size is the longest inner list's length; shorter rows are zero-padded on access.
| l | The nested initializer list. |
|
inline |
Returns a mutable reference to the element at row i and column j.
| i | The zero-based row index. |
| j | The zero-based column index. |
| Base::IndexError | if i or j is out of range. |
|
inline |
Returns a const reference to the element at row i and column j.
| i | The zero-based row index. |
| j | The zero-based column index. |
const reference to the element (or to a zero element if j is past the row's length). | Base::IndexError | if i or j is out of range. |
|
inline |
Returns the number of rows.
|
inline |
Returns the number of columns (the longest row length).
|
inline |
Tells whether the matrix is empty (zero rows or zero columns).
true if the matrix is empty, and false otherwise.