27 #ifndef CDPL_MATH_MATRIXPROXY_HPP
28 #define CDPL_MATH_MATRIXPROXY_HPP
30 #include <type_traits>
86 typedef typename std::conditional<std::is_const<M>::value,
87 typename M::ConstReference,
93 typedef typename std::conditional<std::is_const<M>::value,
94 typename M::ConstClosureType,
122 return data(index, i);
132 return data(index, i);
142 return data(index, i);
152 return data(index, i);
170 return data.getSize2();
179 return (data.getSize2() == 0);
217 template <
typename E>
230 template <
typename E>
243 template <
typename E>
256 template <
typename T>
259 vectorAssignScalar<ScalarMultiplicationAssignment>(*
this, t);
269 template <
typename T>
272 vectorAssignScalar<ScalarDivisionAssignment>(*
this, t);
282 template <
typename E>
285 vectorAssignVector<ScalarAssignment>(*
this, e);
295 template <
typename E>
298 vectorAssignVector<ScalarAdditionAssignment>(*
this, e);
308 template <
typename E>
311 vectorAssignVector<ScalarSubtractionAssignment>(*
this, e);
344 template <
typename M>
379 typedef typename std::conditional<std::is_const<M>::value,
380 typename M::ConstReference,
386 typedef typename std::conditional<std::is_const<M>::value,
387 typename M::ConstClosureType,
415 return data(i, index);
425 return data(i, index);
435 return data(i, index);
445 return data(i, index);
463 return data.getSize1();
472 return (data.getSize1() == 0);
510 template <
typename E>
523 template <
typename E>
536 template <
typename E>
549 template <
typename T>
552 vectorAssignScalar<ScalarMultiplicationAssignment>(*
this, t);
562 template <
typename T>
565 vectorAssignScalar<ScalarDivisionAssignment>(*
this, t);
575 template <
typename E>
578 vectorAssignVector<ScalarAssignment>(*
this, e);
588 template <
typename E>
591 vectorAssignVector<ScalarAdditionAssignment>(*
this, e);
601 template <
typename E>
604 vectorAssignVector<ScalarSubtractionAssignment>(*
this, e);
637 template <
typename M>
672 typedef typename std::conditional<std::is_const<M>::value,
673 typename M::ConstReference,
679 typedef typename std::conditional<std::is_const<M>::value,
680 typename M::ConstClosureType,
705 data(
m), range1(r1), range2(r2) {}
715 return data(range1(i), range2(j));
726 return data(range1(i), range2(j));
809 template <
typename E>
822 template <
typename E>
835 template <
typename E>
848 template <
typename T>
851 matrixAssignScalar<ScalarMultiplicationAssignment>(*
this, t);
861 template <
typename T>
864 matrixAssignScalar<ScalarDivisionAssignment>(*
this, t);
874 template <
typename E>
877 matrixAssignMatrix<ScalarAssignment>(*
this, e);
887 template <
typename E>
890 matrixAssignMatrix<ScalarAdditionAssignment>(*
this, e);
900 template <
typename E>
903 matrixAssignMatrix<ScalarSubtractionAssignment>(*
this, e);
937 template <
typename M>
972 typedef typename std::conditional<std::is_const<M>::value,
973 typename M::ConstReference,
979 typedef typename std::conditional<std::is_const<M>::value,
980 typename M::ConstClosureType,
1005 data(
m), slice1(s1), slice2(s2) {}
1015 return data(slice1(i), slice2(j));
1026 return data(slice1(i), slice2(j));
1127 template <
typename E>
1140 template <
typename E>
1153 template <
typename E>
1166 template <
typename T>
1169 matrixAssignScalar<ScalarMultiplicationAssignment>(*
this, t);
1179 template <
typename T>
1182 matrixAssignScalar<ScalarDivisionAssignment>(*
this, t);
1192 template <
typename E>
1195 matrixAssignMatrix<ScalarAssignment>(*
this, e);
1205 template <
typename E>
1208 matrixAssignMatrix<ScalarAdditionAssignment>(*
this, e);
1218 template <
typename E>
1221 matrixAssignMatrix<ScalarSubtractionAssignment>(*
this, e);
1254 template <
typename M>
1261 template <
typename M>
1268 template <
typename M>
1275 template <
typename M>
1282 template <
typename M>
1289 template <
typename M>
1296 template <
typename M>
1303 template <
typename M>
1310 template <
typename M>
1317 template <
typename M>
1324 template <
typename M>
1331 template <
typename M>
1338 template <
typename M>
1345 template <
typename M>
1352 template <
typename M>
1359 template <
typename M>
1370 template <
typename M>
1384 template <
typename M>
1398 template <
typename M>
1412 template <
typename M>
1413 MatrixColumn<const M>
1427 template <
typename E>
1444 template <
typename E>
1445 MatrixRange<const E>
1463 template <
typename E>
1473 return MatrixRange<E>(e(), RangeType(start1, stop1), RangeType(start2, stop2));
1486 template <
typename E>
1487 MatrixRange<const E>
1507 template <
typename E>
1524 template <
typename E>
1525 MatrixSlice<const E>
1545 template <
typename E>
1557 return MatrixSlice<E>(e(), SliceType(start1, stride1, size1), SliceType(start2, stride2, size2));
1572 template <
typename E>
1573 MatrixSlice<const E>
1584 return MatrixSlice<const E>(e(), SliceType(start1, stride1, size1), SliceType(start2, stride2, size2));
Definition of basic expression types.
Definition of various functors.
Implementation of matrix assignment routines.
Definition of a data type for describing index ranges.
Definition of a data type for describing index slices.
Definition of type traits.
Implementation of vector assignment routines.
Vector expression proxy that views a single column of an underlying matrix.
Definition: MatrixProxy.hpp:346
friend void swap(MatrixColumn &c1, MatrixColumn &c2)
ADL-enabled free-function form of swap().
Definition: MatrixProxy.hpp:623
M::ConstReference ConstReference
Constant element reference type.
Definition: MatrixProxy.hpp:374
MatrixColumn & operator+=(const VectorExpression< E > &e)
Adds the elements of the vector expression e to this column (via a temporary to handle aliasing).
Definition: MatrixProxy.hpp:524
MatrixColumn & assign(const VectorExpression< E > &e)
Assigns the elements of the vector expression e to this column without intermediate temporary.
Definition: MatrixProxy.hpp:576
std::conditional< std::is_const< M >::value, typename M::ConstReference, typename M::Reference >::type Reference
Mutable element reference type (degrades to ConstReference when the wrapped matrix is const).
Definition: MatrixProxy.hpp:381
ConstReference operator[](SizeType i) const
Returns a const reference to the element at row i of the column.
Definition: MatrixProxy.hpp:443
std::enable_if< IsScalar< T >::value, MatrixColumn >::type & operator*=(const T &t)
Multiplies every element of this column by the scalar t.
Definition: MatrixProxy.hpp:550
SelfType ClosureType
Closure type used when this proxy appears inside another expression.
Definition: MatrixProxy.hpp:398
void swap(MatrixColumn &c)
Swaps the contents of this column with those of c (via element-wise swap of the underlying matrix ele...
Definition: MatrixProxy.hpp:612
M::SizeType SizeType
The size type used by the wrapped matrix.
Definition: MatrixProxy.hpp:359
MatrixColumn & operator=(const MatrixColumn &c)
Copy-assigns the contents of c to this column (via a temporary to handle aliasing).
Definition: MatrixProxy.hpp:498
MatrixColumn & plusAssign(const VectorExpression< E > &e)
Adds the elements of the vector expression e to this column without intermediate temporary.
Definition: MatrixProxy.hpp:589
SizeType getIndex() const
Returns the column index this proxy refers to within the wrapped matrix.
Definition: MatrixProxy.hpp:452
MatrixColumn & operator=(const VectorExpression< E > &e)
Assigns the elements of the vector expression e to this column (via a temporary to handle aliasing).
Definition: MatrixProxy.hpp:511
ConstReference operator()(SizeType i) const
Returns a const reference to the element at row i of the column.
Definition: MatrixProxy.hpp:423
MatrixColumn & minusAssign(const VectorExpression< E > &e)
Subtracts the elements of the vector expression e from this column without intermediate temporary.
Definition: MatrixProxy.hpp:602
const SelfType ConstClosureType
Constant closure type used when this proxy appears inside another expression.
Definition: MatrixProxy.hpp:393
MatrixColumn(MatrixType &m, SizeType i)
Constructs the column proxy viewing column i of m.
Definition: MatrixProxy.hpp:405
Reference operator[](SizeType i)
Returns a mutable reference to the element at row i of the column.
Definition: MatrixProxy.hpp:433
M MatrixType
The wrapped matrix type.
Definition: MatrixProxy.hpp:354
M::ValueType ValueType
The element value type of the wrapped matrix.
Definition: MatrixProxy.hpp:369
const MatrixClosureType & getData() const
Returns a const reference to the wrapped matrix (via its stored closure).
Definition: MatrixProxy.hpp:488
std::conditional< std::is_const< M >::value, typename M::ConstClosureType, typename M::ClosureType >::type MatrixClosureType
Closure type used to store the wrapped matrix internally.
Definition: MatrixProxy.hpp:388
MatrixClosureType & getData()
Returns a reference to the wrapped matrix (via its stored closure).
Definition: MatrixProxy.hpp:479
bool isEmpty() const
Tells whether the column is empty (the wrapped matrix has zero rows).
Definition: MatrixProxy.hpp:470
SizeType getSize() const
Returns the size of the column (number of rows of the wrapped matrix).
Definition: MatrixProxy.hpp:461
M::DifferenceType DifferenceType
The signed difference type used by the wrapped matrix.
Definition: MatrixProxy.hpp:364
std::enable_if< IsScalar< T >::value, MatrixColumn >::type & operator/=(const T &t)
Divides every element of this column by the scalar t.
Definition: MatrixProxy.hpp:563
Reference operator()(SizeType i)
Returns a mutable reference to the element at row i of the column.
Definition: MatrixProxy.hpp:413
MatrixColumn & operator-=(const VectorExpression< E > &e)
Subtracts the elements of the vector expression e from this column (via a temporary to handle aliasin...
Definition: MatrixProxy.hpp:537
CRTP base class of all matrix expression types.
Definition: Expression.hpp:108
Matrix expression proxy that views a contiguous rectangular subrange of an underlying matrix.
Definition: MatrixProxy.hpp:639
M::SizeType SizeType
The size type used by the wrapped matrix.
Definition: MatrixProxy.hpp:652
MatrixRange & operator=(const MatrixRange &r)
Copy-assigns the contents of r to this matrix range (via a temporary to handle aliasing).
Definition: MatrixProxy.hpp:797
const MatrixClosureType & getData() const
Returns a const reference to the wrapped matrix (via its stored closure).
Definition: MatrixProxy.hpp:787
std::conditional< std::is_const< M >::value, typename M::ConstReference, typename M::Reference >::type Reference
Mutable element reference type (degrades to ConstReference when the wrapped matrix is const).
Definition: MatrixProxy.hpp:674
std::conditional< std::is_const< M >::value, typename M::ConstClosureType, typename M::ClosureType >::type MatrixClosureType
Closure type used to store the wrapped matrix internally.
Definition: MatrixProxy.hpp:681
MatrixRange & operator-=(const MatrixExpression< E > &e)
Subtracts the elements of the matrix expression e from this matrix range (via a temporary to handle a...
Definition: MatrixProxy.hpp:836
SizeType getStart1() const
Returns the row index range's start index in the wrapped matrix.
Definition: MatrixProxy.hpp:733
SizeType getSize2() const
Returns the number of columns in the proxy (size of the column range).
Definition: MatrixProxy.hpp:760
M MatrixType
The wrapped matrix type.
Definition: MatrixProxy.hpp:647
MatrixRange & assign(const MatrixExpression< E > &e)
Assigns the elements of the matrix expression e to this matrix range without intermediate temporary.
Definition: MatrixProxy.hpp:875
MatrixRange & operator+=(const MatrixExpression< E > &e)
Adds the elements of the matrix expression e to this matrix range (via a temporary to handle aliasing...
Definition: MatrixProxy.hpp:823
SizeType getStart2() const
Returns the column index range's start index in the wrapped matrix.
Definition: MatrixProxy.hpp:742
Range< SizeType > RangeType
Range type used to specify the row and column index ranges.
Definition: MatrixProxy.hpp:696
M::ConstReference ConstReference
Constant element reference type.
Definition: MatrixProxy.hpp:667
M::ValueType ValueType
The element value type of the wrapped matrix.
Definition: MatrixProxy.hpp:662
friend void swap(MatrixRange &r1, MatrixRange &r2)
ADL-enabled free-function form of swap().
Definition: MatrixProxy.hpp:922
ConstReference operator()(SizeType i, SizeType j) const
Returns a const reference to the element at proxy index (i, j).
Definition: MatrixProxy.hpp:724
Reference operator()(SizeType i, SizeType j)
Returns a mutable reference to the element at proxy index (i, j).
Definition: MatrixProxy.hpp:713
M::DifferenceType DifferenceType
The signed difference type used by the wrapped matrix.
Definition: MatrixProxy.hpp:657
SelfType ClosureType
Closure type used when this proxy appears inside another expression.
Definition: MatrixProxy.hpp:691
SizeType getSize1() const
Returns the number of rows in the proxy (size of the row range).
Definition: MatrixProxy.hpp:751
void swap(MatrixRange &r)
Swaps the contents of this matrix range with those of r (via element-wise swap of the underlying matr...
Definition: MatrixProxy.hpp:911
std::enable_if< IsScalar< T >::value, MatrixRange >::type & operator*=(const T &t)
Multiplies every element of this matrix range by the scalar t.
Definition: MatrixProxy.hpp:849
std::enable_if< IsScalar< T >::value, MatrixRange >::type & operator/=(const T &t)
Divides every element of this matrix range by the scalar t.
Definition: MatrixProxy.hpp:862
MatrixRange & plusAssign(const MatrixExpression< E > &e)
Adds the elements of the matrix expression e to this matrix range without intermediate temporary.
Definition: MatrixProxy.hpp:888
bool isEmpty() const
Tells whether the proxy is empty (either range has size zero).
Definition: MatrixProxy.hpp:769
MatrixRange & operator=(const MatrixExpression< E > &e)
Assigns the elements of the matrix expression e to this matrix range (via a temporary to handle alias...
Definition: MatrixProxy.hpp:810
const SelfType ConstClosureType
Constant closure type used when this proxy appears inside another expression.
Definition: MatrixProxy.hpp:686
MatrixClosureType & getData()
Returns a reference to the wrapped matrix (via its stored closure).
Definition: MatrixProxy.hpp:778
MatrixRange(MatrixType &m, const RangeType &r1, const RangeType &r2)
Constructs the matrix range proxy viewing rows in r1 and columns in r2 of m.
Definition: MatrixProxy.hpp:704
MatrixRange & minusAssign(const MatrixExpression< E > &e)
Subtracts the elements of the matrix expression e from this matrix range without intermediate tempora...
Definition: MatrixProxy.hpp:901
Vector expression proxy that views a single row of an underlying matrix.
Definition: MatrixProxy.hpp:53
MatrixRow & operator=(const MatrixRow &r)
Copy-assigns the contents of r to this row (via a temporary to handle aliasing).
Definition: MatrixProxy.hpp:205
std::conditional< std::is_const< M >::value, typename M::ConstReference, typename M::Reference >::type Reference
Mutable element reference type (degrades to ConstReference when the wrapped matrix is const).
Definition: MatrixProxy.hpp:88
MatrixRow & operator+=(const VectorExpression< E > &e)
Adds the elements of the vector expression e to this row (via a temporary to handle aliasing).
Definition: MatrixProxy.hpp:231
M::DifferenceType DifferenceType
The signed difference type used by the wrapped matrix.
Definition: MatrixProxy.hpp:71
std::conditional< std::is_const< M >::value, typename M::ConstClosureType, typename M::ClosureType >::type MatrixClosureType
Closure type used to store the wrapped matrix internally (mutable or const flavor).
Definition: MatrixProxy.hpp:95
M MatrixType
The wrapped matrix type.
Definition: MatrixProxy.hpp:61
ConstReference operator[](SizeType i) const
Returns a const reference to the element at column i of the row.
Definition: MatrixProxy.hpp:150
MatrixRow & assign(const VectorExpression< E > &e)
Assigns the elements of the vector expression e to this row without intermediate temporary.
Definition: MatrixProxy.hpp:283
MatrixRow & operator=(const VectorExpression< E > &e)
Assigns the elements of the vector expression e to this row (via a temporary to handle aliasing).
Definition: MatrixProxy.hpp:218
std::enable_if< IsScalar< T >::value, MatrixRow >::type & operator*=(const T &t)
Multiplies every element of this row by the scalar t.
Definition: MatrixProxy.hpp:257
MatrixRow(MatrixType &m, SizeType i)
Constructs the row proxy viewing row i of m.
Definition: MatrixProxy.hpp:112
const MatrixClosureType & getData() const
Returns a const reference to the wrapped matrix (via its stored closure).
Definition: MatrixProxy.hpp:195
M::ConstReference ConstReference
Constant element reference type.
Definition: MatrixProxy.hpp:81
SizeType getSize() const
Returns the size of the row (number of columns of the wrapped matrix).
Definition: MatrixProxy.hpp:168
ConstReference operator()(SizeType i) const
Returns a const reference to the element at column i of the row.
Definition: MatrixProxy.hpp:130
MatrixRow & operator-=(const VectorExpression< E > &e)
Subtracts the elements of the vector expression e from this row (via a temporary to handle aliasing).
Definition: MatrixProxy.hpp:244
M::SizeType SizeType
The size type used by the wrapped matrix.
Definition: MatrixProxy.hpp:66
Reference operator()(SizeType i)
Returns a mutable reference to the element at column i of the row.
Definition: MatrixProxy.hpp:120
void swap(MatrixRow &r)
Swaps the contents of this row with those of r (via element-wise swap of the underlying matrix elemen...
Definition: MatrixProxy.hpp:319
SizeType getIndex() const
Returns the row index this proxy refers to within the wrapped matrix.
Definition: MatrixProxy.hpp:159
const SelfType ConstClosureType
Constant closure type used when this proxy appears inside another expression.
Definition: MatrixProxy.hpp:100
M::ValueType ValueType
The element value type of the wrapped matrix.
Definition: MatrixProxy.hpp:76
MatrixRow & minusAssign(const VectorExpression< E > &e)
Subtracts the elements of the vector expression e from this row without intermediate temporary.
Definition: MatrixProxy.hpp:309
friend void swap(MatrixRow &r1, MatrixRow &r2)
ADL-enabled free-function form of swap().
Definition: MatrixProxy.hpp:330
SelfType ClosureType
Closure type used when this proxy appears inside another expression.
Definition: MatrixProxy.hpp:105
MatrixClosureType & getData()
Returns a reference to the wrapped matrix (via its stored closure).
Definition: MatrixProxy.hpp:186
bool isEmpty() const
Tells whether the row is empty (the wrapped matrix has zero columns).
Definition: MatrixProxy.hpp:177
std::enable_if< IsScalar< T >::value, MatrixRow >::type & operator/=(const T &t)
Divides every element of this row by the scalar t.
Definition: MatrixProxy.hpp:270
MatrixRow & plusAssign(const VectorExpression< E > &e)
Adds the elements of the vector expression e to this row without intermediate temporary.
Definition: MatrixProxy.hpp:296
Reference operator[](SizeType i)
Returns a mutable reference to the element at column i of the row.
Definition: MatrixProxy.hpp:140
Matrix expression proxy that views a strided rectangular slice of an underlying matrix.
Definition: MatrixProxy.hpp:939
const SelfType ConstClosureType
Constant closure type used when this proxy appears inside another expression.
Definition: MatrixProxy.hpp:986
SizeType getSize2() const
Returns the number of columns in the proxy (size of the column slice).
Definition: MatrixProxy.hpp:1078
MatrixSlice & operator=(const MatrixSlice &s)
Copy-assigns the contents of s to this matrix slice (via a temporary to handle aliasing).
Definition: MatrixProxy.hpp:1115
MatrixSlice & operator-=(const MatrixExpression< E > &e)
Subtracts the elements of the matrix expression e from this matrix slice (via a temporary to handle a...
Definition: MatrixProxy.hpp:1154
MatrixClosureType & getData()
Returns a reference to the wrapped matrix (via its stored closure).
Definition: MatrixProxy.hpp:1096
std::enable_if< IsScalar< T >::value, MatrixSlice >::type & operator*=(const T &t)
Multiplies every element of this matrix slice by the scalar t.
Definition: MatrixProxy.hpp:1167
MatrixSlice & operator=(const MatrixExpression< E > &e)
Assigns the elements of the matrix expression e to this matrix slice (via a temporary to handle alias...
Definition: MatrixProxy.hpp:1128
MatrixSlice & assign(const MatrixExpression< E > &e)
Assigns the elements of the matrix expression e to this matrix slice without intermediate temporary.
Definition: MatrixProxy.hpp:1193
SizeType getStart2() const
Returns the column slice's start index in the wrapped matrix.
Definition: MatrixProxy.hpp:1042
Slice< SizeType, DifferenceType > SliceType
Slice type used to specify the row and column slices (start, stride, size).
Definition: MatrixProxy.hpp:996
friend void swap(MatrixSlice &s1, MatrixSlice &s2)
ADL-enabled free-function form of swap().
Definition: MatrixProxy.hpp:1240
M::DifferenceType DifferenceType
The signed difference type used by the wrapped matrix.
Definition: MatrixProxy.hpp:957
const MatrixClosureType & getData() const
Returns a const reference to the wrapped matrix (via its stored closure).
Definition: MatrixProxy.hpp:1105
M MatrixType
The wrapped matrix type.
Definition: MatrixProxy.hpp:947
MatrixSlice(MatrixType &m, const SliceType &s1, const SliceType &s2)
Constructs the matrix slice proxy viewing rows in s1 and columns in s2 of m.
Definition: MatrixProxy.hpp:1004
Reference operator()(SizeType i, SizeType j)
Returns a mutable reference to the element at proxy index (i, j).
Definition: MatrixProxy.hpp:1013
M::ConstReference ConstReference
Constant element reference type.
Definition: MatrixProxy.hpp:967
MatrixSlice & plusAssign(const MatrixExpression< E > &e)
Adds the elements of the matrix expression e to this matrix slice without intermediate temporary.
Definition: MatrixProxy.hpp:1206
M::ValueType ValueType
The element value type of the wrapped matrix.
Definition: MatrixProxy.hpp:962
void swap(MatrixSlice &s)
Swaps the contents of this matrix slice with those of s (via element-wise swap of the underlying matr...
Definition: MatrixProxy.hpp:1229
M::SizeType SizeType
The size type used by the wrapped matrix.
Definition: MatrixProxy.hpp:952
bool isEmpty() const
Tells whether the proxy is empty (either slice has size zero).
Definition: MatrixProxy.hpp:1087
DifferenceType getStride1() const
Returns the row slice's stride in the wrapped matrix.
Definition: MatrixProxy.hpp:1051
std::conditional< std::is_const< M >::value, typename M::ConstClosureType, typename M::ClosureType >::type MatrixClosureType
Closure type used to store the wrapped matrix internally.
Definition: MatrixProxy.hpp:981
SizeType getSize1() const
Returns the number of rows in the proxy (size of the row slice).
Definition: MatrixProxy.hpp:1069
SizeType getStart1() const
Returns the row slice's start index in the wrapped matrix.
Definition: MatrixProxy.hpp:1033
DifferenceType getStride2() const
Returns the column slice's stride in the wrapped matrix.
Definition: MatrixProxy.hpp:1060
MatrixSlice & operator+=(const MatrixExpression< E > &e)
Adds the elements of the matrix expression e to this matrix slice (via a temporary to handle aliasing...
Definition: MatrixProxy.hpp:1141
MatrixSlice & minusAssign(const MatrixExpression< E > &e)
Subtracts the elements of the matrix expression e from this matrix slice without intermediate tempora...
Definition: MatrixProxy.hpp:1219
ConstReference operator()(SizeType i, SizeType j) const
Returns a const reference to the element at proxy index (i, j).
Definition: MatrixProxy.hpp:1024
std::enable_if< IsScalar< T >::value, MatrixSlice >::type & operator/=(const T &t)
Divides every element of this matrix slice by the scalar t.
Definition: MatrixProxy.hpp:1180
std::conditional< std::is_const< M >::value, typename M::ConstReference, typename M::Reference >::type Reference
Mutable element reference type (degrades to ConstReference when the wrapped matrix is const).
Definition: MatrixProxy.hpp:974
SelfType ClosureType
Closure type used when this proxy appears inside another expression.
Definition: MatrixProxy.hpp:991
SizeType getStart() const
Returns the lower (inclusive) bound.
Definition: Range.hpp:93
SizeType getSize() const
Returns the size of the range.
Definition: Range.hpp:111
SizeType SizeType
The integral size/index type.
Definition: Range.hpp:57
SizeType SizeType
The integral size/index type.
Definition: Slice.hpp:62
SizeType getStart() const
Returns the starting global index.
Definition: Slice.hpp:104
SizeType getSize() const
Returns the number of entries in the slice.
Definition: Slice.hpp:122
DifferenceType getStride() const
Returns the signed step size between consecutive entries.
Definition: Slice.hpp:113
DifferenceType DifferenceType
The signed difference type used for the stride.
Definition: Slice.hpp:67
CRTP base class of all vector expression types.
Definition: Expression.hpp:68
constexpr unsigned int M
Generic type that covers any element that is a metal.
Definition: AtomType.hpp:657
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
constexpr unsigned int s
Specifies that the stereocenter has s configuration.
Definition: CIPDescriptor.hpp:81
constexpr unsigned int m
Specifies that the stereocenter has m configuration.
Definition: CIPDescriptor.hpp:116
MatrixSlice< E > slice(MatrixExpression< E > &e, const typename MatrixSlice< E >::SliceType &s1, const typename MatrixSlice< E >::SliceType &s2)
Returns a mutable matrix slice proxy viewing the strided rectangular slice (s1, s2) of e.
Definition: MatrixProxy.hpp:1509
MatrixColumn< M > column(MatrixExpression< M > &e, typename MatrixColumn< M >::SizeType j)
Returns a mutable column proxy for column j of the matrix expression e.
Definition: MatrixProxy.hpp:1400
MatrixRow< M > row(MatrixExpression< M > &e, typename MatrixRow< M >::SizeType i)
Returns a mutable row proxy for row i of the matrix expression e.
Definition: MatrixProxy.hpp:1372
void vectorSwap(V &v, VectorExpression< E > &e)
Swaps the elements of two equally sized vector expressions element by element.
Definition: VectorAssignment.hpp:97
MatrixRange< E > range(MatrixExpression< E > &e, const typename MatrixRange< E >::RangeType &r1, const typename MatrixRange< E >::RangeType &r2)
Returns a mutable matrix range proxy viewing rows in r1 and columns in r2 of e.
Definition: MatrixProxy.hpp:1429
void matrixSwap(M &m, MatrixExpression< E > &e)
Swaps the elements of two equally sized matrix expressions element by element.
Definition: MatrixAssignment.hpp:101
The namespace of the Chemical Data Processing Library.
Selects a concrete temporary matrix type compatible with the matrix expression M.
Definition: TypeTraits.hpp:337
M::MatrixTemporaryType Type
The concrete temporary matrix type compatible with the matrix expression M.
Definition: TypeTraits.hpp:342
Selects a concrete temporary vector type compatible with the vector expression V.
Definition: TypeTraits.hpp:323