27 #ifndef CDPL_MATH_VECTOR_HPP
28 #define CDPL_MATH_VECTOR_HPP
35 #include <unordered_map>
36 #include <type_traits>
37 #include <initializer_list>
80 typedef typename std::conditional<std::is_const<V>::value,
81 typename V::ConstReference,
162 return data.getSize();
171 return data.getMaxSize();
180 return data.isEmpty();
208 data.operator=(
r.data);
218 template <
typename E>
231 template <
typename E>
244 template <
typename E>
257 template <
typename T>
270 template <
typename T>
283 template <
typename E>
296 template <
typename E>
309 template <
typename E>
339 template <
typename T,
typename A>
346 template <
typename T>
361 typedef typename InitializerListType::value_type
ValueType;
371 typedef typename InitializerListType::reference
Reference;
376 typedef typename InitializerListType::size_type
SizeType;
436 return *(list.begin() + i);
448 return *(list.begin() + i);
466 return (list.size() == 0);
478 template <
typename T,
typename A = std::vector<T> >
561 data(storageSize(n)) {}
569 data(storageSize(n), v) {}
590 data(std::move(v.data)) {}
604 template <
typename E>
606 data(storageSize(e().
getSize()))
608 vectorAssignVector<ScalarAssignment>(*
this, e);
681 return data.max_size();
720 data = std::move(v.data);
740 template <
typename C>
752 template <
typename E>
766 template <
typename C>
788 template <
typename E>
802 template <
typename C>
824 template <
typename E>
838 template <
typename T1>
841 vectorAssignScalar<ScalarMultiplicationAssignment>(*
this, t);
851 template <
typename T1>
854 vectorAssignScalar<ScalarDivisionAssignment>(*
this, t);
864 template <
typename E>
868 vectorAssignVector<ScalarAssignment>(*
this, e);
889 template <
typename E>
892 vectorAssignVector<ScalarAdditionAssignment>(*
this, e);
913 template <
typename E>
916 vectorAssignVector<ScalarSubtractionAssignment>(*
this, e);
938 std::swap(data, v.data);
957 std::fill(data.begin(), data.end(), v);
967 data.resize(storageSize(n), v);
984 template <
typename T,
typename A = std::unordered_map<std::
size_t, T> >
1072 data(), size(storageSize(n)) {}
1079 data(v.data), size(v.size) {}
1105 template <
typename E>
1156 typename ArrayType::const_iterator it = data.find(i);
1158 if (it == data.end())
1197 return std::min(
SizeType(data.max_size()), std::numeric_limits<SizeType>::max());
1257 template <
typename C>
1269 template <
typename E>
1283 template <
typename C>
1305 template <
typename E>
1319 template <
typename C>
1341 template <
typename E>
1355 template <
typename T1>
1358 vectorAssignScalar<ScalarMultiplicationAssignment>(*
this, t);
1368 template <
typename T1>
1371 vectorAssignScalar<ScalarDivisionAssignment>(*
this, t);
1381 template <
typename E>
1385 vectorAssignVector<ScalarAssignment>(*
this, e);
1407 template <
typename E>
1410 vectorAssignVector<ScalarAdditionAssignment>(*
this, e);
1431 template <
typename E>
1434 vectorAssignVector<ScalarSubtractionAssignment>(*
this, e);
1456 std::swap(data, v.data);
1457 std::swap(size, v.size);
1487 for (
typename ArrayType::iterator it = data.begin(); it != data.end();) {
1489 it = data.erase(it);
1508 template <
typename T,
typename A>
1516 template <
typename T, std::
size_t N>
1630 std::copy(v.data, v.data + v.size, data);
1649 template <
typename E>
1755 std::copy(v.data, v.data + v.size, data);
1779 template <
typename C>
1791 template <
typename E>
1804 template <
typename C>
1826 template <
typename E>
1839 template <
typename C>
1861 template <
typename E>
1874 template <
typename T1>
1877 vectorAssignScalar<ScalarMultiplicationAssignment>(*
this, t);
1887 template <
typename T1>
1890 vectorAssignScalar<ScalarDivisionAssignment>(*
this, t);
1901 template <
typename E>
1905 vectorAssignVector<ScalarAssignment>(*
this, e);
1918 std::copy(l.begin(), l.begin() + size, data);
1928 template <
typename E>
1931 vectorAssignVector<ScalarAdditionAssignment>(*
this, e);
1952 template <
typename E>
1955 vectorAssignVector<ScalarSubtractionAssignment>(*
this, e);
1977 std::swap_ranges(data, data + std::max(size, v.size), v.data);
1978 std::swap(size, v.size);
1998 std::fill(data, data + size, v);
2008 size = storageSize(n);
2022 std::fill(data + size, data + n, v);
2037 template <
typename T, std::
size_t N>
2045 template <
typename T, std::
size_t N>
2146 std::copy(v.data, v.data +
N, data);
2163 template <
typename E>
2166 vectorAssignVector<ScalarAssignment>(*
this, e);
2268 std::copy(v.data, v.data +
N, data);
2289 template <
typename C>
2301 template <
typename E>
2314 template <
typename C>
2336 template <
typename E>
2349 template <
typename C>
2371 template <
typename E>
2384 template <
typename T1>
2387 vectorAssignScalar<ScalarMultiplicationAssignment>(*
this, t);
2397 template <
typename T1>
2400 vectorAssignScalar<ScalarDivisionAssignment>(*
this, t);
2410 template <
typename E>
2413 vectorAssignVector<ScalarAssignment>(*
this, e);
2426 std::copy(l.begin(), l.begin() + n, data);
2440 template <
typename E>
2443 vectorAssignVector<ScalarAdditionAssignment>(*
this, e);
2464 template <
typename E>
2467 vectorAssignVector<ScalarSubtractionAssignment>(*
this, e);
2489 std::swap_ranges(data, data +
N, v.data);
2508 std::fill(data, data +
N, v);
2515 template <
typename T, std::
size_t N>
2522 template <
typename T>
2636 return std::numeric_limits<SizeType>::max();
2666 std::swap(size, v.size);
2684 template <
typename T>
2691 template <
typename T>
2742 size(0), index(0) {}
2750 size(n), index(i) {}
2757 size(v.size), index(v.index) {}
2780 return (i == index ? one : zero);
2816 return std::numeric_limits<SizeType>::max();
2850 std::swap(size, v.size);
2851 std::swap(index, v.index);
2872 template <
typename T>
2874 template <
typename T>
2881 template <
typename T>
2940 size(n), value(v) {}
2947 size(v.size), value(v.value) {}
2996 return std::numeric_limits<SizeType>::max();
3030 std::swap(size, v.size);
3031 std::swap(value, v.value);
3054 template <
typename V>
3062 template <
typename V>
3074 template <
typename T1,
typename T2>
3076 vec(
const T1& t1,
const T2& t2)
3096 template <
typename T1,
typename T2,
typename T3>
3097 CVector<typename CommonType<typename CommonType<T1, T2>::Type, T3>::Type, 3>
3098 vec(
const T1& t1,
const T2& t2,
const T3& t3)
3121 template <
typename T1,
typename T2,
typename T3,
typename T4>
3122 CVector<typename CommonType<typename CommonType<typename CommonType<T1, T2>::Type, T3>::Type, T4>::Type, 4>
3123 vec(
const T1& t1,
const T2& t2,
const T3& t3,
const T4& t4)
Definition of exception classes.
Definition of various preprocessor macros for error checking.
#define CDPL_MATH_CHECK_MAX_SIZE(size, max_size, e)
Throws the exception e if size exceeds max_size, otherwise returns std::min(size, max_size).
Definition: Check.hpp:96
#define CDPL_MATH_CHECK(expr, msg, e)
Throws the exception e with message msg when the boolean expression expr evaluates to false.
Definition: Check.hpp:47
Definition of a proxy type for direct assignment of vector and matrix expressions.
Definition of various functors.
Definition of an element proxy for sparse data types.
Definition of type traits.
Implementation of vector assignment routines.
Definition of various vector expression types and operations.
Thrown to indicate that an index is out of range.
Definition: Base/Exceptions.hpp:152
Thrown to indicate that the size of a (multidimensional) array is not correct.
Definition: Base/Exceptions.hpp:133
Variable-size vector with a fixed upper capacity N stored in a stack-allocated array.
Definition: Vector.hpp:1518
static const SizeType MaxSize
The compile-time maximum capacity N.
Definition: Vector.hpp:1592
std::shared_ptr< SelfType > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated BoundedVector instances.
Definition: Vector.hpp:1581
BoundedVector & operator=(const BoundedVector &v)
Copy-assigns the elements of v to this bounded vector.
Definition: Vector.hpp:1752
BoundedVector & operator+=(const VectorContainer< C > &c)
Adds the contents of the vector container c element-wise to this bounded vector (no alias check neede...
Definition: Vector.hpp:1805
ConstReference operator[](SizeType i) const
Returns a const reference to the element at index i.
Definition: Vector.hpp:1673
T & Reference
Mutable element reference type.
Definition: Vector.hpp:1531
void resize(SizeType n, const ValueType &v)
Resizes the vector to n elements; newly added elements are set to v.
Definition: Vector.hpp:2017
void swap(BoundedVector &v)
Swaps the contents of this bounded vector with those of v.
Definition: Vector.hpp:1974
BoundedVector & operator+=(const VectorExpression< E > &e)
Adds the vector expression e element-wise to this bounded vector (via a temporary to handle aliasing)...
Definition: Vector.hpp:1827
void clear(const ValueType &v=ValueType())
Sets every element of the vector to the value v (size is unchanged).
Definition: Vector.hpp:1996
Pointer getData()
Returns a mutable pointer to the contiguous element array.
Definition: Vector.hpp:1733
BoundedVector(const VectorExpression< E > &e)
Constructs a bounded vector from the vector expression e.
Definition: Vector.hpp:1650
BoundedVector & assign(InitializerListType l)
Resizes this vector to match l and copies the elements of l in.
Definition: Vector.hpp:1915
Reference operator()(SizeType i)
Returns a mutable reference to the element at index i.
Definition: Vector.hpp:1684
std::enable_if< IsScalar< T1 >::value, BoundedVector >::type & operator*=(const T1 &t)
Multiplies every element by the scalar t.
Definition: Vector.hpp:1875
void resize(SizeType n)
Resizes the vector to n elements (new elements are left value-uninitialized).
Definition: Vector.hpp:2006
BoundedVector & assign(const VectorExpression< E > &e)
Resizes this vector to match e and assigns the elements of e without intermediate temporary.
Definition: Vector.hpp:1902
std::initializer_list< T > InitializerListType
The initializer list type accepted by constructors and assignment.
Definition: Vector.hpp:1586
BoundedVector & minusAssign(const VectorExpression< E > &e)
Subtracts the elements of the vector expression e from this vector without intermediate temporary.
Definition: Vector.hpp:1953
ConstReference operator()(SizeType i) const
Returns a const reference to the element at index i.
Definition: Vector.hpp:1696
ConstPointer getData() const
Returns a const pointer to the contiguous element array.
Definition: Vector.hpp:1742
SizeType getMaxSize() const
Returns the compile-time maximum capacity N.
Definition: Vector.hpp:1724
const VectorReference< const SelfType > ConstClosureType
Constant closure type used when this vector appears inside another expression.
Definition: Vector.hpp:1571
BoundedVector(InitializerListType l)
Constructs a bounded vector with the contents of the initializer list l.
Definition: Vector.hpp:1638
BoundedVector & operator=(const VectorContainer< C > &c)
Assigns the contents of the vector container c to this bounded vector (no alias check needed).
Definition: Vector.hpp:1780
BoundedVector & plusAssign(InitializerListType l)
Adds the contents of the initializer list l element-wise to this vector without intermediate temporar...
Definition: Vector.hpp:1940
const T * ConstPointer
Constant pointer type for raw access to the element array.
Definition: Vector.hpp:1561
Reference operator[](SizeType i)
Returns a mutable reference to the element at index i.
Definition: Vector.hpp:1662
std::ptrdiff_t DifferenceType
The signed difference type.
Definition: Vector.hpp:1546
BoundedVector()
Constructs an empty bounded vector (size zero, capacity N).
Definition: Vector.hpp:1597
BoundedVector & plusAssign(const VectorExpression< E > &e)
Adds the elements of the vector expression e to this vector without intermediate temporary.
Definition: Vector.hpp:1929
SizeType getSize() const
Returns the current element count.
Definition: Vector.hpp:1715
BoundedVector(SizeType n)
Constructs a bounded vector of size n with value-initialized elements.
Definition: Vector.hpp:1605
BoundedVector & minusAssign(InitializerListType l)
Subtracts the contents of the initializer list l element-wise from this vector without intermediate t...
Definition: Vector.hpp:1964
BoundedVector & operator-=(InitializerListType l)
Subtracts the contents of the initializer list l element-wise from this bounded vector.
Definition: Vector.hpp:1850
T ValueType
The scalar value type.
Definition: Vector.hpp:1526
bool isEmpty() const
Tells whether the vector is empty.
Definition: Vector.hpp:1706
ValueType ArrayType[N]
The fixed-capacity C-array type used for in-memory storage.
Definition: Vector.hpp:1551
BoundedVector & operator=(InitializerListType l)
Assigns the contents of the initializer list l to this bounded vector.
Definition: Vector.hpp:1768
T * Pointer
Pointer type for raw access to the element array.
Definition: Vector.hpp:1556
std::size_t SizeType
The unsigned size type.
Definition: Vector.hpp:1541
BoundedVector & operator-=(const VectorExpression< E > &e)
Subtracts the vector expression e element-wise from this bounded vector (via a temporary to handle al...
Definition: Vector.hpp:1862
BoundedVector & operator-=(const VectorContainer< C > &c)
Subtracts the contents of the vector container c element-wise from this bounded vector (no alias chec...
Definition: Vector.hpp:1840
BoundedVector(SizeType n, const ValueType &v)
Constructs a bounded vector of size n with every element initialized to v.
Definition: Vector.hpp:1617
friend void swap(BoundedVector &v1, BoundedVector &v2)
ADL-enabled free-function form of swap().
Definition: Vector.hpp:1987
VectorReference< SelfType > ClosureType
Closure type used when this vector appears inside another expression.
Definition: Vector.hpp:1566
const T & ConstReference
Constant element reference type.
Definition: Vector.hpp:1536
BoundedVector< T, N+1 > VectorTemporaryType
Concrete temporary vector type used by expression template machinery (one element larger than the bou...
Definition: Vector.hpp:1576
BoundedVector & operator=(const VectorExpression< E > &e)
Assigns the vector expression e to this bounded vector (via a temporary to handle aliasing).
Definition: Vector.hpp:1792
BoundedVector(const BoundedVector &v)
Constructs a copy of the bounded vector v.
Definition: Vector.hpp:1627
std::enable_if< IsScalar< T1 >::value, BoundedVector >::type & operator/=(const T1 &t)
Divides every element by the scalar t.
Definition: Vector.hpp:1888
BoundedVector & operator+=(InitializerListType l)
Adds the contents of the initializer list l element-wise to this bounded vector.
Definition: Vector.hpp:1815
Fixed-size vector of dimension N backed by a C-array (no dynamic allocation).
Definition: Vector.hpp:2047
std::enable_if< IsScalar< T1 >::value, CVector >::type & operator/=(const T1 &t)
Divides every element by the scalar t.
Definition: Vector.hpp:2398
ConstReference operator()(SizeType i) const
Returns a const reference to the element at index i.
Definition: Vector.hpp:2209
std::size_t SizeType
The unsigned size type.
Definition: Vector.hpp:2070
CVector & operator=(const VectorExpression< E > &e)
Assigns the vector expression e to this fixed-size vector (via a temporary to handle aliasing).
Definition: Vector.hpp:2302
Pointer getData()
Returns a mutable pointer to the contiguous element array.
Definition: Vector.hpp:2246
static const SizeType Size
The compile-time fixed size N.
Definition: Vector.hpp:2121
T ValueType
The scalar value type.
Definition: Vector.hpp:2055
void clear(const ValueType &v=ValueType())
Sets every element of the vector to the value v.
Definition: Vector.hpp:2506
SizeType getMaxSize() const
Returns the fixed element count N (capacity equals size for Math::CVector).
Definition: Vector.hpp:2237
CVector & operator=(InitializerListType l)
Assigns the contents of the initializer list l to this fixed-size vector.
Definition: Vector.hpp:2278
const T & ConstReference
Constant element reference type.
Definition: Vector.hpp:2065
ConstPointer getData() const
Returns a const pointer to the contiguous element array.
Definition: Vector.hpp:2255
ValueType ArrayType[N]
The fixed-size C-array type used for in-memory storage of N elements.
Definition: Vector.hpp:2080
ConstReference operator[](SizeType i) const
Returns a const reference to the element at index i.
Definition: Vector.hpp:2186
bool isEmpty() const
Tells whether the vector is empty (N is zero).
Definition: Vector.hpp:2219
Reference operator()(SizeType i)
Returns a mutable reference to the element at index i.
Definition: Vector.hpp:2197
CVector & plusAssign(const VectorExpression< E > &e)
Adds the elements of the vector expression e to this vector without intermediate temporary.
Definition: Vector.hpp:2441
CVector & operator-=(InitializerListType l)
Subtracts the contents of the initializer list l element-wise from this fixed-size vector.
Definition: Vector.hpp:2360
CVector & plusAssign(InitializerListType l)
Adds the contents of the initializer list l element-wise to this vector without intermediate temporar...
Definition: Vector.hpp:2452
CVector & operator+=(const VectorExpression< E > &e)
Adds the vector expression e element-wise to this fixed-size vector (via a temporary to handle aliasi...
Definition: Vector.hpp:2337
SizeType getSize() const
Returns the fixed element count N.
Definition: Vector.hpp:2228
CVector & operator=(const VectorContainer< C > &c)
Assigns the contents of the vector container c to this fixed-size vector (no alias check needed).
Definition: Vector.hpp:2290
T * Pointer
Pointer type for raw access to the element array.
Definition: Vector.hpp:2085
VectorReference< SelfType > ClosureType
Closure type used when this vector appears inside another expression.
Definition: Vector.hpp:2095
CVector & operator+=(InitializerListType l)
Adds the contents of the initializer list l element-wise to this fixed-size vector.
Definition: Vector.hpp:2325
CVector(InitializerListType l)
Constructs a fixed-size vector with the contents of the initializer list l.
Definition: Vector.hpp:2153
void swap(CVector &v)
Swaps the contents of this fixed-size vector with those of v.
Definition: Vector.hpp:2486
BoundedVector< T, N+1 > VectorTemporaryType
Concrete temporary vector type used by expression template machinery (a Math::BoundedVector of N + 1 ...
Definition: Vector.hpp:2105
CVector & assign(const VectorExpression< E > &e)
Assigns the elements of the vector expression e to this fixed-size vector without intermediate tempor...
Definition: Vector.hpp:2411
Reference operator[](SizeType i)
Returns a mutable reference to the element at index i.
Definition: Vector.hpp:2175
const T * ConstPointer
Constant pointer type for raw access to the element array.
Definition: Vector.hpp:2090
std::shared_ptr< SelfType > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated CVector instances.
Definition: Vector.hpp:2110
CVector & operator-=(const VectorExpression< E > &e)
Subtracts the vector expression e element-wise from this fixed-size vector (via a temporary to handle...
Definition: Vector.hpp:2372
CVector & minusAssign(InitializerListType l)
Subtracts the contents of the initializer list l element-wise from this vector without intermediate t...
Definition: Vector.hpp:2476
CVector & operator+=(const VectorContainer< C > &c)
Adds the contents of the vector container c element-wise to this fixed-size vector (no alias check ne...
Definition: Vector.hpp:2315
T & Reference
Mutable element reference type.
Definition: Vector.hpp:2060
const VectorReference< const SelfType > ConstClosureType
Constant closure type used when this vector appears inside another expression.
Definition: Vector.hpp:2100
CVector & minusAssign(const VectorExpression< E > &e)
Subtracts the elements of the vector expression e from this vector without intermediate temporary.
Definition: Vector.hpp:2465
CVector & operator=(const CVector &v)
Copy-assigns the elements of v to this fixed-size vector.
Definition: Vector.hpp:2265
CVector(const ValueType &v)
Constructs an N-element vector with every element initialized to v.
Definition: Vector.hpp:2135
std::initializer_list< T > InitializerListType
The initializer list type accepted by constructors and assignment.
Definition: Vector.hpp:2115
std::ptrdiff_t DifferenceType
The signed difference type.
Definition: Vector.hpp:2075
CVector & assign(InitializerListType l)
Assigns the contents of the initializer list l to this fixed-size vector (truncated to N if longer; z...
Definition: Vector.hpp:2423
CVector()
Constructs a zero-initialized N element vector.
Definition: Vector.hpp:2126
CVector(const VectorExpression< E > &e)
Constructs a fixed-size vector from the vector expression e.
Definition: Vector.hpp:2164
CVector & operator-=(const VectorContainer< C > &c)
Subtracts the contents of the vector container c element-wise from this fixed-size vector (no alias c...
Definition: Vector.hpp:2350
CVector(const CVector &v)
Constructs a copy of the fixed-size vector v.
Definition: Vector.hpp:2144
friend void swap(CVector &v1, CVector &v2)
ADL-enabled free-function form of swap().
Definition: Vector.hpp:2497
std::enable_if< IsScalar< T1 >::value, CVector >::type & operator*=(const T1 &t)
Multiplies every element by the scalar t.
Definition: Vector.hpp:2385
Lightweight vector container that wraps a std::initializer_list for construction-style initialization...
Definition: Vector.hpp:348
ConstReference operator()(SizeType i) const
Returns a const reference to the element at index i.
Definition: Vector.hpp:445
InitializerListType::const_reference ConstReference
Constant element reference type.
Definition: Vector.hpp:366
const SelfType ConstClosureType
Constant closure type used when this vector appears inside another expression.
Definition: Vector.hpp:391
Reference operator[](SizeType i)
Returns a reference to the element at index i.
Definition: Vector.hpp:411
Reference operator()(SizeType i)
Returns a reference to the element at index i.
Definition: Vector.hpp:433
std::initializer_list< T > InitializerListType
The wrapped std::initializer_list type.
Definition: Vector.hpp:356
SizeType getSize() const
Returns the size of the wrapped initializer list.
Definition: Vector.hpp:455
InitListVector(InitializerListType l)
Constructs the vector by wrapping the initializer list l (no copy).
Definition: Vector.hpp:402
bool isEmpty() const
Tells whether the wrapped initializer list is empty.
Definition: Vector.hpp:464
InitializerListType::value_type ValueType
The scalar value type.
Definition: Vector.hpp:361
InitializerListType::reference Reference
Mutable element reference type (degrades to ConstReference for the immutable initializer list).
Definition: Vector.hpp:371
std::ptrdiff_t DifferenceType
The signed difference type.
Definition: Vector.hpp:381
InitializerListType::size_type SizeType
The unsigned size type.
Definition: Vector.hpp:376
ConstReference operator[](SizeType i) const
Returns a const reference to the element at index i.
Definition: Vector.hpp:422
SelfType ClosureType
Closure type used when this vector appears inside another expression.
Definition: Vector.hpp:386
Vector< T, std::vector< T > > VectorTemporaryType
Concrete temporary vector type used by expression template machinery.
Definition: Vector.hpp:396
InitListVector SelfType
Definition: Vector.hpp:351
Constant vector expression in which every element equals the same scalar value.
Definition: Vector.hpp:2883
std::size_t SizeType
The unsigned size type.
Definition: Vector.hpp:2906
ConstReference operator()(SizeType i) const
Returns a const reference to the common element value.
Definition: Vector.hpp:2966
SizeType getMaxSize() const
Returns the maximum representable element count.
Definition: Vector.hpp:2994
const T & ConstReference
Constant element reference type.
Definition: Vector.hpp:2901
ConstReference operator[](SizeType i) const
Returns a const reference to the common element value.
Definition: Vector.hpp:2955
const T & Reference
Reference type (always a const reference — elements are immutable).
Definition: Vector.hpp:2896
VectorReference< SelfType > ClosureType
Closure type used when this vector appears inside another expression.
Definition: Vector.hpp:2916
ScalarVector()
Constructs an empty scalar vector.
Definition: Vector.hpp:2931
friend void swap(ScalarVector &v1, ScalarVector &v2)
ADL-enabled free-function form of swap().
Definition: Vector.hpp:3040
ScalarVector & operator=(const ScalarVector &v)
Copy-assigns the size and common value from v.
Definition: Vector.hpp:3004
const VectorReference< const SelfType > ConstClosureType
Constant closure type used when this vector appears inside another expression.
Definition: Vector.hpp:2921
Vector< T > VectorTemporaryType
Concrete temporary vector type used by expression template machinery.
Definition: Vector.hpp:2926
std::ptrdiff_t DifferenceType
The signed difference type.
Definition: Vector.hpp:2911
T ValueType
The scalar value type.
Definition: Vector.hpp:2891
SizeType getSize() const
Returns the logical element count.
Definition: Vector.hpp:2985
void resize(SizeType n)
Resizes the logical element count to n.
Definition: Vector.hpp:3018
void swap(ScalarVector &v)
Swaps the size and common value with v.
Definition: Vector.hpp:3027
bool isEmpty() const
Tells whether the vector has zero logical size.
Definition: Vector.hpp:2976
ScalarVector(SizeType n, const ValueType &v=ValueType())
Constructs a scalar vector of size n in which every element equals v.
Definition: Vector.hpp:2939
ScalarVector(const ScalarVector &v)
Constructs a copy of the scalar vector v.
Definition: Vector.hpp:2946
Proxy that exposes a single (key, value) entry of a sparse container as a writable reference.
Definition: SparseContainerElement.hpp:52
Sparse vector that stores only non-default entries in an associative key-to-value container.
Definition: Vector.hpp:986
SparseVector & operator=(InitializerListType l)
Assigns the contents of the initializer list l to this sparse vector.
Definition: Vector.hpp:1246
SparseVector & operator=(SparseVector &&v)
Move-assigns the contents of v to this sparse vector.
Definition: Vector.hpp:1235
SparseVector & operator-=(const VectorExpression< E > &e)
Subtracts the vector expression e element-wise from this sparse vector (via a temporary to handle ali...
Definition: Vector.hpp:1342
SparseVector & operator+=(InitializerListType l)
Adds the contents of the initializer list l element-wise to this sparse vector.
Definition: Vector.hpp:1294
SparseVector & operator=(const VectorExpression< E > &e)
Assigns the vector expression e to this sparse vector (via a temporary to handle aliasing).
Definition: Vector.hpp:1270
ConstReference operator()(SizeType i) const
Returns a const reference to the element at index i.
Definition: Vector.hpp:1152
const VectorReference< const SelfType > ConstClosureType
Constant closure type used when this vector appears inside another expression.
Definition: Vector.hpp:1044
SparseVector(const VectorExpression< E > &e)
Constructs a sparse vector from the vector expression e.
Definition: Vector.hpp:1106
SizeType getMaxSize() const
Returns the maximum number of stored entries the underlying associative container can hold.
Definition: Vector.hpp:1195
std::ptrdiff_t DifferenceType
The signed difference type.
Definition: Vector.hpp:1004
SparseVector & operator+=(const VectorContainer< C > &c)
Adds the contents of the vector container c element-wise to this sparse vector (no alias check needed...
Definition: Vector.hpp:1284
void resize(SizeType n)
Resizes the logical element count to n, dropping any stored entries at indices beyond n.
Definition: Vector.hpp:1483
SparseVector(SparseVector &&v)
Move-constructs from v (v is left in a valid empty state).
Definition: Vector.hpp:1085
SizeType getSize() const
Returns the logical element count.
Definition: Vector.hpp:1186
A::key_type KeyType
The key type used by the underlying associative container.
Definition: Vector.hpp:1009
std::initializer_list< T > InitializerListType
The initializer list type accepted by constructors and assignment.
Definition: Vector.hpp:1059
SparseVector(const SparseVector &v)
Constructs a copy of the sparse vector v.
Definition: Vector.hpp:1078
void swap(SparseVector &v)
Swaps the contents of this sparse vector with those of v.
Definition: Vector.hpp:1453
SizeType getNumElements() const
Returns the number of explicitly stored (non-default) entries.
Definition: Vector.hpp:1168
T * Pointer
Pointer type for raw access to stored entries.
Definition: Vector.hpp:1029
SparseVector(SizeType n)
Constructs a sparse vector of size n with no stored entries (every position reads as the default valu...
Definition: Vector.hpp:1071
SparseVector & operator-=(const VectorContainer< C > &c)
Subtracts the contents of the vector container c element-wise from this sparse vector (no alias check...
Definition: Vector.hpp:1320
SparseVector(InitializerListType l)
Constructs a sparse vector with the contents of the initializer list l.
Definition: Vector.hpp:1095
SparseVector()
Constructs an empty sparse vector (size zero, no stored entries).
Definition: Vector.hpp:1064
std::shared_ptr< SelfType > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated SparseVector instances.
Definition: Vector.hpp:1054
A ArrayType
The underlying associative container type.
Definition: Vector.hpp:1024
SparseVector & operator=(const VectorContainer< C > &c)
Assigns the contents of the vector container c to this sparse vector (no alias check needed).
Definition: Vector.hpp:1258
SparseVector & minusAssign(InitializerListType l)
Subtracts the contents of the initializer list l element-wise from this vector without intermediate t...
Definition: Vector.hpp:1443
SparseContainerElement< SelfType, KeyType > Reference
Mutable element reference type (a proxy object that inserts on assignment to a previously-absent key)...
Definition: Vector.hpp:1019
ArrayType & getData()
Returns a mutable reference to the underlying associative container of stored entries.
Definition: Vector.hpp:1204
SparseVector & operator-=(InitializerListType l)
Subtracts the contents of the initializer list l element-wise from this sparse vector.
Definition: Vector.hpp:1330
SparseVector & assign(const VectorExpression< E > &e)
Resizes this vector to match e and assigns the elements of e without intermediate temporary.
Definition: Vector.hpp:1382
const T * ConstPointer
Constant pointer type for raw access to stored entries.
Definition: Vector.hpp:1034
std::enable_if< IsScalar< T1 >::value, SparseVector >::type & operator*=(const T1 &t)
Multiplies every stored entry by the scalar t.
Definition: Vector.hpp:1356
Reference operator()(SizeType i)
Returns a mutable proxy reference to the element at index i.
Definition: Vector.hpp:1140
const ArrayType & getData() const
Returns a const reference to the underlying associative container of stored entries.
Definition: Vector.hpp:1213
SparseVector & assign(InitializerListType l)
Resizes this vector to match l and assigns the elements of l.
Definition: Vector.hpp:1394
SelfType VectorTemporaryType
Concrete temporary vector type used by expression template machinery.
Definition: Vector.hpp:1049
Reference operator[](SizeType i)
Returns a mutable proxy reference to the element at index i.
Definition: Vector.hpp:1118
ConstReference operator[](SizeType i) const
Returns a const reference to the element at index i.
Definition: Vector.hpp:1129
bool isEmpty() const
Tells whether the vector's logical size is zero.
Definition: Vector.hpp:1177
void clear()
Removes all explicitly stored entries (the logical size remains unchanged).
Definition: Vector.hpp:1474
VectorReference< SelfType > ClosureType
Closure type used when this vector appears inside another expression.
Definition: Vector.hpp:1039
SparseVector & plusAssign(const VectorExpression< E > &e)
Adds the elements of the vector expression e to this vector without intermediate temporary.
Definition: Vector.hpp:1408
std::enable_if< IsScalar< T1 >::value, SparseVector >::type & operator/=(const T1 &t)
Divides every stored entry by the scalar t.
Definition: Vector.hpp:1369
SparseVector & plusAssign(InitializerListType l)
Adds the contents of the initializer list l element-wise to this vector without intermediate temporar...
Definition: Vector.hpp:1419
std::size_t SizeType
The unsigned size type.
Definition: Vector.hpp:999
const T & ConstReference
Constant reference type to a stored element value.
Definition: Vector.hpp:1014
T ValueType
The scalar value type stored in the vector.
Definition: Vector.hpp:994
friend void swap(SparseVector &v1, SparseVector &v2)
ADL-enabled free-function form of swap().
Definition: Vector.hpp:1466
SparseVector & operator+=(const VectorExpression< E > &e)
Adds the vector expression e element-wise to this sparse vector (via a temporary to handle aliasing).
Definition: Vector.hpp:1306
SparseVector & operator=(const SparseVector &v)
Copy-assigns the contents of v to this sparse vector.
Definition: Vector.hpp:1223
SparseVector & minusAssign(const VectorExpression< E > &e)
Subtracts the elements of the vector expression e from this vector without intermediate temporary.
Definition: Vector.hpp:1432
Constant vector expression that contains 1 at a single specified index and 0 elsewhere.
Definition: Vector.hpp:2693
T ValueType
The scalar value type.
Definition: Vector.hpp:2701
void swap(UnitVector &v)
Swaps the size and unit index with v.
Definition: Vector.hpp:2847
const T & Reference
Reference type (always a const reference — elements are immutable).
Definition: Vector.hpp:2706
std::size_t SizeType
The unsigned size type.
Definition: Vector.hpp:2716
UnitVector & operator=(const UnitVector &v)
Copy-assigns the size and unit index from v.
Definition: Vector.hpp:2824
friend void swap(UnitVector &v1, UnitVector &v2)
ADL-enabled free-function form of swap().
Definition: Vector.hpp:2860
const T & ConstReference
Constant element reference type.
Definition: Vector.hpp:2711
ConstReference operator()(SizeType i) const
Returns a const reference to the element at index i.
Definition: Vector.hpp:2776
void resize(SizeType n)
Resizes the logical element count to n.
Definition: Vector.hpp:2838
SizeType getSize() const
Returns the logical element count.
Definition: Vector.hpp:2796
const VectorReference< const SelfType > ConstClosureType
Constant closure type used when this vector appears inside another expression.
Definition: Vector.hpp:2731
Vector< T > VectorTemporaryType
Concrete temporary vector type used by expression template machinery.
Definition: Vector.hpp:2736
UnitVector()
Constructs an empty unit vector (size zero, index zero).
Definition: Vector.hpp:2741
UnitVector(SizeType n, SizeType i)
Constructs a unit vector of size n with the 1 element at index i.
Definition: Vector.hpp:2749
bool isEmpty() const
Tells whether the vector has zero logical size.
Definition: Vector.hpp:2787
std::ptrdiff_t DifferenceType
The signed difference type.
Definition: Vector.hpp:2721
ConstReference operator[](SizeType i) const
Returns a const reference to the element at index i.
Definition: Vector.hpp:2765
VectorReference< SelfType > ClosureType
Closure type used when this vector appears inside another expression.
Definition: Vector.hpp:2726
UnitVector(const UnitVector &v)
Constructs a copy of the unit vector v.
Definition: Vector.hpp:2756
SizeType getMaxSize() const
Returns the maximum representable element count.
Definition: Vector.hpp:2814
SizeType getIndex() const
Returns the index of the non-zero (unit) element.
Definition: Vector.hpp:2805
Refinement of Math::VectorExpression marking the derived type as a concrete (writable) vector contain...
Definition: Expression.hpp:225
const ContainerType & operator()() const
Returns a const reference to the derived vector container class instance.
Definition: Expression.hpp:237
CRTP base class of all vector expression types.
Definition: Expression.hpp:68
Lightweight vector expression that proxies a reference to an underlying vector container.
Definition: Vector.hpp:62
SizeType getMaxSize() const
Returns the wrapped vector's capacity (maximum element count without reallocation).
Definition: Vector.hpp:169
V::DifferenceType DifferenceType
The signed difference type of the wrapped vector.
Definition: Vector.hpp:97
V::ConstReference ConstReference
Constant element reference type.
Definition: Vector.hpp:87
V VectorType
The wrapped vector type.
Definition: Vector.hpp:70
VectorReference & assign(const VectorExpression< E > &e)
Assigns the vector expression e to the wrapped vector without intermediate temporary.
Definition: Vector.hpp:284
VectorReference & operator=(const VectorReference &r)
Copy-assigns the wrapped vector from the vector referenced by r.
Definition: Vector.hpp:206
ConstReference operator[](SizeType i) const
Returns a const reference to the element at index i.
Definition: Vector.hpp:131
VectorReference & operator=(const VectorExpression< E > &e)
Assigns the vector expression e to the wrapped vector.
Definition: Vector.hpp:219
VectorReference & operator+=(const VectorExpression< E > &e)
Adds the vector expression e element-wise to the wrapped vector.
Definition: Vector.hpp:232
V::ValueType ValueType
The element value type of the wrapped vector.
Definition: Vector.hpp:75
const VectorType & getData() const
Returns a const reference to the wrapped vector.
Definition: Vector.hpp:187
SizeType getSize() const
Returns the wrapped vector's element count.
Definition: Vector.hpp:160
VectorReference & minusAssign(const VectorExpression< E > &e)
Subtracts the vector expression e from the wrapped vector without intermediate temporary.
Definition: Vector.hpp:310
V::SizeType SizeType
The unsigned size type of the wrapped vector.
Definition: Vector.hpp:92
ConstReference operator()(SizeType i) const
Returns a const reference to the element at index i.
Definition: Vector.hpp:151
std::enable_if< IsScalar< T >::value, VectorReference >::type & operator*=(const T &t)
Multiplies every element of the wrapped vector by the scalar t.
Definition: Vector.hpp:258
VectorType & getData()
Returns a reference to the wrapped vector.
Definition: Vector.hpp:196
SelfType ClosureType
Closure type used when this proxy appears inside another expression.
Definition: Vector.hpp:102
std::conditional< std::is_const< V >::value, typename V::ConstReference, typename V::Reference >::type Reference
Mutable element reference type (degrades to ConstReference when the wrapped vector is const).
Definition: Vector.hpp:82
std::enable_if< IsScalar< T >::value, VectorReference >::type & operator/=(const T &t)
Divides every element of the wrapped vector by the scalar t.
Definition: Vector.hpp:271
Reference operator[](SizeType i)
Returns a mutable reference to the element at index i.
Definition: Vector.hpp:121
Reference operator()(SizeType i)
Returns a mutable reference to the element at index i.
Definition: Vector.hpp:141
friend void swap(VectorReference &r1, VectorReference &r2)
ADL-enabled free-function form of swap().
Definition: Vector.hpp:330
VectorReference & operator-=(const VectorExpression< E > &e)
Subtracts the vector expression e element-wise from the wrapped vector.
Definition: Vector.hpp:245
bool isEmpty() const
Tells whether the wrapped vector is empty.
Definition: Vector.hpp:178
VectorReference(VectorType &v)
Constructs the reference proxy referring to v.
Definition: Vector.hpp:113
VectorReference & plusAssign(const VectorExpression< E > &e)
Adds the vector expression e to the wrapped vector without intermediate temporary.
Definition: Vector.hpp:297
void swap(VectorReference &r)
Swaps the contents of the two wrapped vectors.
Definition: Vector.hpp:320
const SelfType ConstClosureType
Constant closure type used when this proxy appears inside another expression.
Definition: Vector.hpp:107
Dynamically-sized dense vector with configurable underlying storage.
Definition: Vector.hpp:480
Vector & minusAssign(const VectorExpression< E > &e)
Subtracts the elements of the vector expression e from this vector without intermediate temporary.
Definition: Vector.hpp:914
Vector & minusAssign(InitializerListType l)
Subtracts the contents of the initializer list l element-wise from this vector without intermediate t...
Definition: Vector.hpp:925
ConstReference operator[](SizeType i) const
Returns a const reference to the element at index i.
Definition: Vector.hpp:628
void clear(const ValueType &v=ValueType())
Sets every element of the vector to the value v.
Definition: Vector.hpp:955
Vector & plusAssign(InitializerListType l)
Adds the contents of the initializer list l element-wise to this vector without intermediate temporar...
Definition: Vector.hpp:901
Vector(Vector &&v)
Move-constructs a vector from v (v is left in a valid empty state).
Definition: Vector.hpp:589
Vector & operator-=(InitializerListType l)
Subtracts the contents of the initializer list l element-wise from this vector.
Definition: Vector.hpp:813
Vector(InitializerListType l)
Constructs the vector from a brace-initializer list l.
Definition: Vector.hpp:596
Vector & operator=(const Vector &v)
Copy-assigns the elements of v to this vector.
Definition: Vector.hpp:707
ArrayType & getData()
Returns a mutable reference to the underlying storage container.
Definition: Vector.hpp:688
Vector & operator=(Vector &&v)
Move-assigns the elements of v to this vector.
Definition: Vector.hpp:718
Vector(const ArrayType &data)
Constructs a vector that copies its data directly from the underlying-array container data.
Definition: Vector.hpp:575
Reference operator[](SizeType i)
Returns a mutable reference to the element at index i.
Definition: Vector.hpp:617
const T * ConstPointer
Constant pointer type for raw element access.
Definition: Vector.hpp:523
std::enable_if< IsScalar< T1 >::value, Vector >::type & operator*=(const T1 &t)
Multiplies every element by the scalar t.
Definition: Vector.hpp:839
SizeType getSize() const
Returns the current element count.
Definition: Vector.hpp:670
const ArrayType & getData() const
Returns a const reference to the underlying storage container.
Definition: Vector.hpp:697
Vector(SizeType n)
Constructs a vector of size n with default-initialized elements.
Definition: Vector.hpp:560
std::enable_if< IsScalar< T1 >::value, Vector >::type & operator/=(const T1 &t)
Divides every element by the scalar t.
Definition: Vector.hpp:852
Vector & operator=(InitializerListType l)
Assigns the contents of the initializer list l to this vector (resizes to fit).
Definition: Vector.hpp:729
A::size_type SizeType
The unsigned size type used by the underlying storage container.
Definition: Vector.hpp:503
T ValueType
The scalar value type stored in the vector.
Definition: Vector.hpp:488
Reference operator()(SizeType i)
Returns a mutable reference to the element at index i.
Definition: Vector.hpp:639
SelfType VectorTemporaryType
Concrete temporary vector type used by expression template machinery.
Definition: Vector.hpp:538
Vector & assign(const VectorExpression< E > &e)
Resizes this vector to match e and assigns the elements of e without intermediate temporary.
Definition: Vector.hpp:865
Vector(const VectorExpression< E > &e)
Constructs the vector from the vector expression e (materializing the expression result).
Definition: Vector.hpp:605
Vector & operator+=(InitializerListType l)
Adds the contents of the initializer list l element-wise to this vector.
Definition: Vector.hpp:777
Vector & operator-=(const VectorExpression< E > &e)
Subtracts the vector expression e element-wise from this vector (via a temporary to handle aliasing).
Definition: Vector.hpp:825
T & Reference
Mutable element reference type.
Definition: Vector.hpp:493
void swap(Vector &v)
Swaps the contents of this vector with those of v.
Definition: Vector.hpp:935
Vector & operator+=(const VectorContainer< C > &c)
Adds the contents of the vector container c element-wise to this vector (no alias check needed).
Definition: Vector.hpp:767
Vector & operator=(const VectorContainer< C > &c)
Assigns the contents of the vector container c to this vector (no alias check needed).
Definition: Vector.hpp:741
Vector & operator=(const VectorExpression< E > &e)
Assigns the vector expression e to this vector (via a temporary to handle aliasing).
Definition: Vector.hpp:753
Vector(SizeType n, const ValueType &v)
Constructs a vector of size n with every element initialized to v.
Definition: Vector.hpp:568
bool isEmpty() const
Tells whether the vector is empty.
Definition: Vector.hpp:661
Vector & assign(InitializerListType l)
Assigns the contents of the initializer list l to this vector.
Definition: Vector.hpp:877
ConstReference operator()(SizeType i) const
Returns a const reference to the element at index i.
Definition: Vector.hpp:651
Vector(const Vector &v)
Constructs a copy of the vector v.
Definition: Vector.hpp:582
std::initializer_list< T > InitializerListType
Type of the brace-initializer list accepted by the corresponding constructor.
Definition: Vector.hpp:548
Vector & plusAssign(const VectorExpression< E > &e)
Adds the elements of the vector expression e to this vector without intermediate temporary.
Definition: Vector.hpp:890
friend void swap(Vector &v1, Vector &v2)
ADL-enabled free-function form of swap().
Definition: Vector.hpp:946
Vector & operator-=(const VectorContainer< C > &c)
Subtracts the contents of the vector container c element-wise from this vector (no alias check needed...
Definition: Vector.hpp:803
std::shared_ptr< SelfType > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated Vector instances.
Definition: Vector.hpp:543
Vector & operator+=(const VectorExpression< E > &e)
Adds the vector expression e element-wise to this vector (via a temporary to handle aliasing).
Definition: Vector.hpp:789
A::difference_type DifferenceType
The signed difference type used by the underlying storage container.
Definition: Vector.hpp:508
const T & ConstReference
Constant element reference type.
Definition: Vector.hpp:498
A ArrayType
The underlying storage container type.
Definition: Vector.hpp:513
T * Pointer
Pointer type for raw element access.
Definition: Vector.hpp:518
void resize(SizeType n, const ValueType &v=ValueType())
Resizes the vector to n elements.
Definition: Vector.hpp:965
const VectorReference< const SelfType > ConstClosureType
Constant closure type used when this vector appears inside another expression.
Definition: Vector.hpp:533
SizeType getMaxSize() const
Returns the maximum number of elements the underlying storage container can hold.
Definition: Vector.hpp:679
Vector()
Constructs an empty vector (size zero).
Definition: Vector.hpp:553
VectorReference< SelfType > ClosureType
Closure type used when this vector appears inside another expression.
Definition: Vector.hpp:528
Constant vector expression whose elements are all zero.
Definition: Vector.hpp:2524
std::size_t SizeType
The unsigned size type.
Definition: Vector.hpp:2547
std::ptrdiff_t DifferenceType
The signed difference type.
Definition: Vector.hpp:2552
ZeroVector(SizeType n)
Constructs a zero vector of size n.
Definition: Vector.hpp:2579
Vector< T > VectorTemporaryType
Concrete temporary vector type used by expression template machinery.
Definition: Vector.hpp:2567
const T & ConstReference
Constant reference type to the zero element.
Definition: Vector.hpp:2542
bool isEmpty() const
Tells whether the vector has zero logical size.
Definition: Vector.hpp:2616
const T & Reference
Reference type (always a const reference — all elements are zero).
Definition: Vector.hpp:2537
ZeroVector(const ZeroVector &v)
Constructs a copy of the zero vector v.
Definition: Vector.hpp:2586
ZeroVector & operator=(const ZeroVector &v)
Copy-assigns the logical size from v.
Definition: Vector.hpp:2644
ZeroVector()
Constructs an empty zero vector.
Definition: Vector.hpp:2572
friend void swap(ZeroVector &v1, ZeroVector &v2)
ADL-enabled free-function form of swap().
Definition: Vector.hpp:2674
const VectorReference< const SelfType > ConstClosureType
Constant closure type used when this vector appears inside another expression.
Definition: Vector.hpp:2562
T ValueType
The scalar value type.
Definition: Vector.hpp:2532
ConstReference operator()(SizeType i) const
Returns a const reference to the zero element.
Definition: Vector.hpp:2606
SizeType getMaxSize() const
Returns the maximum representable element count.
Definition: Vector.hpp:2634
ConstReference operator[](SizeType i) const
Returns a const reference to the zero element.
Definition: Vector.hpp:2595
VectorReference< SelfType > ClosureType
Closure type used when this vector appears inside another expression.
Definition: Vector.hpp:2557
void swap(ZeroVector &v)
Swaps the logical sizes with v.
Definition: Vector.hpp:2663
SizeType getSize() const
Returns the logical element count.
Definition: Vector.hpp:2625
void resize(SizeType n)
Resizes the logical element count to n.
Definition: Vector.hpp:2654
constexpr unsigned int A
Generic type that covers any element except hydrogen.
Definition: AtomType.hpp:637
constexpr unsigned int N
Specifies Nitrogen.
Definition: AtomType.hpp:97
constexpr unsigned int V
Specifies Vanadium.
Definition: AtomType.hpp:177
constexpr unsigned int T
Specifies Hydrogen (Tritium).
Definition: AtomType.hpp:67
constexpr unsigned int r
Specifies that the stereocenter has r configuration.
Definition: CIPDescriptor.hpp:76
CVector< unsigned long, 4 > Vector4UL
Bounded 4 element vector holding unsigned integers of type unsigned long.
Definition: Vector.hpp:3258
CVector< float, 2 > Vector2F
Bounded 2 element vector holding floating-point values of type float.
Definition: Vector.hpp:3198
QuaternionVectorAdapter< E > vec(QuaternionExpression< E > &e)
Creates a mutable Math::QuaternionVectorAdapter view of the quaternion expression e.
Definition: QuaternionAdapter.hpp:404
SparseVector< unsigned long > SparseULVector
Unbounded sparse vector holding unsigned integers of type unsigned long.
Definition: Vector.hpp:3298
CVector< double, 7 > Vector7D
Bounded 7 element vector holding floating-point values of type double.
Definition: Vector.hpp:3228
SparseVector< float > SparseFVector
Unbounded sparse vector holding floating-point values of type float.
Definition: Vector.hpp:3283
UnitVector< unsigned long > ULUnitVector
Memory-efficient immutable unit vector with element values of type unsigned long.
Definition: Vector.hpp:3193
UnitVector< float > FUnitVector
Memory-efficient immutable unit vector with element values of type float.
Definition: Vector.hpp:3178
CVector< double, 4 > Vector4D
Bounded 4 element vector holding floating-point values of type double.
Definition: Vector.hpp:3223
SparseVector< long > SparseLVector
Unbounded sparse vector holding signed integers of type long.
Definition: Vector.hpp:3293
ScalarVector< double > DScalarVector
Memory-efficient immutable vector where all elements have the same value of type double.
Definition: Vector.hpp:3143
CVector< float, 4 > Vector4F
Bounded 4 element vector holding floating-point values of type float.
Definition: Vector.hpp:3208
CVector< double, 2 > Vector2D
Bounded 2 element vector holding floating-point values of type double.
Definition: Vector.hpp:3213
Vector< float > FVector
Unbounded dense vector holding floating-point values of type float.
Definition: Vector.hpp:3263
Vector< double > DVector
Unbounded dense vector holding floating-point values of type double.
Definition: Vector.hpp:3268
CVector< double, 3 > Vector3D
Bounded 3 element vector holding floating-point values of type double.
Definition: Vector.hpp:3218
UnitVector< double > DUnitVector
Memory-efficient immutable unit vector with element values of type double.
Definition: Vector.hpp:3183
UnitVector< long > LUnitVector
Memory-efficient immutable unit vector with element values of type long.
Definition: Vector.hpp:3188
ZeroVector< long > LZeroVector
Memory-efficient immutable vector where all elements have the value zero of type long.
Definition: Vector.hpp:3168
ScalarVector< long > LScalarVector
Memory-efficient immutable vector where all elements have the same value of type long.
Definition: Vector.hpp:3148
ScalarVector< unsigned long > ULScalarVector
Memory-efficient immutable vector where all elements have the same value of type unsigned long.
Definition: Vector.hpp:3153
ZeroVector< unsigned long > ULZeroVector
Memory-efficient immutable vector where all elements have the value zero of type unsigned long.
Definition: Vector.hpp:3173
CVector< float, 3 > Vector3F
Bounded 3 element vector holding floating-point values of type float.
Definition: Vector.hpp:3203
Vector< unsigned long > ULVector
Unbounded dense vector holding unsigned integers of type unsigned long.
Definition: Vector.hpp:3278
CVector< long, 4 > Vector4L
Bounded 4 element vector holding signed integers of type long.
Definition: Vector.hpp:3243
ZeroVector< double > DZeroVector
Memory-efficient immutable vector where all elements have the value zero of type double.
Definition: Vector.hpp:3163
CVector< unsigned long, 2 > Vector2UL
Bounded 2 element vector holding unsigned integers of type unsigned long.
Definition: Vector.hpp:3248
CVector< long, 3 > Vector3L
Bounded 3 element vector holding signed integers of type long.
Definition: Vector.hpp:3238
CVector< long, 2 > Vector2L
Bounded 2 element vector holding signed integers of type long.
Definition: Vector.hpp:3233
ZeroVector< float > FZeroVector
Memory-efficient immutable vector where all elements have the value zero of type float.
Definition: Vector.hpp:3158
SparseVector< double > SparseDVector
Unbounded sparse vector holding floating-point values of type double.
Definition: Vector.hpp:3288
ScalarVector< float > FScalarVector
Memory-efficient immutable vector where all elements have the same value of type float.
Definition: Vector.hpp:3138
Vector< long > LVector
Unbounded dense vector holding signed integers of type long.
Definition: Vector.hpp:3273
CVector< unsigned long, 3 > Vector3UL
Bounded 3 element vector holding unsigned integers of type unsigned long.
Definition: Vector.hpp:3253
The namespace of the Chemical Data Processing Library.
Selects a concrete temporary vector type compatible with the vector expression V.
Definition: TypeTraits.hpp:323