27 #ifndef CDPL_MATH_MATRIXPROXY_HPP
28 #define CDPL_MATH_MATRIXPROXY_HPP
30 #include <type_traits>
69 typedef typename std::conditional<std::is_const<M>::value,
70 typename M::ConstReference,
73 typedef typename std::conditional<std::is_const<M>::value,
74 typename M::ConstClosureType,
96 return data(index, i);
106 return data(index, i);
116 return data(index, i);
126 return data(index, i);
144 return data.getSize2();
153 return (data.getSize2() == 0);
191 template <
typename E>
204 template <
typename E>
217 template <
typename E>
230 template <
typename T>
233 vectorAssignScalar<ScalarMultiplicationAssignment>(*
this, t);
243 template <
typename T>
246 vectorAssignScalar<ScalarDivisionAssignment>(*
this, t);
256 template <
typename E>
259 vectorAssignVector<ScalarAssignment>(*
this, e);
269 template <
typename E>
272 vectorAssignVector<ScalarAdditionAssignment>(*
this, e);
282 template <
typename E>
285 vectorAssignVector<ScalarSubtractionAssignment>(*
this, e);
318 template <
typename M>
336 typedef typename std::conditional<std::is_const<M>::value,
337 typename M::ConstReference,
340 typedef typename std::conditional<std::is_const<M>::value,
341 typename M::ConstClosureType,
363 return data(i, index);
373 return data(i, index);
383 return data(i, index);
393 return data(i, index);
411 return data.getSize1();
420 return (data.getSize1() == 0);
458 template <
typename E>
471 template <
typename E>
484 template <
typename E>
497 template <
typename T>
500 vectorAssignScalar<ScalarMultiplicationAssignment>(*
this, t);
510 template <
typename T>
513 vectorAssignScalar<ScalarDivisionAssignment>(*
this, t);
523 template <
typename E>
526 vectorAssignVector<ScalarAssignment>(*
this, e);
536 template <
typename E>
539 vectorAssignVector<ScalarAdditionAssignment>(*
this, e);
549 template <
typename E>
552 vectorAssignVector<ScalarSubtractionAssignment>(*
this, e);
585 template <
typename M>
603 typedef typename std::conditional<std::is_const<M>::value,
604 typename M::ConstReference,
607 typedef typename std::conditional<std::is_const<M>::value,
608 typename M::ConstClosureType,
624 data(
m), range1(r1), range2(r2) {}
634 return data(range1(i), range2(j));
645 return data(range1(i), range2(j));
728 template <
typename E>
741 template <
typename E>
754 template <
typename E>
767 template <
typename T>
770 matrixAssignScalar<ScalarMultiplicationAssignment>(*
this, t);
780 template <
typename T>
783 matrixAssignScalar<ScalarDivisionAssignment>(*
this, t);
793 template <
typename E>
796 matrixAssignMatrix<ScalarAssignment>(*
this, e);
806 template <
typename E>
809 matrixAssignMatrix<ScalarAdditionAssignment>(*
this, e);
819 template <
typename E>
822 matrixAssignMatrix<ScalarSubtractionAssignment>(*
this, e);
856 template <
typename M>
874 typedef typename std::conditional<std::is_const<M>::value,
875 typename M::ConstReference,
878 typedef typename std::conditional<std::is_const<M>::value,
879 typename M::ConstClosureType,
895 data(
m), slice1(s1), slice2(s2) {}
905 return data(slice1(i), slice2(j));
916 return data(slice1(i), slice2(j));
1017 template <
typename E>
1030 template <
typename E>
1043 template <
typename E>
1056 template <
typename T>
1059 matrixAssignScalar<ScalarMultiplicationAssignment>(*
this, t);
1069 template <
typename T>
1072 matrixAssignScalar<ScalarDivisionAssignment>(*
this, t);
1082 template <
typename E>
1085 matrixAssignMatrix<ScalarAssignment>(*
this, e);
1095 template <
typename E>
1098 matrixAssignMatrix<ScalarAdditionAssignment>(*
this, e);
1108 template <
typename E>
1111 matrixAssignMatrix<ScalarSubtractionAssignment>(*
this, e);
1142 template <
typename M>
1147 template <
typename M>
1152 template <
typename M>
1157 template <
typename M>
1162 template <
typename M>
1167 template <
typename M>
1172 template <
typename M>
1177 template <
typename M>
1182 template <
typename M>
1187 template <
typename M>
1192 template <
typename M>
1197 template <
typename M>
1202 template <
typename M>
1207 template <
typename M>
1212 template <
typename M>
1217 template <
typename M>
1228 template <
typename M>
1243 template <
typename M>
1257 template <
typename M>
1271 template <
typename M>
1272 MatrixColumn<const M>
1286 template <
typename E>
1303 template <
typename E>
1304 MatrixRange<const E>
1322 template <
typename E>
1332 return MatrixRange<E>(e(), RangeType(start1, stop1), RangeType(start2, stop2));
1345 template <
typename E>
1346 MatrixRange<const E>
1366 template <
typename E>
1383 template <
typename E>
1384 MatrixSlice<const E>
1404 template <
typename E>
1416 return MatrixSlice<E>(e(), SliceType(start1, stride1, size1), SliceType(start2, stride2, size2));
1431 template <
typename E>
1432 MatrixSlice<const E>
1443 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:320
friend void swap(MatrixColumn &c1, MatrixColumn &c2)
ADL-enabled free-function form of swap().
Definition: MatrixProxy.hpp:571
M::ConstReference ConstReference
Constant reference type to an element.
Definition: MatrixProxy.hpp:334
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:472
MatrixColumn & assign(const VectorExpression< E > &e)
Assigns the elements of the vector expression e to this column without intermediate temporary.
Definition: MatrixProxy.hpp:524
std::conditional< std::is_const< M >::value, typename M::ConstReference, typename M::Reference >::type Reference
Mutable reference type (degrades to ConstReference when the wrapped matrix is const).
Definition: MatrixProxy.hpp:338
ConstReference operator[](SizeType i) const
Returns a const reference to the element at row i of the column (alias for operator()).
Definition: MatrixProxy.hpp:391
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:498
SelfType ClosureType
Closure type used when this proxy appears inside another expression.
Definition: MatrixProxy.hpp:346
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:560
M::SizeType SizeType
The size type used by the wrapped matrix.
Definition: MatrixProxy.hpp:328
MatrixColumn & operator=(const MatrixColumn &c)
Copy-assigns the contents of c to this column (via a temporary to handle aliasing).
Definition: MatrixProxy.hpp:446
MatrixColumn & plusAssign(const VectorExpression< E > &e)
Adds the elements of the vector expression e to this column without intermediate temporary.
Definition: MatrixProxy.hpp:537
SizeType getIndex() const
Returns the column index this proxy refers to within the wrapped matrix.
Definition: MatrixProxy.hpp:400
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:459
ConstReference operator()(SizeType i) const
Returns a const reference to the element at row i of the column.
Definition: MatrixProxy.hpp:371
MatrixColumn & minusAssign(const VectorExpression< E > &e)
Subtracts the elements of the vector expression e from this column without intermediate temporary.
Definition: MatrixProxy.hpp:550
const SelfType ConstClosureType
Constant closure type used when this proxy appears inside another expression.
Definition: MatrixProxy.hpp:344
MatrixColumn(MatrixType &m, SizeType i)
Constructs the column proxy viewing column i of m.
Definition: MatrixProxy.hpp:353
Reference operator[](SizeType i)
Returns a mutable reference to the element at row i of the column (alias for operator()).
Definition: MatrixProxy.hpp:381
M MatrixType
The wrapped matrix type.
Definition: MatrixProxy.hpp:326
M::ValueType ValueType
The element value type of the wrapped matrix.
Definition: MatrixProxy.hpp:332
const MatrixClosureType & getData() const
Returns a const reference to the wrapped matrix (via its stored closure).
Definition: MatrixProxy.hpp:436
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:342
MatrixClosureType & getData()
Returns a reference to the wrapped matrix (via its stored closure).
Definition: MatrixProxy.hpp:427
bool isEmpty() const
Tells whether the column is empty (the wrapped matrix has zero rows).
Definition: MatrixProxy.hpp:418
SizeType getSize() const
Returns the size of the column (number of rows of the wrapped matrix).
Definition: MatrixProxy.hpp:409
M::DifferenceType DifferenceType
The signed difference type used by the wrapped matrix.
Definition: MatrixProxy.hpp:330
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:511
Reference operator()(SizeType i)
Returns a mutable reference to the element at row i of the column.
Definition: MatrixProxy.hpp:361
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:485
CRTP base class for all matrix expression types.
Definition: Expression.hpp:104
Matrix-expression proxy that views a contiguous rectangular subrange of an underlying matrix.
Definition: MatrixProxy.hpp:587
M::SizeType SizeType
The size type used by the wrapped matrix.
Definition: MatrixProxy.hpp:595
MatrixRange & operator=(const MatrixRange &r)
Copy-assigns the contents of r to this matrix range (via a temporary to handle aliasing).
Definition: MatrixProxy.hpp:716
const MatrixClosureType & getData() const
Returns a const reference to the wrapped matrix (via its stored closure).
Definition: MatrixProxy.hpp:706
std::conditional< std::is_const< M >::value, typename M::ConstReference, typename M::Reference >::type Reference
Mutable reference type (degrades to ConstReference when the wrapped matrix is const).
Definition: MatrixProxy.hpp:605
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:609
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:755
SizeType getStart1() const
Returns the row index range's start index in the wrapped matrix.
Definition: MatrixProxy.hpp:652
SizeType getSize2() const
Returns the number of columns in the proxy (size of the column range).
Definition: MatrixProxy.hpp:679
M MatrixType
The wrapped matrix type.
Definition: MatrixProxy.hpp:593
MatrixRange & assign(const MatrixExpression< E > &e)
Assigns the elements of the matrix expression e to this matrix range without intermediate temporary.
Definition: MatrixProxy.hpp:794
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:742
SizeType getStart2() const
Returns the column index range's start index in the wrapped matrix.
Definition: MatrixProxy.hpp:661
Range< SizeType > RangeType
Range type used to specify the row and column index ranges.
Definition: MatrixProxy.hpp:615
M::ConstReference ConstReference
Constant reference type to an element.
Definition: MatrixProxy.hpp:601
M::ValueType ValueType
The element value type of the wrapped matrix.
Definition: MatrixProxy.hpp:599
friend void swap(MatrixRange &r1, MatrixRange &r2)
ADL-enabled free-function form of swap().
Definition: MatrixProxy.hpp:841
ConstReference operator()(SizeType i, SizeType j) const
Returns a const reference to the element at proxy index (i, j).
Definition: MatrixProxy.hpp:643
Reference operator()(SizeType i, SizeType j)
Returns a mutable reference to the element at proxy index (i, j).
Definition: MatrixProxy.hpp:632
M::DifferenceType DifferenceType
The signed difference type used by the wrapped matrix.
Definition: MatrixProxy.hpp:597
SelfType ClosureType
Closure type used when this proxy appears inside another expression.
Definition: MatrixProxy.hpp:613
SizeType getSize1() const
Returns the number of rows in the proxy (size of the row range).
Definition: MatrixProxy.hpp:670
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:830
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:768
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:781
MatrixRange & plusAssign(const MatrixExpression< E > &e)
Adds the elements of the matrix expression e to this matrix range without intermediate temporary.
Definition: MatrixProxy.hpp:807
bool isEmpty() const
Tells whether the proxy is empty (either range has size zero).
Definition: MatrixProxy.hpp:688
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:729
const SelfType ConstClosureType
Constant closure type used when this proxy appears inside another expression.
Definition: MatrixProxy.hpp:611
MatrixClosureType & getData()
Returns a reference to the wrapped matrix (via its stored closure).
Definition: MatrixProxy.hpp:697
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:623
MatrixRange & minusAssign(const MatrixExpression< E > &e)
Subtracts the elements of the matrix expression e from this matrix range without intermediate tempora...
Definition: MatrixProxy.hpp:820
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:179
std::conditional< std::is_const< M >::value, typename M::ConstReference, typename M::Reference >::type Reference
Mutable reference type (degrades to ConstReference when the wrapped matrix is const).
Definition: MatrixProxy.hpp:71
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:205
M::DifferenceType DifferenceType
The signed difference type used by the wrapped matrix.
Definition: MatrixProxy.hpp:63
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:75
M MatrixType
The wrapped matrix type.
Definition: MatrixProxy.hpp:59
ConstReference operator[](SizeType i) const
Returns a const reference to the element at column i of the row (alias for operator()).
Definition: MatrixProxy.hpp:124
MatrixRow & assign(const VectorExpression< E > &e)
Assigns the elements of the vector expression e to this row without intermediate temporary.
Definition: MatrixProxy.hpp:257
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:192
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:231
MatrixRow(MatrixType &m, SizeType i)
Constructs the row proxy viewing row i of m.
Definition: MatrixProxy.hpp:86
const MatrixClosureType & getData() const
Returns a const reference to the wrapped matrix (via its stored closure).
Definition: MatrixProxy.hpp:169
M::ConstReference ConstReference
Constant reference type to an element.
Definition: MatrixProxy.hpp:67
SizeType getSize() const
Returns the size of the row (number of columns of the wrapped matrix).
Definition: MatrixProxy.hpp:142
ConstReference operator()(SizeType i) const
Returns a const reference to the element at column i of the row.
Definition: MatrixProxy.hpp:104
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:218
M::SizeType SizeType
The size type used by the wrapped matrix.
Definition: MatrixProxy.hpp:61
Reference operator()(SizeType i)
Returns a mutable reference to the element at column i of the row.
Definition: MatrixProxy.hpp:94
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:293
SizeType getIndex() const
Returns the row index this proxy refers to within the wrapped matrix.
Definition: MatrixProxy.hpp:133
const SelfType ConstClosureType
Constant closure type used when this proxy appears inside another expression.
Definition: MatrixProxy.hpp:77
M::ValueType ValueType
The element value type of the wrapped matrix.
Definition: MatrixProxy.hpp:65
MatrixRow & minusAssign(const VectorExpression< E > &e)
Subtracts the elements of the vector expression e from this row without intermediate temporary.
Definition: MatrixProxy.hpp:283
friend void swap(MatrixRow &r1, MatrixRow &r2)
ADL-enabled free-function form of swap().
Definition: MatrixProxy.hpp:304
SelfType ClosureType
Closure type used when this proxy appears inside another expression.
Definition: MatrixProxy.hpp:79
MatrixClosureType & getData()
Returns a reference to the wrapped matrix (via its stored closure).
Definition: MatrixProxy.hpp:160
bool isEmpty() const
Tells whether the row is empty (the wrapped matrix has zero columns).
Definition: MatrixProxy.hpp:151
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:244
MatrixRow & plusAssign(const VectorExpression< E > &e)
Adds the elements of the vector expression e to this row without intermediate temporary.
Definition: MatrixProxy.hpp:270
Reference operator[](SizeType i)
Returns a mutable reference to the element at column i of the row (alias for operator()).
Definition: MatrixProxy.hpp:114
Matrix-expression proxy that views a strided rectangular slice of an underlying matrix.
Definition: MatrixProxy.hpp:858
const SelfType ConstClosureType
Constant closure type used when this proxy appears inside another expression.
Definition: MatrixProxy.hpp:882
SizeType getSize2() const
Returns the number of columns in the proxy (size of the column slice).
Definition: MatrixProxy.hpp:968
MatrixSlice & operator=(const MatrixSlice &s)
Copy-assigns the contents of s to this matrix slice (via a temporary to handle aliasing).
Definition: MatrixProxy.hpp:1005
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:1044
MatrixClosureType & getData()
Returns a reference to the wrapped matrix (via its stored closure).
Definition: MatrixProxy.hpp:986
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:1057
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:1018
MatrixSlice & assign(const MatrixExpression< E > &e)
Assigns the elements of the matrix expression e to this matrix slice without intermediate temporary.
Definition: MatrixProxy.hpp:1083
SizeType getStart2() const
Returns the column slice's start index in the wrapped matrix.
Definition: MatrixProxy.hpp:932
Slice< SizeType, DifferenceType > SliceType
Slice type used to specify the row and column slices (start, stride, size).
Definition: MatrixProxy.hpp:886
friend void swap(MatrixSlice &s1, MatrixSlice &s2)
ADL-enabled free-function form of swap().
Definition: MatrixProxy.hpp:1130
M::DifferenceType DifferenceType
The signed difference type used by the wrapped matrix.
Definition: MatrixProxy.hpp:868
const MatrixClosureType & getData() const
Returns a const reference to the wrapped matrix (via its stored closure).
Definition: MatrixProxy.hpp:995
M MatrixType
The wrapped matrix type.
Definition: MatrixProxy.hpp:864
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:894
Reference operator()(SizeType i, SizeType j)
Returns a mutable reference to the element at proxy index (i, j).
Definition: MatrixProxy.hpp:903
M::ConstReference ConstReference
Constant reference type to an element.
Definition: MatrixProxy.hpp:872
MatrixSlice & plusAssign(const MatrixExpression< E > &e)
Adds the elements of the matrix expression e to this matrix slice without intermediate temporary.
Definition: MatrixProxy.hpp:1096
M::ValueType ValueType
The element value type of the wrapped matrix.
Definition: MatrixProxy.hpp:870
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:1119
M::SizeType SizeType
The size type used by the wrapped matrix.
Definition: MatrixProxy.hpp:866
bool isEmpty() const
Tells whether the proxy is empty (either slice has size zero).
Definition: MatrixProxy.hpp:977
DifferenceType getStride1() const
Returns the row slice's stride in the wrapped matrix.
Definition: MatrixProxy.hpp:941
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:880
SizeType getSize1() const
Returns the number of rows in the proxy (size of the row slice).
Definition: MatrixProxy.hpp:959
SizeType getStart1() const
Returns the row slice's start index in the wrapped matrix.
Definition: MatrixProxy.hpp:923
DifferenceType getStride2() const
Returns the column slice's stride in the wrapped matrix.
Definition: MatrixProxy.hpp:950
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:1031
MatrixSlice & minusAssign(const MatrixExpression< E > &e)
Subtracts the elements of the matrix expression e from this matrix slice without intermediate tempora...
Definition: MatrixProxy.hpp:1109
ConstReference operator()(SizeType i, SizeType j) const
Returns a const reference to the element at proxy index (i, j).
Definition: MatrixProxy.hpp:914
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:1070
std::conditional< std::is_const< M >::value, typename M::ConstReference, typename M::Reference >::type Reference
Mutable reference type (degrades to ConstReference when the wrapped matrix is const).
Definition: MatrixProxy.hpp:876
SelfType ClosureType
Closure type used when this proxy appears inside another expression.
Definition: MatrixProxy.hpp:884
SizeType getStart() const
Returns the lower (inclusive) bound.
Definition: Range.hpp:91
SizeType getSize() const
Returns the size of the range, .
Definition: Range.hpp:109
SizeType SizeType
The integral size/index type.
Definition: Range.hpp:55
SizeType SizeType
The integral size/index type.
Definition: Slice.hpp:60
SizeType getStart() const
Returns the starting global index.
Definition: Slice.hpp:99
SizeType getSize() const
Returns the number of entries in the slice.
Definition: Slice.hpp:117
DifferenceType getStride() const
Returns the signed step size between consecutive entries.
Definition: Slice.hpp:108
DifferenceType DifferenceType
The signed difference type used for the stride.
Definition: Slice.hpp:62
CRTP base class for all vector expression types.
Definition: Expression.hpp:66
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:1368
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:1259
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:1231
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:1288
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:313
M::MatrixTemporaryType Type
The concrete temporary matrix type compatible with the matrix expression M.
Definition: TypeTraits.hpp:316
Selects a concrete temporary vector type compatible with the vector expression V.
Definition: TypeTraits.hpp:301