27 #ifndef CDPL_MATH_VECTOR_HPP
28 #define CDPL_MATH_VECTOR_HPP
35 #include <unordered_map>
36 #include <type_traits>
37 #include <initializer_list>
72 typedef typename std::conditional<std::is_const<V>::value,
73 typename V::ConstReference,
139 return data.getSize();
148 return data.getMaxSize();
157 return data.isEmpty();
185 data.operator=(
r.data);
195 template <
typename E>
208 template <
typename E>
221 template <
typename E>
234 template <
typename T>
247 template <
typename T>
260 template <
typename E>
273 template <
typename E>
286 template <
typename E>
316 template <
typename T,
typename A>
323 template <
typename T>
332 typedef typename InitializerListType::value_type
ValueType;
336 typedef typename InitializerListType::reference
Reference;
338 typedef typename InitializerListType::size_type
SizeType;
386 return *(list.begin() + i);
398 return *(list.begin() + i);
416 return (list.size() == 0);
428 template <
typename T,
typename A = std::vector<T> >
473 data(storageSize(n)) {}
481 data(storageSize(n), v) {}
502 data(std::move(v.data)) {}
516 template <
typename E>
518 data(storageSize(e().
getSize()))
520 vectorAssignVector<ScalarAssignment>(*
this, e);
593 return data.max_size();
632 data = std::move(v.data);
652 template <
typename C>
664 template <
typename E>
678 template <
typename C>
700 template <
typename E>
714 template <
typename C>
736 template <
typename E>
750 template <
typename T1>
753 vectorAssignScalar<ScalarMultiplicationAssignment>(*
this, t);
763 template <
typename T1>
766 vectorAssignScalar<ScalarDivisionAssignment>(*
this, t);
776 template <
typename E>
780 vectorAssignVector<ScalarAssignment>(*
this, e);
801 template <
typename E>
804 vectorAssignVector<ScalarAdditionAssignment>(*
this, e);
825 template <
typename E>
828 vectorAssignVector<ScalarSubtractionAssignment>(*
this, e);
850 std::swap(data, v.data);
869 std::fill(data.begin(), data.end(), v);
879 data.resize(storageSize(n), v);
896 template <
typename T,
typename A = std::unordered_map<std::
size_t, T> >
942 data(), size(storageSize(n)) {}
949 data(v.data), size(v.size) {}
975 template <
typename E>
1026 typename ArrayType::const_iterator it = data.find(i);
1028 if (it == data.end())
1067 return std::min(
SizeType(data.max_size()), std::numeric_limits<SizeType>::max());
1127 template <
typename C>
1139 template <
typename E>
1153 template <
typename C>
1175 template <
typename E>
1189 template <
typename C>
1211 template <
typename E>
1225 template <
typename T1>
1228 vectorAssignScalar<ScalarMultiplicationAssignment>(*
this, t);
1238 template <
typename T1>
1241 vectorAssignScalar<ScalarDivisionAssignment>(*
this, t);
1251 template <
typename E>
1255 vectorAssignVector<ScalarAssignment>(*
this, e);
1277 template <
typename E>
1280 vectorAssignVector<ScalarAdditionAssignment>(*
this, e);
1301 template <
typename E>
1304 vectorAssignVector<ScalarSubtractionAssignment>(*
this, e);
1326 std::swap(data, v.data);
1327 std::swap(size, v.size);
1357 for (
typename ArrayType::iterator it = data.begin(); it != data.end();) {
1359 it = data.erase(it);
1378 template <
typename T,
typename A>
1386 template <
typename T, std::
size_t N>
1459 std::copy(v.data, v.data + v.size, data);
1478 template <
typename E>
1584 std::copy(v.data, v.data + v.size, data);
1608 template <
typename C>
1620 template <
typename E>
1633 template <
typename C>
1655 template <
typename E>
1668 template <
typename C>
1690 template <
typename E>
1703 template <
typename T1>
1706 vectorAssignScalar<ScalarMultiplicationAssignment>(*
this, t);
1716 template <
typename T1>
1719 vectorAssignScalar<ScalarDivisionAssignment>(*
this, t);
1730 template <
typename E>
1734 vectorAssignVector<ScalarAssignment>(*
this, e);
1747 std::copy(l.begin(), l.begin() + size, data);
1757 template <
typename E>
1760 vectorAssignVector<ScalarAdditionAssignment>(*
this, e);
1781 template <
typename E>
1784 vectorAssignVector<ScalarSubtractionAssignment>(*
this, e);
1806 std::swap_ranges(data, data + std::max(size, v.size), v.data);
1807 std::swap(size, v.size);
1827 std::fill(data, data + size, v);
1837 size = storageSize(n);
1851 std::fill(data + size, data + n, v);
1866 template <
typename T, std::
size_t N>
1874 template <
typename T, std::
size_t N>
1934 std::copy(v.data, v.data +
N, data);
1951 template <
typename E>
1954 vectorAssignVector<ScalarAssignment>(*
this, e);
2056 std::copy(v.data, v.data +
N, data);
2077 template <
typename C>
2089 template <
typename E>
2102 template <
typename C>
2124 template <
typename E>
2137 template <
typename C>
2159 template <
typename E>
2172 template <
typename T1>
2175 vectorAssignScalar<ScalarMultiplicationAssignment>(*
this, t);
2185 template <
typename T1>
2188 vectorAssignScalar<ScalarDivisionAssignment>(*
this, t);
2198 template <
typename E>
2201 vectorAssignVector<ScalarAssignment>(*
this, e);
2214 std::copy(l.begin(), l.begin() + n, data);
2228 template <
typename E>
2231 vectorAssignVector<ScalarAdditionAssignment>(*
this, e);
2252 template <
typename E>
2255 vectorAssignVector<ScalarSubtractionAssignment>(*
this, e);
2277 std::swap_ranges(data, data +
N, v.data);
2296 std::fill(data, data +
N, v);
2303 template <
typename T, std::
size_t N>
2310 template <
typename T>
2401 return std::numeric_limits<SizeType>::max();
2431 std::swap(size, v.size);
2449 template <
typename T>
2456 template <
typename T>
2484 size(0), index(0) {}
2492 size(n), index(i) {}
2499 size(v.size), index(v.index) {}
2522 return (i == index ? one : zero);
2558 return std::numeric_limits<SizeType>::max();
2592 std::swap(size, v.size);
2593 std::swap(index, v.index);
2614 template <
typename T>
2616 template <
typename T>
2623 template <
typename T>
2659 size(n), value(v) {}
2666 size(v.size), value(v.value) {}
2715 return std::numeric_limits<SizeType>::max();
2749 std::swap(size, v.size);
2750 std::swap(value, v.value);
2773 template <
typename V>
2781 template <
typename V>
2793 template <
typename T1,
typename T2>
2795 vec(
const T1& t1,
const T2& t2)
2815 template <
typename T1,
typename T2,
typename T3>
2816 CVector<typename CommonType<typename CommonType<T1, T2>::Type, T3>::Type, 3>
2817 vec(
const T1& t1,
const T2& t2,
const T3& t3)
2840 template <
typename T1,
typename T2,
typename T3,
typename T4>
2841 CVector<typename CommonType<typename CommonType<typename CommonType<T1, T2>::Type, T3>::Type, T4>::Type, 4>
2842 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:1388
static const SizeType MaxSize
The compile-time maximum capacity N.
Definition: Vector.hpp:1421
std::shared_ptr< SelfType > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated BoundedVector instances.
Definition: Vector.hpp:1416
BoundedVector & operator=(const BoundedVector &v)
Copy-assigns the elements of v to this bounded vector.
Definition: Vector.hpp:1581
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:1634
ConstReference operator[](SizeType i) const
Returns a const reference to the element at index i (alias for operator()).
Definition: Vector.hpp:1502
T & Reference
Mutable reference type to an element.
Definition: Vector.hpp:1396
void resize(SizeType n, const ValueType &v)
Resizes the vector to n elements; newly added elements are set to v.
Definition: Vector.hpp:1846
void swap(BoundedVector &v)
Swaps the contents of this bounded vector with those of v.
Definition: Vector.hpp:1803
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:1656
void clear(const ValueType &v=ValueType())
Sets every element of the vector to the value v (size is unchanged).
Definition: Vector.hpp:1825
Pointer getData()
Returns a mutable pointer to the contiguous element array.
Definition: Vector.hpp:1562
BoundedVector(const VectorExpression< E > &e)
Constructs a bounded vector from the vector expression e.
Definition: Vector.hpp:1479
BoundedVector & assign(InitializerListType l)
Resizes this vector to match l and copies the elements of l in.
Definition: Vector.hpp:1744
Reference operator()(SizeType i)
Returns a mutable reference to the element at index i.
Definition: Vector.hpp:1513
std::enable_if< IsScalar< T1 >::value, BoundedVector >::type & operator*=(const T1 &t)
Multiplies every element by the scalar t.
Definition: Vector.hpp:1704
void resize(SizeType n)
Resizes the vector to n elements (new elements are left value-uninitialized).
Definition: Vector.hpp:1835
BoundedVector & assign(const VectorExpression< E > &e)
Resizes this vector to match e and assigns the elements of e without intermediate temporary.
Definition: Vector.hpp:1731
std::initializer_list< T > InitializerListType
The initializer-list type accepted by constructors and assignment.
Definition: Vector.hpp:1418
BoundedVector & minusAssign(const VectorExpression< E > &e)
Subtracts the elements of the vector expression e from this vector without intermediate temporary.
Definition: Vector.hpp:1782
ConstReference operator()(SizeType i) const
Returns a const reference to the element at index i.
Definition: Vector.hpp:1525
ConstPointer getData() const
Returns a const pointer to the contiguous element array.
Definition: Vector.hpp:1571
SizeType getMaxSize() const
Returns the compile-time maximum capacity N.
Definition: Vector.hpp:1553
const VectorReference< const SelfType > ConstClosureType
Constant closure type used when this vector appears inside another expression.
Definition: Vector.hpp:1412
BoundedVector(InitializerListType l)
Constructs a bounded vector with the contents of the initializer list l.
Definition: Vector.hpp:1467
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:1609
BoundedVector & plusAssign(InitializerListType l)
Adds the contents of the initializer list l element-wise to this vector without intermediate temporar...
Definition: Vector.hpp:1769
const T * ConstPointer
Constant pointer type for raw access to the element array.
Definition: Vector.hpp:1408
Reference operator[](SizeType i)
Returns a mutable reference to the element at index i (alias for operator()).
Definition: Vector.hpp:1491
std::ptrdiff_t DifferenceType
The signed difference type.
Definition: Vector.hpp:1402
BoundedVector()
Constructs an empty bounded vector (size zero, capacity N).
Definition: Vector.hpp:1426
BoundedVector & plusAssign(const VectorExpression< E > &e)
Adds the elements of the vector expression e to this vector without intermediate temporary.
Definition: Vector.hpp:1758
SizeType getSize() const
Returns the current element count.
Definition: Vector.hpp:1544
BoundedVector(SizeType n)
Constructs a bounded vector of size n with value-initialized elements.
Definition: Vector.hpp:1434
BoundedVector & minusAssign(InitializerListType l)
Subtracts the contents of the initializer list l element-wise from this vector without intermediate t...
Definition: Vector.hpp:1793
BoundedVector & operator-=(InitializerListType l)
Subtracts the contents of the initializer list l element-wise from this bounded vector.
Definition: Vector.hpp:1679
T ValueType
The scalar value type.
Definition: Vector.hpp:1394
bool isEmpty() const
Tells whether the vector is empty.
Definition: Vector.hpp:1535
ValueType ArrayType[N]
The fixed-capacity C-array type used for in-memory storage.
Definition: Vector.hpp:1404
BoundedVector & operator=(InitializerListType l)
Assigns the contents of the initializer list l to this bounded vector.
Definition: Vector.hpp:1597
T * Pointer
Pointer type for raw access to the element array.
Definition: Vector.hpp:1406
std::size_t SizeType
The unsigned size type.
Definition: Vector.hpp:1400
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:1691
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:1669
BoundedVector(SizeType n, const ValueType &v)
Constructs a bounded vector of size n with every element initialized to v.
Definition: Vector.hpp:1446
friend void swap(BoundedVector &v1, BoundedVector &v2)
ADL-enabled free-function form of swap().
Definition: Vector.hpp:1816
VectorReference< SelfType > ClosureType
Closure type used when this vector appears inside another expression.
Definition: Vector.hpp:1410
const T & ConstReference
Constant reference type to an element.
Definition: Vector.hpp:1398
BoundedVector< T, N+1 > VectorTemporaryType
Concrete temporary vector type used by expression-template machinery (one element larger than the bou...
Definition: Vector.hpp:1414
BoundedVector & operator=(const VectorExpression< E > &e)
Assigns the vector expression e to this bounded vector (via a temporary to handle aliasing).
Definition: Vector.hpp:1621
BoundedVector(const BoundedVector &v)
Constructs a copy of the bounded vector v.
Definition: Vector.hpp:1456
std::enable_if< IsScalar< T1 >::value, BoundedVector >::type & operator/=(const T1 &t)
Divides every element by the scalar t.
Definition: Vector.hpp:1717
BoundedVector & operator+=(InitializerListType l)
Adds the contents of the initializer list l element-wise to this bounded vector.
Definition: Vector.hpp:1644
Fixed-size vector of dimension N backed by a C-array (no dynamic allocation).
Definition: Vector.hpp:1876
std::enable_if< IsScalar< T1 >::value, CVector >::type & operator/=(const T1 &t)
Divides every element by the scalar t.
Definition: Vector.hpp:2186
ConstReference operator()(SizeType i) const
Returns a const reference to the element at index i.
Definition: Vector.hpp:1997
std::size_t SizeType
The unsigned size type.
Definition: Vector.hpp:1888
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:2090
Pointer getData()
Returns a mutable pointer to the contiguous element array.
Definition: Vector.hpp:2034
static const SizeType Size
The compile-time fixed size N.
Definition: Vector.hpp:1909
T ValueType
The scalar value type.
Definition: Vector.hpp:1882
void clear(const ValueType &v=ValueType())
Sets every element of the vector to the value v.
Definition: Vector.hpp:2294
SizeType getMaxSize() const
Returns the fixed element count N (capacity equals size for Math::CVector).
Definition: Vector.hpp:2025
CVector & operator=(InitializerListType l)
Assigns the contents of the initializer list l to this fixed-size vector.
Definition: Vector.hpp:2066
const T & ConstReference
Constant reference type to an element.
Definition: Vector.hpp:1886
ConstPointer getData() const
Returns a const pointer to the contiguous element array.
Definition: Vector.hpp:2043
ValueType ArrayType[N]
The fixed-size C-array type used for in-memory storage of N elements.
Definition: Vector.hpp:1892
ConstReference operator[](SizeType i) const
Returns a const reference to the element at index i (alias for operator()).
Definition: Vector.hpp:1974
bool isEmpty() const
Tells whether the vector is empty (N is zero).
Definition: Vector.hpp:2007
Reference operator()(SizeType i)
Returns a mutable reference to the element at index i.
Definition: Vector.hpp:1985
CVector & plusAssign(const VectorExpression< E > &e)
Adds the elements of the vector expression e to this vector without intermediate temporary.
Definition: Vector.hpp:2229
CVector & operator-=(InitializerListType l)
Subtracts the contents of the initializer list l element-wise from this fixed-size vector.
Definition: Vector.hpp:2148
CVector & plusAssign(InitializerListType l)
Adds the contents of the initializer list l element-wise to this vector without intermediate temporar...
Definition: Vector.hpp:2240
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:2125
SizeType getSize() const
Returns the fixed element count N.
Definition: Vector.hpp:2016
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:2078
T * Pointer
Pointer type for raw access to the element array.
Definition: Vector.hpp:1894
VectorReference< SelfType > ClosureType
Closure type used when this vector appears inside another expression.
Definition: Vector.hpp:1898
CVector & operator+=(InitializerListType l)
Adds the contents of the initializer list l element-wise to this fixed-size vector.
Definition: Vector.hpp:2113
CVector(InitializerListType l)
Constructs a fixed-size vector with the contents of the initializer list l.
Definition: Vector.hpp:1941
void swap(CVector &v)
Swaps the contents of this fixed-size vector with those of v.
Definition: Vector.hpp:2274
BoundedVector< T, N+1 > VectorTemporaryType
Concrete temporary vector type used by expression-template machinery (a Math::BoundedVector of N + 1 ...
Definition: Vector.hpp:1902
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:2199
Reference operator[](SizeType i)
Returns a mutable reference to the element at index i (alias for operator()).
Definition: Vector.hpp:1963
const T * ConstPointer
Constant pointer type for raw access to the element array.
Definition: Vector.hpp:1896
std::shared_ptr< SelfType > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated CVector instances.
Definition: Vector.hpp:1904
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:2160
CVector & minusAssign(InitializerListType l)
Subtracts the contents of the initializer list l element-wise from this vector without intermediate t...
Definition: Vector.hpp:2264
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:2103
T & Reference
Mutable reference type to an element.
Definition: Vector.hpp:1884
const VectorReference< const SelfType > ConstClosureType
Constant closure type used when this vector appears inside another expression.
Definition: Vector.hpp:1900
CVector & minusAssign(const VectorExpression< E > &e)
Subtracts the elements of the vector expression e from this vector without intermediate temporary.
Definition: Vector.hpp:2253
CVector & operator=(const CVector &v)
Copy-assigns the elements of v to this fixed-size vector.
Definition: Vector.hpp:2053
CVector(const ValueType &v)
Constructs an N-element vector with every element initialized to v.
Definition: Vector.hpp:1923
std::initializer_list< T > InitializerListType
The initializer-list type accepted by constructors and assignment.
Definition: Vector.hpp:1906
std::ptrdiff_t DifferenceType
The signed difference type.
Definition: Vector.hpp:1890
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:2211
CVector()
Constructs a zero-initialized N-element vector.
Definition: Vector.hpp:1914
CVector(const VectorExpression< E > &e)
Constructs a fixed-size vector from the vector expression e.
Definition: Vector.hpp:1952
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:2138
CVector(const CVector &v)
Constructs a copy of the fixed-size vector v.
Definition: Vector.hpp:1932
friend void swap(CVector &v1, CVector &v2)
ADL-enabled free-function form of swap().
Definition: Vector.hpp:2285
std::enable_if< IsScalar< T1 >::value, CVector >::type & operator*=(const T1 &t)
Multiplies every element by the scalar t.
Definition: Vector.hpp:2173
Lightweight vector container that wraps a std::initializer_list for construction-style initialization...
Definition: Vector.hpp:325
ConstReference operator()(SizeType i) const
Returns a const reference to the element at index i.
Definition: Vector.hpp:395
InitializerListType::const_reference ConstReference
Constant reference type to an element.
Definition: Vector.hpp:334
const SelfType ConstClosureType
Constant closure type used when this vector appears inside another expression.
Definition: Vector.hpp:344
Reference operator[](SizeType i)
Returns a reference to the element at index i (alias for operator()).
Definition: Vector.hpp:361
Reference operator()(SizeType i)
Returns a reference to the element at index i.
Definition: Vector.hpp:383
std::initializer_list< T > InitializerListType
The wrapped std::initializer_list type.
Definition: Vector.hpp:330
SizeType getSize() const
Returns the size of the wrapped initializer list.
Definition: Vector.hpp:405
InitListVector(InitializerListType l)
Constructs the vector by wrapping the initializer list l (no copy).
Definition: Vector.hpp:352
bool isEmpty() const
Tells whether the wrapped initializer list is empty.
Definition: Vector.hpp:414
InitializerListType::value_type ValueType
The scalar value type.
Definition: Vector.hpp:332
InitializerListType::reference Reference
Mutable reference type (degrades to ConstReference for the immutable initializer list).
Definition: Vector.hpp:336
std::ptrdiff_t DifferenceType
The signed difference type.
Definition: Vector.hpp:340
InitializerListType::size_type SizeType
The unsigned size type.
Definition: Vector.hpp:338
ConstReference operator[](SizeType i) const
Returns a const reference to the element at index i (alias for operator()).
Definition: Vector.hpp:372
SelfType ClosureType
Closure type used when this vector appears inside another expression.
Definition: Vector.hpp:342
Vector< T, std::vector< T > > VectorTemporaryType
Concrete temporary vector type used by expression-template machinery.
Definition: Vector.hpp:346
InitListVector SelfType
Definition: Vector.hpp:328
Constant vector expression in which every element equals the same scalar value.
Definition: Vector.hpp:2625
std::size_t SizeType
The unsigned size type.
Definition: Vector.hpp:2637
ConstReference operator()(SizeType i) const
Returns a const reference to the common element value.
Definition: Vector.hpp:2685
SizeType getMaxSize() const
Returns the maximum representable element count.
Definition: Vector.hpp:2713
const T & ConstReference
Constant reference type to an element.
Definition: Vector.hpp:2635
ConstReference operator[](SizeType i) const
Returns a const reference to the common element value (alias for operator()).
Definition: Vector.hpp:2674
const T & Reference
Reference type (always a const reference — elements are immutable).
Definition: Vector.hpp:2633
VectorReference< SelfType > ClosureType
Closure type used when this vector appears inside another expression.
Definition: Vector.hpp:2641
ScalarVector()
Constructs an empty scalar vector.
Definition: Vector.hpp:2650
friend void swap(ScalarVector &v1, ScalarVector &v2)
ADL-enabled free-function form of swap().
Definition: Vector.hpp:2759
ScalarVector & operator=(const ScalarVector &v)
Copy-assigns the size and common value from v.
Definition: Vector.hpp:2723
const VectorReference< const SelfType > ConstClosureType
Constant closure type used when this vector appears inside another expression.
Definition: Vector.hpp:2643
Vector< T > VectorTemporaryType
Concrete temporary vector type used by expression-template machinery.
Definition: Vector.hpp:2645
std::ptrdiff_t DifferenceType
The signed difference type.
Definition: Vector.hpp:2639
T ValueType
The scalar value type.
Definition: Vector.hpp:2631
SizeType getSize() const
Returns the logical element count.
Definition: Vector.hpp:2704
void resize(SizeType n)
Resizes the logical element count to n.
Definition: Vector.hpp:2737
void swap(ScalarVector &v)
Swaps the size and common value with v.
Definition: Vector.hpp:2746
bool isEmpty() const
Tells whether the vector has zero logical size.
Definition: Vector.hpp:2695
ScalarVector(SizeType n, const ValueType &v=ValueType())
Constructs a scalar vector of size n in which every element equals v.
Definition: Vector.hpp:2658
ScalarVector(const ScalarVector &v)
Constructs a copy of the scalar vector v.
Definition: Vector.hpp:2665
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:898
SparseVector & operator=(InitializerListType l)
Assigns the contents of the initializer list l to this sparse vector.
Definition: Vector.hpp:1116
SparseVector & operator=(SparseVector &&v)
Move-assigns the contents of v to this sparse vector.
Definition: Vector.hpp:1105
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:1212
SparseVector & operator+=(InitializerListType l)
Adds the contents of the initializer list l element-wise to this sparse vector.
Definition: Vector.hpp:1164
SparseVector & operator=(const VectorExpression< E > &e)
Assigns the vector expression e to this sparse vector (via a temporary to handle aliasing).
Definition: Vector.hpp:1140
ConstReference operator()(SizeType i) const
Returns a const reference to the element at index i.
Definition: Vector.hpp:1022
const VectorReference< const SelfType > ConstClosureType
Constant closure type used when this vector appears inside another expression.
Definition: Vector.hpp:923
SparseVector(const VectorExpression< E > &e)
Constructs a sparse vector from the vector expression e.
Definition: Vector.hpp:976
SizeType getMaxSize() const
Returns the maximum number of stored entries the underlying associative container can hold.
Definition: Vector.hpp:1065
std::ptrdiff_t DifferenceType
The signed difference type.
Definition: Vector.hpp:907
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:1154
void resize(SizeType n)
Resizes the logical element count to n, dropping any stored entries at indices beyond n.
Definition: Vector.hpp:1353
SparseVector(SparseVector &&v)
Move-constructs from v (v is left in a valid empty state).
Definition: Vector.hpp:955
SizeType getSize() const
Returns the logical element count.
Definition: Vector.hpp:1056
A::key_type KeyType
The key type used by the underlying associative container.
Definition: Vector.hpp:909
std::initializer_list< T > InitializerListType
The initializer-list type accepted by constructors and assignment.
Definition: Vector.hpp:929
SparseVector(const SparseVector &v)
Constructs a copy of the sparse vector v.
Definition: Vector.hpp:948
void swap(SparseVector &v)
Swaps the contents of this sparse vector with those of v.
Definition: Vector.hpp:1323
SizeType getNumElements() const
Returns the number of explicitly stored (non-default) entries.
Definition: Vector.hpp:1038
T * Pointer
Pointer type for raw access to stored entries.
Definition: Vector.hpp:917
SparseVector(SizeType n)
Constructs a sparse vector of size n with no stored entries (every position reads as the default valu...
Definition: Vector.hpp:941
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:1190
SparseVector(InitializerListType l)
Constructs a sparse vector with the contents of the initializer list l.
Definition: Vector.hpp:965
SparseVector()
Constructs an empty sparse vector (size zero, no stored entries).
Definition: Vector.hpp:934
std::shared_ptr< SelfType > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated SparseVector instances.
Definition: Vector.hpp:927
A ArrayType
The underlying associative container type.
Definition: Vector.hpp:915
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:1128
SparseVector & minusAssign(InitializerListType l)
Subtracts the contents of the initializer list l element-wise from this vector without intermediate t...
Definition: Vector.hpp:1313
SparseContainerElement< SelfType, KeyType > Reference
Mutable reference type (a proxy object that inserts on assignment to a previously-absent key).
Definition: Vector.hpp:913
ArrayType & getData()
Returns a mutable reference to the underlying associative container of stored entries.
Definition: Vector.hpp:1074
SparseVector & operator-=(InitializerListType l)
Subtracts the contents of the initializer list l element-wise from this sparse vector.
Definition: Vector.hpp:1200
SparseVector & assign(const VectorExpression< E > &e)
Resizes this vector to match e and assigns the elements of e without intermediate temporary.
Definition: Vector.hpp:1252
const T * ConstPointer
Constant pointer type for raw access to stored entries.
Definition: Vector.hpp:919
std::enable_if< IsScalar< T1 >::value, SparseVector >::type & operator*=(const T1 &t)
Multiplies every stored entry by the scalar t.
Definition: Vector.hpp:1226
Reference operator()(SizeType i)
Returns a mutable proxy reference to the element at index i.
Definition: Vector.hpp:1010
const ArrayType & getData() const
Returns a const reference to the underlying associative container of stored entries.
Definition: Vector.hpp:1083
SparseVector & assign(InitializerListType l)
Resizes this vector to match l and assigns the elements of l.
Definition: Vector.hpp:1264
SelfType VectorTemporaryType
Concrete temporary vector type used by expression-template machinery.
Definition: Vector.hpp:925
Reference operator[](SizeType i)
Returns a mutable proxy reference to the element at index i (alias for operator()).
Definition: Vector.hpp:988
ConstReference operator[](SizeType i) const
Returns a const reference to the element at index i (alias for operator()).
Definition: Vector.hpp:999
bool isEmpty() const
Tells whether the vector's logical size is zero.
Definition: Vector.hpp:1047
void clear()
Removes all explicitly stored entries (the logical size remains unchanged).
Definition: Vector.hpp:1344
VectorReference< SelfType > ClosureType
Closure type used when this vector appears inside another expression.
Definition: Vector.hpp:921
SparseVector & plusAssign(const VectorExpression< E > &e)
Adds the elements of the vector expression e to this vector without intermediate temporary.
Definition: Vector.hpp:1278
std::enable_if< IsScalar< T1 >::value, SparseVector >::type & operator/=(const T1 &t)
Divides every stored entry by the scalar t.
Definition: Vector.hpp:1239
SparseVector & plusAssign(InitializerListType l)
Adds the contents of the initializer list l element-wise to this vector without intermediate temporar...
Definition: Vector.hpp:1289
std::size_t SizeType
The unsigned size type.
Definition: Vector.hpp:905
const T & ConstReference
Constant reference type to a stored element value.
Definition: Vector.hpp:911
T ValueType
Definition: Vector.hpp:903
friend void swap(SparseVector &v1, SparseVector &v2)
ADL-enabled free-function form of swap().
Definition: Vector.hpp:1336
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:1176
SparseVector & operator=(const SparseVector &v)
Copy-assigns the contents of v to this sparse vector.
Definition: Vector.hpp:1093
SparseVector & minusAssign(const VectorExpression< E > &e)
Subtracts the elements of the vector expression e from this vector without intermediate temporary.
Definition: Vector.hpp:1302
Constant vector expression that contains 1 at a single specified index and 0 elsewhere.
Definition: Vector.hpp:2458
T ValueType
The scalar value type.
Definition: Vector.hpp:2464
void swap(UnitVector &v)
Swaps the size and unit index with v.
Definition: Vector.hpp:2589
const T & Reference
Reference type (always a const reference — elements are immutable).
Definition: Vector.hpp:2466
std::size_t SizeType
The unsigned size type.
Definition: Vector.hpp:2470
UnitVector & operator=(const UnitVector &v)
Copy-assigns the size and unit index from v.
Definition: Vector.hpp:2566
friend void swap(UnitVector &v1, UnitVector &v2)
ADL-enabled free-function form of swap().
Definition: Vector.hpp:2602
const T & ConstReference
Constant reference type to an element.
Definition: Vector.hpp:2468
ConstReference operator()(SizeType i) const
Returns a const reference to the element at index i.
Definition: Vector.hpp:2518
void resize(SizeType n)
Resizes the logical element count to n.
Definition: Vector.hpp:2580
SizeType getSize() const
Returns the logical element count.
Definition: Vector.hpp:2538
const VectorReference< const SelfType > ConstClosureType
Constant closure type used when this vector appears inside another expression.
Definition: Vector.hpp:2476
Vector< T > VectorTemporaryType
Concrete temporary vector type used by expression-template machinery.
Definition: Vector.hpp:2478
UnitVector()
Constructs an empty unit vector (size zero, index zero).
Definition: Vector.hpp:2483
UnitVector(SizeType n, SizeType i)
Constructs a unit vector of size n with the 1 entry at index i.
Definition: Vector.hpp:2491
bool isEmpty() const
Tells whether the vector has zero logical size.
Definition: Vector.hpp:2529
std::ptrdiff_t DifferenceType
The signed difference type.
Definition: Vector.hpp:2472
ConstReference operator[](SizeType i) const
Returns a const reference to the element at index i (alias for operator()).
Definition: Vector.hpp:2507
VectorReference< SelfType > ClosureType
Closure type used when this vector appears inside another expression.
Definition: Vector.hpp:2474
UnitVector(const UnitVector &v)
Constructs a copy of the unit vector v.
Definition: Vector.hpp:2498
SizeType getMaxSize() const
Returns the maximum representable element count.
Definition: Vector.hpp:2556
SizeType getIndex() const
Returns the index of the non-zero (unit) entry.
Definition: Vector.hpp:2547
Refinement of Math::VectorExpression marking the derived type as a concrete (writable) vector contain...
Definition: Expression.hpp:215
const ContainerType & operator()() const
Returns a const reference to the derived vector container.
Definition: Expression.hpp:225
CRTP base class for all vector expression types.
Definition: Expression.hpp:66
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:146
V::DifferenceType DifferenceType
The signed difference type of the wrapped vector.
Definition: Vector.hpp:80
V::ConstReference ConstReference
Constant reference type to an element.
Definition: Vector.hpp:76
V VectorType
The wrapped vector type.
Definition: Vector.hpp:68
VectorReference & assign(const VectorExpression< E > &e)
Assigns the vector expression e to the wrapped vector without intermediate temporary.
Definition: Vector.hpp:261
VectorReference & operator=(const VectorReference &r)
Copy-assigns the wrapped vector from the vector referenced by r.
Definition: Vector.hpp:183
ConstReference operator[](SizeType i) const
Returns a const reference to the element at index i (alias for operator()).
Definition: Vector.hpp:108
VectorReference & operator=(const VectorExpression< E > &e)
Assigns the vector expression e to the wrapped vector.
Definition: Vector.hpp:196
VectorReference & operator+=(const VectorExpression< E > &e)
Adds the vector expression e element-wise to the wrapped vector.
Definition: Vector.hpp:209
V::ValueType ValueType
The element value type of the wrapped vector.
Definition: Vector.hpp:70
const VectorType & getData() const
Returns a const reference to the wrapped vector.
Definition: Vector.hpp:164
SizeType getSize() const
Returns the wrapped vector's element count.
Definition: Vector.hpp:137
VectorReference & minusAssign(const VectorExpression< E > &e)
Subtracts the vector expression e from the wrapped vector without intermediate temporary.
Definition: Vector.hpp:287
V::SizeType SizeType
The unsigned size type of the wrapped vector.
Definition: Vector.hpp:78
ConstReference operator()(SizeType i) const
Returns a const reference to the element at index i.
Definition: Vector.hpp:128
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:235
VectorType & getData()
Returns a reference to the wrapped vector.
Definition: Vector.hpp:173
SelfType ClosureType
Closure type used when this proxy appears inside another expression.
Definition: Vector.hpp:82
std::conditional< std::is_const< V >::value, typename V::ConstReference, typename V::Reference >::type Reference
Mutable reference type (degrades to ConstReference when the wrapped vector is const).
Definition: Vector.hpp:74
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:248
Reference operator[](SizeType i)
Returns a mutable reference to the element at index i (alias for operator()).
Definition: Vector.hpp:98
Reference operator()(SizeType i)
Returns a mutable reference to the element at index i.
Definition: Vector.hpp:118
friend void swap(VectorReference &r1, VectorReference &r2)
ADL-enabled free-function form of swap().
Definition: Vector.hpp:307
VectorReference & operator-=(const VectorExpression< E > &e)
Subtracts the vector expression e element-wise from the wrapped vector.
Definition: Vector.hpp:222
bool isEmpty() const
Tells whether the wrapped vector is empty.
Definition: Vector.hpp:155
VectorReference(VectorType &v)
Constructs the reference proxy referring to v.
Definition: Vector.hpp:90
VectorReference & plusAssign(const VectorExpression< E > &e)
Adds the vector expression e to the wrapped vector without intermediate temporary.
Definition: Vector.hpp:274
void swap(VectorReference &r)
Swaps the contents of the two wrapped vectors.
Definition: Vector.hpp:297
const SelfType ConstClosureType
Constant closure type used when this proxy appears inside another expression.
Definition: Vector.hpp:84
Dynamically-sized dense vector with configurable underlying storage.
Definition: Vector.hpp:430
Vector & minusAssign(const VectorExpression< E > &e)
Subtracts the elements of the vector expression e from this vector without intermediate temporary.
Definition: Vector.hpp:826
Vector & minusAssign(InitializerListType l)
Subtracts the contents of the initializer list l element-wise from this vector without intermediate t...
Definition: Vector.hpp:837
ConstReference operator[](SizeType i) const
Returns a const reference to the element at index i (alias for operator()).
Definition: Vector.hpp:540
void clear(const ValueType &v=ValueType())
Sets every element of the vector to the value v.
Definition: Vector.hpp:867
Vector & plusAssign(InitializerListType l)
Adds the contents of the initializer list l element-wise to this vector without intermediate temporar...
Definition: Vector.hpp:813
Vector(Vector &&v)
Move-constructs a vector from v (v is left in a valid empty state).
Definition: Vector.hpp:501
Vector & operator-=(InitializerListType l)
Subtracts the contents of the initializer list l element-wise from this vector.
Definition: Vector.hpp:725
Vector(InitializerListType l)
Constructs the vector from a brace-initializer list l.
Definition: Vector.hpp:508
Vector & operator=(const Vector &v)
Copy-assigns the elements of v to this vector.
Definition: Vector.hpp:619
ArrayType & getData()
Returns a mutable reference to the underlying storage container.
Definition: Vector.hpp:600
Vector & operator=(Vector &&v)
Move-assigns the elements of v to this vector.
Definition: Vector.hpp:630
Vector(const ArrayType &data)
Constructs a vector that copies its data directly from the underlying-array container data.
Definition: Vector.hpp:487
Reference operator[](SizeType i)
Returns a mutable reference to the element at index i (alias for operator()).
Definition: Vector.hpp:529
const T * ConstPointer
Constant pointer type for raw element access.
Definition: Vector.hpp:450
std::enable_if< IsScalar< T1 >::value, Vector >::type & operator*=(const T1 &t)
Multiplies every element by the scalar t.
Definition: Vector.hpp:751
SizeType getSize() const
Returns the current element count.
Definition: Vector.hpp:582
const ArrayType & getData() const
Returns a const reference to the underlying storage container.
Definition: Vector.hpp:609
Vector(SizeType n)
Constructs a vector of size n with default-initialized elements.
Definition: Vector.hpp:472
std::enable_if< IsScalar< T1 >::value, Vector >::type & operator/=(const T1 &t)
Divides every element by the scalar t.
Definition: Vector.hpp:764
Vector & operator=(InitializerListType l)
Assigns the contents of the initializer list l to this vector (resizes to fit).
Definition: Vector.hpp:641
A::size_type SizeType
The unsigned size type used by the underlying storage container.
Definition: Vector.hpp:442
T ValueType
The scalar value type stored in the vector.
Definition: Vector.hpp:436
Reference operator()(SizeType i)
Returns a mutable reference to the element at index i.
Definition: Vector.hpp:551
SelfType VectorTemporaryType
Concrete temporary vector type used by expression-template machinery.
Definition: Vector.hpp:456
Vector & assign(const VectorExpression< E > &e)
Resizes this vector to match e and assigns the elements of e without intermediate temporary.
Definition: Vector.hpp:777
Vector(const VectorExpression< E > &e)
Constructs the vector from the vector expression e (materializing the expression result).
Definition: Vector.hpp:517
Vector & operator+=(InitializerListType l)
Adds the contents of the initializer list l element-wise to this vector.
Definition: Vector.hpp:689
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:737
T & Reference
Mutable reference type to an element.
Definition: Vector.hpp:438
void swap(Vector &v)
Swaps the contents of this vector with those of v.
Definition: Vector.hpp:847
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:679
Vector & operator=(const VectorContainer< C > &c)
Assigns the contents of the vector container c to this vector (no alias check needed).
Definition: Vector.hpp:653
Vector & operator=(const VectorExpression< E > &e)
Assigns the vector expression e to this vector (via a temporary to handle aliasing).
Definition: Vector.hpp:665
Vector(SizeType n, const ValueType &v)
Constructs a vector of size n with every element initialized to v.
Definition: Vector.hpp:480
bool isEmpty() const
Tells whether the vector is empty.
Definition: Vector.hpp:573
Vector & assign(InitializerListType l)
Assigns the contents of the initializer list l to this vector.
Definition: Vector.hpp:789
ConstReference operator()(SizeType i) const
Returns a const reference to the element at index i.
Definition: Vector.hpp:563
Vector(const Vector &v)
Constructs a copy of the vector v.
Definition: Vector.hpp:494
std::initializer_list< T > InitializerListType
Type of the brace-initializer list accepted by the corresponding constructor.
Definition: Vector.hpp:460
Vector & plusAssign(const VectorExpression< E > &e)
Adds the elements of the vector expression e to this vector without intermediate temporary.
Definition: Vector.hpp:802
friend void swap(Vector &v1, Vector &v2)
ADL-enabled free-function form of swap().
Definition: Vector.hpp:858
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:715
std::shared_ptr< SelfType > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated Vector instances.
Definition: Vector.hpp:458
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:701
A::difference_type DifferenceType
The signed difference type used by the underlying storage container.
Definition: Vector.hpp:444
const T & ConstReference
Constant reference type to an element.
Definition: Vector.hpp:440
A ArrayType
The underlying storage container type.
Definition: Vector.hpp:446
T * Pointer
Pointer type for raw element access.
Definition: Vector.hpp:448
void resize(SizeType n, const ValueType &v=ValueType())
Resizes the vector to n elements.
Definition: Vector.hpp:877
const VectorReference< const SelfType > ConstClosureType
Constant closure type used when this vector appears inside another expression.
Definition: Vector.hpp:454
SizeType getMaxSize() const
Returns the maximum number of elements the underlying storage container can hold.
Definition: Vector.hpp:591
Vector()
Constructs an empty vector (size zero).
Definition: Vector.hpp:465
VectorReference< SelfType > ClosureType
Closure type used when this vector appears inside another expression.
Definition: Vector.hpp:452
Constant vector expression whose elements are all zero.
Definition: Vector.hpp:2312
std::size_t SizeType
The unsigned size type.
Definition: Vector.hpp:2324
std::ptrdiff_t DifferenceType
The signed difference type.
Definition: Vector.hpp:2326
ZeroVector(SizeType n)
Constructs a zero vector of size n.
Definition: Vector.hpp:2344
Vector< T > VectorTemporaryType
Concrete temporary vector type used by expression-template machinery.
Definition: Vector.hpp:2332
const T & ConstReference
Constant reference type to the zero element.
Definition: Vector.hpp:2322
bool isEmpty() const
Tells whether the vector has zero logical size.
Definition: Vector.hpp:2381
const T & Reference
Reference type (always a const reference — all elements are zero).
Definition: Vector.hpp:2320
ZeroVector(const ZeroVector &v)
Constructs a copy of the zero vector v.
Definition: Vector.hpp:2351
ZeroVector & operator=(const ZeroVector &v)
Copy-assigns the logical size from v.
Definition: Vector.hpp:2409
ZeroVector()
Constructs an empty zero vector.
Definition: Vector.hpp:2337
friend void swap(ZeroVector &v1, ZeroVector &v2)
ADL-enabled free-function form of swap().
Definition: Vector.hpp:2439
const VectorReference< const SelfType > ConstClosureType
Constant closure type used when this vector appears inside another expression.
Definition: Vector.hpp:2330
T ValueType
The scalar value type.
Definition: Vector.hpp:2318
ConstReference operator()(SizeType i) const
Returns a const reference to the zero element.
Definition: Vector.hpp:2371
SizeType getMaxSize() const
Returns the maximum representable element count.
Definition: Vector.hpp:2399
ConstReference operator[](SizeType i) const
Returns a const reference to the zero element (alias for operator()).
Definition: Vector.hpp:2360
VectorReference< SelfType > ClosureType
Closure type used when this vector appears inside another expression.
Definition: Vector.hpp:2328
void swap(ZeroVector &v)
Swaps the logical sizes with v.
Definition: Vector.hpp:2428
SizeType getSize() const
Returns the logical element count.
Definition: Vector.hpp:2390
void resize(SizeType n)
Resizes the logical element count to n.
Definition: Vector.hpp:2419
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:2977
CVector< float, 2 > Vector2F
Bounded 2 element vector holding floating point values of type float.
Definition: Vector.hpp:2917
QuaternionVectorAdapter< E > vec(QuaternionExpression< E > &e)
Creates a mutable Math::QuaternionVectorAdapter view of the quaternion expression e.
Definition: QuaternionAdapter.hpp:372
SparseVector< unsigned long > SparseULVector
Unbounded sparse vector holding unsigned integers of type unsigned long.
Definition: Vector.hpp:3017
CVector< double, 7 > Vector7D
Bounded 7 element vector holding floating point values of type double.
Definition: Vector.hpp:2947
SparseVector< float > SparseFVector
Unbounded sparse vector holding floating point values of type float.
Definition: Vector.hpp:3002
UnitVector< unsigned long > ULUnitVector
Memory-efficient immutable unit vector with element values of type unsigned long.
Definition: Vector.hpp:2912
UnitVector< float > FUnitVector
Memory-efficient immutable unit vector with element values of type float.
Definition: Vector.hpp:2897
CVector< double, 4 > Vector4D
Bounded 4 element vector holding floating point values of type double.
Definition: Vector.hpp:2942
SparseVector< long > SparseLVector
Unbounded sparse vector holding signed integers of type long.
Definition: Vector.hpp:3012
ScalarVector< double > DScalarVector
Memory-efficient immutable vector where all elements have the same value of type double.
Definition: Vector.hpp:2862
CVector< float, 4 > Vector4F
Bounded 4 element vector holding floating point values of type float.
Definition: Vector.hpp:2927
CVector< double, 2 > Vector2D
Bounded 2 element vector holding floating point values of type double.
Definition: Vector.hpp:2932
Vector< float > FVector
Unbounded dense vector holding floating point values of type float.
Definition: Vector.hpp:2982
Vector< double > DVector
Unbounded dense vector holding floating point values of type double.
Definition: Vector.hpp:2987
CVector< double, 3 > Vector3D
Bounded 3 element vector holding floating point values of type double.
Definition: Vector.hpp:2937
UnitVector< double > DUnitVector
Memory-efficient immutable unit vector with element values of type double.
Definition: Vector.hpp:2902
UnitVector< long > LUnitVector
Memory-efficient immutable unit vector with element values of type long.
Definition: Vector.hpp:2907
ZeroVector< long > LZeroVector
Memory-efficient immutable vector where all elements have the value zero of type long.
Definition: Vector.hpp:2887
ScalarVector< long > LScalarVector
Memory-efficient immutable vector where all elements have the same value of type long.
Definition: Vector.hpp:2867
ScalarVector< unsigned long > ULScalarVector
Memory-efficient immutable vector where all elements have the same value of type unsigned long.
Definition: Vector.hpp:2872
ZeroVector< unsigned long > ULZeroVector
Memory-efficient immutable vector where all elements have the value zero of type unsigned long.
Definition: Vector.hpp:2892
CVector< float, 3 > Vector3F
Bounded 3 element vector holding floating point values of type float.
Definition: Vector.hpp:2922
Vector< unsigned long > ULVector
Unbounded dense vector holding unsigned integers of type unsigned long.
Definition: Vector.hpp:2997
CVector< long, 4 > Vector4L
Bounded 4 element vector holding signed integers of type long.
Definition: Vector.hpp:2962
ZeroVector< double > DZeroVector
Memory-efficient immutable vector where all elements have the value zero of type double.
Definition: Vector.hpp:2882
CVector< unsigned long, 2 > Vector2UL
Bounded 2 element vector holding unsigned integers of type unsigned long.
Definition: Vector.hpp:2967
CVector< long, 3 > Vector3L
Bounded 3 element vector holding signed integers of type long.
Definition: Vector.hpp:2957
CVector< long, 2 > Vector2L
Bounded 2 element vector holding signed integers of type long.
Definition: Vector.hpp:2952
ZeroVector< float > FZeroVector
Memory-efficient immutable vector where all elements have the value zero of type float.
Definition: Vector.hpp:2877
SparseVector< double > SparseDVector
Unbounded sparse vector holding floating point values of type double.
Definition: Vector.hpp:3007
ScalarVector< float > FScalarVector
Memory-efficient immutable vector where all elements have the same value of type float.
Definition: Vector.hpp:2857
Vector< long > LVector
Unbounded dense vector holding signed integers of type long.
Definition: Vector.hpp:2992
CVector< unsigned long, 3 > Vector3UL
Bounded 3 element vector holding unsigned integers of type unsigned long.
Definition: Vector.hpp:2972
The namespace of the Chemical Data Processing Library.
Selects a concrete temporary vector type compatible with the vector expression V.
Definition: TypeTraits.hpp:301