Chemical Data Processing Library C++ API - Version 1.4.0
Classes | Namespaces | Typedefs | Functions
Matrix.hpp File Reference

Definition of matrix data types. More...

#include <cstddef>
#include <cstdint>
#include <algorithm>
#include <vector>
#include <limits>
#include <unordered_map>
#include <type_traits>
#include <utility>
#include <initializer_list>
#include <memory>
#include "CDPL/Math/Check.hpp"
#include "CDPL/Math/MatrixExpression.hpp"
#include "CDPL/Math/MatrixAssignment.hpp"
#include "CDPL/Math/DirectAssignmentProxy.hpp"
#include "CDPL/Math/Functional.hpp"
#include "CDPL/Math/TypeTraits.hpp"
#include "CDPL/Math/SparseContainerElement.hpp"
#include "CDPL/Math/LUDecomposition.hpp"
#include "CDPL/Base/Exceptions.hpp"

Go to the source code of this file.

Classes

class  CDPL::Math::MatrixReference< M >
 Lightweight matrix expression that proxies a reference to an underlying matrix container. More...
 
class  CDPL::Math::InitListMatrix< T >
 Lightweight matrix container that wraps a nested std::initializer_list of T values. More...
 
class  CDPL::Math::Matrix< T, A >
 Dynamically-sized dense row-major matrix with configurable underlying storage. More...
 
class  CDPL::Math::SparseMatrix< T, A >
 Sparse matrix that stores only non-default entries keyed by a packed (row, column) identifier. More...
 
class  CDPL::Math::BoundedMatrix< T, M, N >
 Variable-size matrix with fixed upper capacities M \( \times \) N stored in a stack-allocated array. More...
 
class  CDPL::Math::CMatrix< T, M, N >
 Fixed-size dense matrix of dimensions M \( \times \) N backed by a 2D C-array (no dynamic allocation). More...
 
class  CDPL::Math::ZeroMatrix< T >
 Constant matrix expression whose entries are all zero. More...
 
class  CDPL::Math::ScalarMatrix< T >
 Constant matrix expression in which every entry equals the same scalar value. More...
 
class  CDPL::Math::IdentityMatrix< T >
 Constant identity-matrix expression ( \( 1 \) on the diagonal, \( 0 \) elsewhere). More...
 
struct  CDPL::Math::VectorTemporaryTraits< MatrixReference< M > >
 Math::VectorTemporaryTraits specialization inheriting the temporary type of the underlying matrix for a Math::MatrixReference view. More...
 
struct  CDPL::Math::VectorTemporaryTraits< const MatrixReference< M > >
 Math::VectorTemporaryTraits specialization inheriting the temporary type of the underlying matrix for a const Math::MatrixReference view. More...
 
struct  CDPL::Math::MatrixTemporaryTraits< MatrixReference< M > >
 Math::MatrixTemporaryTraits specialization inheriting the temporary type of the underlying matrix for a Math::MatrixReference view. More...
 
struct  CDPL::Math::MatrixTemporaryTraits< const MatrixReference< M > >
 Math::MatrixTemporaryTraits specialization inheriting the temporary type of the underlying matrix for a const Math::MatrixReference view. More...
 

Namespaces

 CDPL
 The namespace of the Chemical Data Processing Library.
 
 CDPL::Math
 Contains classes and functions related to mathematics.
 

Typedefs

typedef ZeroMatrix< float > CDPL::Math::FZeroMatrix
 Memory-efficient immutable matrix where all elements have the value zero of type float. More...
 
typedef ZeroMatrix< double > CDPL::Math::DZeroMatrix
 Memory-efficient immutable matrix where all elements have the value zero of type double. More...
 
typedef ZeroMatrix< long > CDPL::Math::LZeroMatrix
 Memory-efficient immutable matrix where all elements have the value zero of type long. More...
 
typedef ZeroMatrix< unsigned long > CDPL::Math::ULZeroMatrix
 Memory-efficient immutable matrix where all elements have the value zero of type unsigned long. More...
 
typedef ScalarMatrix< float > CDPL::Math::FScalarMatrix
 Memory-efficient immutable matrix where all elements have the same value of type float. More...
 
typedef ScalarMatrix< double > CDPL::Math::DScalarMatrix
 Memory-efficient immutable matrix where all elements have the same value of type double. More...
 
typedef ScalarMatrix< long > CDPL::Math::LScalarMatrix
 Memory-efficient immutable matrix where all elements have the same value of type long. More...
 
