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

Definition of vector data types. More...

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

Go to the source code of this file.

Classes

class  CDPL::Math::VectorReference< V >
 Lightweight vector expression that proxies a reference to an underlying vector container. More...
 
class  CDPL::Math::InitListVector< T >
 Lightweight vector container that wraps a std::initializer_list for construction-style initialization. More...
 
class  CDPL::Math::Vector< T, A >
 Dynamically-sized dense vector with configurable underlying storage. More...
 
class  CDPL::Math::SparseVector< T, A >
 Sparse vector that stores only non-default entries in an associative key-to-value container. More...
 
class  CDPL::Math::BoundedVector< T, N >
 Variable-size vector with a fixed upper capacity N stored in a stack-allocated array. More...
 
class  CDPL::Math::CVector< T, N >
 Fixed-size vector of dimension N backed by a C-array (no dynamic allocation). More...
 
class  CDPL::Math::ZeroVector< T >
 Constant vector expression whose elements are all zero. More...
 
class  CDPL::Math::UnitVector< T >
 Constant vector expression \( e_i \) that contains 1 at a single specified index and 0 elsewhere. More...
 
class  CDPL::Math::ScalarVector< T >
 Constant vector expression in which every element equals the same scalar value. More...
 
struct  CDPL::Math::VectorTemporaryTraits< const VectorReference< V > >
 Math::VectorTemporaryTraits specialization inheriting the temporary type of the underlying vector for a const Math::VectorReference view. More...
 
struct  CDPL::Math::VectorTemporaryTraits< VectorReference< V > >
 Math::VectorTemporaryTraits specialization inheriting the temporary type of the underlying vector for a Math::VectorReference view. More...
 

Namespaces

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

Typedefs

typedef ScalarVector< float > CDPL::Math::FScalarVector
 Memory-efficient immutable vector where all elements have the same value of type float. More...
 
typedef ScalarVector< double > CDPL::Math::DScalarVector
 Memory-efficient immutable vector where all elements have the same value of type double. More...
 
typedef ScalarVector< long > CDPL::Math::LScalarVector
 Memory-efficient immutable vector where all elements have the same value of type long. More...
 
typedef ScalarVector< unsigned long > CDPL::Math::ULScalarVector
 Memory-efficient immutable vector where all elements have the same value of type unsigned long. More...
 
typedef ZeroVector< float > CDPL::Math::FZeroVector
 Memory-efficient immutable vector where all elements have the value zero of type float. More...
 
typedef ZeroVector< double > CDPL::Math::DZeroVector
 Memory-efficient immutable vector where all elements have the value zero of type double. More...
 
typedef ZeroVector< long > CDPL::Math::LZeroVector
 Memory-efficient immutable vector where all elements have the value zero of type long. More...
 
typedef ZeroVector< unsigned long > CDPL::Math::ULZeroVector
 Memory-efficient immutable vector where all elements have the value zero of type unsigned long. More...
 
typedef UnitVector< float > CDPL::Math::FUnitVector
 Memory-efficient immutable unit vector with element values of type float. More...
 
typedef UnitVector< double > CDPL::Math::DUnitVector
 Memory-efficient immutable unit vector with element values of type double. More...
 
typedef UnitVector< long > CDPL::Math::LUnitVector
 Memory-efficient immutable unit vector with element values of type long. More...
 
typedef UnitVector< unsigned long > CDPL::Math::ULUnitVector
 Memory-efficient immutable unit vector with element values of type unsigned long. More...
 
typedef CVector< float, 2 > CDPL::Math::Vector2F
 Bounded 2 element vector holding floating point values of type float. More...
 
typedef CVector< float, 3 > CDPL::Math::Vector3F
 Bounded 3 element vector holding floating point values of type float. More...
 
typedef CVector< float, 4 > CDPL::Math::Vector4F
 Bounded 4 element vector holding floating point values of type float. More...
 
typedef CVector< double, 2 > CDPL::Math::Vector2D
 Bounded 2 element vector holding floating point values of type double. More...
 
typedef CVector< double, 3 > CDPL::Math::Vector3D
 Bounded 3 element vector holding floating point values of type double. More...
 
typedef CVector< double, 4 > CDPL::Math::Vector4D
 Bounded 4 element vector holding floating point values of type double. More...
 
typedef CVector< double, 7 > CDPL::Math::Vector7D
 Bounded 7 element vector holding floating point values of type double. More...
 
typedef CVector< long, 2 > CDPL::Math::Vector2L
 Bounded 2 element vector holding signed integers of type long. More...
 
typedef CVector< long, 3 > CDPL::Math::Vector3L
 Bounded 3 element vector holding signed integers of type long. More...
 
typedef CVector< long, 4 > CDPL::Math::Vector4L
 Bounded 4 element vector holding signed integers of type long. More...
 
typedef CVector< unsigned long, 2 > CDPL::Math::Vector2UL
 Bounded 2 element vector holding unsigned integers of type unsigned long. More...
 
typedef CVector< unsigned long, 3 > CDPL::Math::Vector3UL
 Bounded 3 element vector holding unsigned integers of type unsigned long. More...
 
typedef CVector< unsigned long, 4 > CDPL::Math::Vector4UL
 Bounded 4 element vector holding unsigned integers of type unsigned long. More...
 
typedef Vector< float > CDPL::Math::FVector
 Unbounded dense vector holding floating point values of type float. More...
 
typedef Vector< double > CDPL::Math::DVector
 Unbounded dense vector holding floating point values of type double. More...
 
typedef Vector< long > CDPL::Math::LVector
 Unbounded dense vector holding signed integers of type long. More...
 
typedef Vector< unsigned long > CDPL::Math::ULVector
 Unbounded dense vector holding unsigned integers of type unsigned long. More...
 
typedef SparseVector< float > CDPL::Math::SparseFVector
 Unbounded sparse vector holding floating point values of type float. More...
 
typedef SparseVector< double > CDPL::Math::SparseDVector
 Unbounded sparse vector holding floating point values of type double. More...
 
typedef SparseVector< long > CDPL::Math::SparseLVector
 Unbounded sparse vector holding signed integers of type long. More...
 
typedef SparseVector< unsigned long > CDPL::Math::SparseULVector
 Unbounded sparse vector holding unsigned integers of type unsigned long. More...
 

Functions

template<typename T1 , typename T2 >
CVector< typename CommonType< T1, T2 >::Type, 2 > CDPL::Math::vec (const T1 &t1, const T2 &t2)
 Constructs a Math::CVector of size 2 from the components t1 and t2. More...
 
template<typename T1 , typename T2 , typename T3 >
CVector< typename CommonType< typename CommonType< T1, T2 >::Type, T3 >::Type, 3 > CDPL::Math::vec (const T1 &t1, const T2 &t2, const T3 &t3)
 Constructs a Math::CVector of size 3 from the components t1, t2 and t3. More...
 
template<typename T1 , typename T2 , typename T3 , typename T4 >
CVector< typename CommonType< typename CommonType< typename CommonType< T1, T2 >::Type, T3 >::Type, T4 >::Type, 4 > CDPL::Math::vec (const T1 &t1, const T2 &t2, const T3 &t3, const T4 &t4)
 Constructs a Math::CVector of size 4 from the components t1, t2, t3 and t4. More...
 

Detailed Description

Definition of vector data types.