typedef ScalarMatrix< unsigned long > CDPL::Math::ULScalarMatrix
 Memory-efficient immutable matrix where all elements have the same value of type unsigned long. More...
 
typedef IdentityMatrix< float > CDPL::Math::FIdentityMatrix
 Memory-efficient immutable identity matrix with element values of type float. More...
 
typedef IdentityMatrix< double > CDPL::Math::DIdentityMatrix
 Memory-efficient immutable identity matrix with element values of type double. More...
 
typedef IdentityMatrix< long > CDPL::Math::LIdentityMatrix
 Memory-efficient immutable identity matrix with element values of type long. More...
 
typedef IdentityMatrix< unsigned long > CDPL::Math::ULIdentityMatrix
 Memory-efficient immutable identity matrix with element values of type unsigned long. More...
 
typedef Matrix< float > CDPL::Math::FMatrix
 Unbounded dense matrix holding floating point values of type float.. More...
 
typedef Matrix< double > CDPL::Math::DMatrix
 Unbounded dense matrix holding floating point values of type double.. More...
 
typedef Matrix< long > CDPL::Math::LMatrix
 Unbounded dense matrix holding signed integers of type long. More...
 
typedef Matrix< unsigned long > CDPL::Math::ULMatrix
 Unbounded dense matrix holding unsigned integers of type unsigned long. More...
 
typedef CMatrix< float, 2, 2 > CDPL::Math::Matrix2F
 Bounded 2x2 matrix holding floating point values of type float. More...
 
typedef CMatrix< float, 3, 3 > CDPL::Math::Matrix3F
 Bounded 3x3 matrix holding floating point values of type float. More...
 
typedef CMatrix< float, 4, 4 > CDPL::Math::Matrix4F
 Bounded 4x4 matrix holding floating point values of type float. More...
 
typedef CMatrix< double, 2, 2 > CDPL::Math::Matrix2D
 Bounded 2x2 matrix holding floating point values of type double. More...
 
typedef CMatrix< double, 3, 3 > CDPL::Math::Matrix3D
 Bounded 3x3 matrix holding floating point values of type double. More...
 
typedef CMatrix< double, 4, 4 > CDPL::Math::Matrix4D
 Bounded 4x4 matrix holding floating point values of type double. More...
 
typedef CMatrix< long, 2, 2 > CDPL::Math::Matrix2L
 Bounded 2x2 matrix holding signed integers of type long. More...
 
typedef CMatrix< long, 3, 3 > CDPL::Math::Matrix3L
 Bounded 3x3 matrix holding signed integers of type long. More...
 
typedef CMatrix< long, 4, 4 > CDPL::Math::Matrix4L
 Bounded 4x4 matrix holding signed integers of type long. More...
 
typedef CMatrix< unsigned long, 2, 2 > CDPL::Math::Matrix2UL
 Bounded 2x2 matrix holding unsigned integers of type unsigned long. More...
 
typedef CMatrix< unsigned long, 3, 3 > CDPL::Math::Matrix3UL
 Bounded 3x3 matrix holding unsigned integers of type unsigned long. More...
 
typedef CMatrix< unsigned long, 4, 4 > CDPL::Math::Matrix4UL
 Bounded 4x4 matrix holding unsigned integers of type unsigned long. More...
 
typedef SparseMatrix< float > CDPL::Math::SparseFMatrix
 Unbounded sparse matrix holding floating point values of type float.. More...
 
typedef SparseMatrix< double > CDPL::Math::SparseDMatrix
 Unbounded sparse matrix holding floating point values of type double.. More...
 
typedef SparseMatrix< long > CDPL::Math::SparseLMatrix
 Unbounded sparse matrix holding signed integers of type long. More...
 
typedef SparseMatrix< unsigned long > CDPL::Math::SparseULMatrix
 Unbounded sparse matrix holding unsigned integers of type unsigned long. More...
 

Functions

template<typename E >
E::ValueType CDPL::Math::det (const MatrixExpression< E > &e)
 Returns the determinant of the matrix expression e. More...
 
template<typename C >
C::ValueType CDPL::Math::det (const MatrixContainer< C > &c)
 Returns the determinant of the matrix container c (specialization avoiding an extra temporary copy when possible). More...
 
template<typename E , typename C >
bool CDPL::Math::invert (const MatrixExpression< E > &e, MatrixContainer< C > &c)
 Computes the inverse of the matrix expression e and stores it in c. More...
 
template<typename C >
bool CDPL::Math::invert (MatrixContainer< C > &c)
 Computes the inverse of the matrix container c in place. More...
 

Detailed Description

Definition of matrix data types.