Matrix.hpp
54 //---------------------------------------------------------------------------------------------------------------------
56 //---------------------------------------------------------------------------------------------------------------------
83 //---------------------------------------------------------------------------------------------------------------------
85 //---------------------------------------------------------------------------------------------------------------------
127 //---------------------------------------------------------------------------------------------------------------------
129 //---------------------------------------------------------------------------------------------------------------------
143 //---------------------------------------------------------------------------------------------------------------------
145 //---------------------------------------------------------------------------------------------------------------------
165 //---------------------------------------------------------------------------------------------------------------------
167 //---------------------------------------------------------------------------------------------------------------------
172 //---------------------------------------------------------------------------------------------------------------------
174 //---------------------------------------------------------------------------------------------------------------------
196 auto linspace(double start, double stop, Index rows) -> decltype(VectorXd::LinSpaced(rows, start, stop));
233 auto rows(Eigen::MatrixBase<Derived>& mat, Index start, Index num) -> decltype(mat.middleRows(start, num));
240 auto rows(const Eigen::MatrixBase<Derived>& mat, Index start, Index num) -> decltype(mat.middleRows(start, num));
246 auto rows(Eigen::MatrixBase<Derived>& mat, const Indices& irows) -> decltype(mat(irows, Eigen::all));
252 auto rows(const Eigen::MatrixBase<Derived>& mat, const Indices& irows) -> decltype(mat(irows, Eigen::all));
259 auto cols(Eigen::MatrixBase<Derived>& mat, Index start, Index num) -> decltype(mat.middleCols(start, num));
266 auto cols(const Eigen::MatrixBase<Derived>& mat, Index start, Index num) -> decltype(mat.middleCols(start, num));
272 auto cols(Eigen::MatrixBase<Derived>& mat, const Indices& icols) -> decltype(mat(Eigen::all, icols));
278 auto cols(const Eigen::MatrixBase<Derived>& mat, const Indices& icols) -> decltype(mat(Eigen::all, icols));
285 auto segment(Eigen::MatrixBase<Derived>& vec, Index irow, Index nrows) -> decltype(vec.segment(irow, nrows));
292 auto segment(const Eigen::MatrixBase<Derived>& vec, Index irow, Index nrows) -> decltype(vec.segment(irow, nrows));
301 auto block(Eigen::MatrixBase<Derived>& mat, Index irow, Index icol, Index nrows, Index ncols) -> decltype(mat.block(irow, icol, nrows, ncols));
310 auto block(const Eigen::MatrixBase<Derived>& mat, Index irow, Index icol, Index nrows, Index ncols) -> decltype(mat.block(irow, icol, nrows, ncols));
317 auto submatrix(Eigen::MatrixBase<Derived>& mat, const Indices& irows, const Indices& icols) -> decltype(mat(irows, icols));
324 auto submatrix(const Eigen::MatrixBase<Derived>& mat, const Indices& irows, const Indices& icols) -> decltype(mat(irows, icols));
368 auto dot(const Eigen::MatrixBase<DerivedLHS>& lhs, const Eigen::MatrixBase<DerivedRHS>& rhs) -> decltype(lhs.dot(rhs));
376 auto min(const Eigen::MatrixBase<DerivedLHS>& lhs, const Eigen::MatrixBase<DerivedRHS>& rhs) -> decltype(lhs.cwiseMin(rhs));
384 auto max(const Eigen::MatrixBase<DerivedLHS>& lhs, const Eigen::MatrixBase<DerivedRHS>& rhs) -> decltype(lhs.cwiseMax(rhs));
388 auto operator%(const Eigen::MatrixBase<DerivedLHS>& lhs, const Eigen::MatrixBase<DerivedRHS>& rhs) -> decltype(lhs.cwiseProduct(rhs));
392 auto operator/(const Eigen::MatrixBase<DerivedLHS>& lhs, const Eigen::MatrixBase<DerivedRHS>& rhs) -> decltype(lhs.cwiseQuotient(rhs));
396 auto operator/(const typename Derived::Scalar& scalar, const Eigen::MatrixBase<Derived>& mat) -> decltype(scalar*mat.cwiseInverse());
400 auto operator+(const typename Derived::Scalar& scalar, const Eigen::MatrixBase<Derived>& mat) -> decltype((scalar + mat.array()).matrix());
404 auto operator+(const Eigen::MatrixBase<Derived>& mat, const typename Derived::Scalar& scalar) -> decltype((scalar + mat.array()).matrix());
408 auto operator-(const typename Derived::Scalar& scalar, const Eigen::MatrixBase<Derived>& mat) -> decltype((scalar - mat.array()).matrix());
412 auto operator-(const Eigen::MatrixBase<Derived>& mat, const typename Derived::Scalar& scalar) -> decltype((mat.array() - scalar).matrix());
424 auto pow(const Eigen::MatrixBase<Derived>& mat, double power) -> decltype(mat.array().pow(power));
541 inline auto linspace(double start, double stop, Index rows) -> decltype(VectorXd::LinSpaced(rows, start, stop))
582 auto rows(Eigen::MatrixBase<Derived>& mat, Index start, Index num) -> decltype(mat.middleRows(start, num))
588 auto rows(const Eigen::MatrixBase<Derived>& mat, Index start, Index num) -> decltype(mat.middleRows(start, num))
594 auto rows(Eigen::MatrixBase<Derived>& mat, const Indices& irows) -> decltype(mat(irows, Eigen::all))
600 auto rows(const Eigen::MatrixBase<Derived>& mat, const Indices& irows) -> decltype(mat(irows, Eigen::all))
606 auto cols(Eigen::MatrixBase<Derived>& mat, Index start, Index num) -> decltype(mat.middleCols(start, num))
612 auto cols(const Eigen::MatrixBase<Derived>& mat, Index start, Index num) -> decltype(mat.middleCols(start, num))
618 auto cols(Eigen::MatrixBase<Derived>& mat, const Indices& icols) -> decltype(mat(Eigen::all, icols))
624 auto cols(const Eigen::MatrixBase<Derived>& mat, const Indices& icols) -> decltype(mat(Eigen::all, icols))
630 auto segment(Eigen::MatrixBase<Derived>& vec, Index irow, Index nrows) -> decltype(vec.segment(irow, nrows))
636 auto segment(const Eigen::MatrixBase<Derived>& vec, Index irow, Index nrows) -> decltype(vec.segment(irow, nrows))
642 auto block(Eigen::MatrixBase<Derived>& mat, Index irow, Index icol, Index nrows, Index ncols) -> decltype(mat.block(irow, icol, nrows, ncols))
648 auto block(const Eigen::MatrixBase<Derived>& mat, Index irow, Index icol, Index nrows, Index ncols) -> decltype(mat.block(irow, icol, nrows, ncols))
654 auto submatrix(Eigen::MatrixBase<Derived>& mat, const Indices& irows, const Indices& icols) -> decltype(mat(irows, icols))
660 auto submatrix(const Eigen::MatrixBase<Derived>& mat, const Indices& irows, const Indices& icols) -> decltype(mat(irows, icols))
726 auto dot(const Eigen::MatrixBase<DerivedLHS>& lhs, const Eigen::MatrixBase<DerivedRHS>& rhs) -> decltype(lhs.dot(rhs))
738 auto min(const Eigen::MatrixBase<DerivedLHS>& lhs, const Eigen::MatrixBase<DerivedRHS>& rhs) -> decltype(lhs.cwiseMin(rhs))
750 auto max(const Eigen::MatrixBase<DerivedLHS>& lhs, const Eigen::MatrixBase<DerivedRHS>& rhs) -> decltype(lhs.cwiseMax(rhs))
756 auto operator%(const Eigen::MatrixBase<DerivedLHS>& lhs, const Eigen::MatrixBase<DerivedRHS>& rhs) -> decltype(lhs.cwiseProduct(rhs))
762 auto operator/(const Eigen::MatrixBase<DerivedLHS>& lhs, const Eigen::MatrixBase<DerivedRHS>& rhs) -> decltype(lhs.cwiseQuotient(rhs))
768 auto operator/(const typename Derived::Scalar& scalar, const Eigen::MatrixBase<Derived>& mat) -> decltype(scalar*mat.cwiseInverse())
774 auto operator+(const typename Derived::Scalar& scalar, const Eigen::MatrixBase<Derived>& mat) -> decltype((scalar + mat.array()).matrix())
780 auto operator+(const Eigen::MatrixBase<Derived>& mat, const typename Derived::Scalar& scalar) -> decltype((scalar + mat.array()).matrix())
786 auto operator-(const typename Derived::Scalar& scalar, const Eigen::MatrixBase<Derived>& mat) -> decltype((scalar - mat.array()).matrix())
792 auto operator-(const Eigen::MatrixBase<Derived>& mat, const typename Derived::Scalar& scalar) -> decltype((mat.array() - scalar).matrix())
810 auto pow(const Eigen::MatrixBase<Derived>& mat, double power) -> decltype(mat.array().pow(power).matrix())
The namespace containing all components of the Reaktoro library.
Definition: Algorithms.hpp:29
auto pow(const Eigen::MatrixBase< Derived > &mat, double power) -> decltype(mat.array().pow(power))
Return the component-wise exponential of a matrix.
Definition: Matrix.hpp:810
std::array< T, N > Array
Convenient alias for std::array<T, N>.
Definition: Types.hpp:62
Eigen::Ref< const VectorXd, 0, Eigen::InnerStride<> > VectorXdStridedConstRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:80
auto operator/(const Eigen::MatrixBase< DerivedLHS > &lhs, const Eigen::MatrixBase< DerivedRHS > &rhs) -> decltype(lhs.cwiseQuotient(rhs))
Return the component-wise division of two matrices.
Definition: Matrix.hpp:762
auto norminf(const Eigen::MatrixBase< Derived > &mat) -> double
Return the L-inf norm of a matrix.
Definition: Matrix.hpp:714
autodiff::MatrixXreal MatrixXr
Convenient alias to Eigen type.
Definition: Matrix.hpp:131
Eigen::Map< const VectorXd > VectorXdConstMap
Convenient alias to Eigen type.
Definition: Matrix.hpp:78
Eigen::Map< ArrayXXd > ArrayXXdMap
Convenient alias to Eigen type.
Definition: Matrix.hpp:122
Eigen::Ref< const MatrixXr > MatrixXrConstRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:133
Eigen::Ref< const VectorXl > VectorXlConstRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:68
auto submatrix(Eigen::MatrixBase< Derived > &mat, const Indices &irows, const Indices &icols) -> decltype(mat(irows, icols))
Return a view of some rows and columns of a matrix.
Definition: Matrix.hpp:654
auto tr(Eigen::MatrixBase< Derived > &mat) -> decltype(mat.transpose())
Return the transpose of the matrix.
Definition: Matrix.hpp:666
auto abs(const Eigen::MatrixBase< Derived > &mat) -> decltype(mat.cwiseAbs())
Return the component-wise absolute entries of a matrix.
Definition: Matrix.hpp:798
Eigen::Map< VectorXr > VectorXrMap
Convenient alias to Eigen type.
Definition: Matrix.hpp:61
Eigen::Ref< const ArrayXXr > ArrayXXrConstRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:113
auto rows(Eigen::MatrixBase< Derived > &mat, Index start, Index num) -> decltype(mat.middleRows(start, num))
Return a view of a sequence of rows of a matrix.
Definition: Matrix.hpp:582
Eigen::Map< ArrayXXr > ArrayXXrMap
Convenient alias to Eigen type.
Definition: Matrix.hpp:114
Eigen::Map< const ArrayXd > ArrayXdConstMap
Convenient alias to Eigen type.
Definition: Matrix.hpp:107
Eigen::Ref< ArrayXd, 0, Eigen::InnerStride<> > ArrayXdStridedRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:108
Eigen::RowVectorXd RowVectorXd
Convenient alias to Eigen type.
Definition: Matrix.hpp:159
Eigen::Ref< const VectorXr > VectorXrConstRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:60
Eigen::Ref< const RowVectorXl > RowVectorXlConstRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:155
Eigen::Ref< const ArrayXl, 0, Eigen::InnerStride<> > ArrayXlStridedConstRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:101
Eigen::Ref< ArrayXd > ArrayXdRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:104
RowVectorX< Eigen::Index > RowVectorXl
Convenient alias to Eigen type.
Definition: Matrix.hpp:153
auto operator%(const Eigen::MatrixBase< DerivedLHS > &lhs, const Eigen::MatrixBase< DerivedRHS > &rhs) -> decltype(lhs.cwiseProduct(rhs))
Return the component-wise multiplication of two matrices.
Definition: Matrix.hpp:756
auto unit(Index rows, Index i) -> decltype(VectorXd::Unit(rows, i))
Return an expression of a unit vector.
Definition: Matrix.hpp:546
Eigen::Ref< ArrayXXd, 0, Eigen::InnerStride<> > ArrayXXdStridedRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:124
Eigen::Map< const ArrayXXr > ArrayXXrConstMap
Convenient alias to Eigen type.
Definition: Matrix.hpp:115
Eigen::Map< ArrayXl > ArrayXlMap
Convenient alias to Eigen type.
Definition: Matrix.hpp:98
Eigen::Map< MatrixXr > MatrixXrMap
Convenient alias to Eigen type.
Definition: Matrix.hpp:134
Eigen::Map< ArrayXd > ArrayXdMap
Convenient alias to Eigen type.
Definition: Matrix.hpp:106
Eigen::Ref< ArrayXl, 0, Eigen::InnerStride<> > ArrayXlStridedRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:100
auto dot(const Eigen::MatrixBase< DerivedLHS > &lhs, const Eigen::MatrixBase< DerivedRHS > &rhs) -> decltype(lhs.dot(rhs))
Return the dot product of two matrices.
Definition: Matrix.hpp:726
Eigen::Ref< const ArrayXXd, 0, Eigen::InnerStride<> > ArrayXXdStridedConstRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:125
auto operator-(const typename Derived::Scalar &scalar, const Eigen::MatrixBase< Derived > &mat) -> decltype((scalar - mat.array()).matrix())
Return the component-wise division of two matrices.
Definition: Matrix.hpp:786
Eigen::Matrix< T, -1, -1, 0, -1, -1 > MatrixX
Convenient alias to Eigen type.
Definition: Matrix.hpp:42
auto operator+(const typename Derived::Scalar &scalar, const Eigen::MatrixBase< Derived > &mat) -> decltype((scalar+mat.array()).matrix())
Return the component-wise division of two matrices.
Definition: Matrix.hpp:774
auto segment(Eigen::MatrixBase< Derived > &vec, Index irow, Index nrows) -> decltype(vec.segment(irow, nrows))
Return a view of some rows and columns of a matrix.
Definition: Matrix.hpp:630
Eigen::Map< RowVectorXr > RowVectorXrMap
Convenient alias to Eigen type.
Definition: Matrix.hpp:150
ArrayX< Eigen::Index > ArrayXl
Convenient alias to Eigen type.
Definition: Matrix.hpp:95
Eigen::Ref< const VectorXr, 0, Eigen::InnerStride<> > VectorXrStridedConstRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:64
Eigen::Ref< RowVectorXl > RowVectorXlRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:154
Eigen::Ref< const ArrayXl > ArrayXlConstRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:97
Eigen::Ref< const VectorXd > VectorXdConstRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:76
Eigen::Map< RowVectorXl > RowVectorXlMap
Convenient alias to Eigen type.
Definition: Matrix.hpp:156
Eigen::Ref< const ArrayXXr, 0, Eigen::InnerStride<> > ArrayXXrStridedConstRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:117
autodiff::ArrayXXreal ArrayXXr
Convenient alias to Eigen type.
Definition: Matrix.hpp:111
Eigen::Ref< VectorXr > VectorXrRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:59
Eigen::Ref< ArrayXr, 0, Eigen::InnerStride<> > ArrayXrStridedRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:92
Eigen::Map< const ArrayXXd > ArrayXXdConstMap
Convenient alias to Eigen type.
Definition: Matrix.hpp:123
Eigen::Map< const VectorXl > VectorXlConstMap
Convenient alias to Eigen type.
Definition: Matrix.hpp:70
Eigen::Map< MatrixXd > MatrixXdMap
Convenient alias to Eigen type.
Definition: Matrix.hpp:140
Eigen::Ref< const ArrayXd, 0, Eigen::InnerStride<> > ArrayXdStridedConstRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:109
Eigen::Map< const MatrixXr > MatrixXrConstMap
Convenient alias to Eigen type.
Definition: Matrix.hpp:135
autodiff::VectorXreal VectorXr
Convenient alias to Eigen type.
Definition: Matrix.hpp:58
Eigen::Ref< const VectorXl, 0, Eigen::InnerStride<> > VectorXlStridedConstRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:72
Eigen::Ref< MatrixXr > MatrixXrRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:132
auto norm(const Eigen::MatrixBase< Derived > &mat) -> double
Return the Lp norm of a matrix.
Definition: Matrix.hpp:702
auto sum(std::size_t ibegin, std::size_t iend, const Function &f)
Return the sum f(ibegin) + ... + f(iend-1) for a given function f.
Definition: Algorithms.hpp:257
Eigen::Ref< const ArrayXXd > ArrayXXdConstRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:121
auto linspace(double start, double stop, Index rows) -> decltype(VectorXd::LinSpaced(rows, start, stop))
Return a linearly spaced vector.
Definition: Matrix.hpp:541
Eigen::Ref< ArrayXr > ArrayXrRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:88
Eigen::Ref< ArrayXl > ArrayXlRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:96
Eigen::Map< const VectorXr > VectorXrConstMap
Convenient alias to Eigen type.
Definition: Matrix.hpp:62
Eigen::Map< const RowVectorXr > RowVectorXrConstMap
Convenient alias to Eigen type.
Definition: Matrix.hpp:151
Eigen::Map< RowVectorXd > RowVectorXdMap
Convenient alias to Eigen type.
Definition: Matrix.hpp:162
Eigen::Ref< ArrayXXr > ArrayXXrRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:112
Eigen::Ref< const ArrayXd > ArrayXdConstRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:105
auto ones(Index rows) -> decltype(VectorXd::Ones(rows))
Return an expression of a vector with entries equal to one.
Definition: Matrix.hpp:526
Eigen::Ref< const ArrayXr, 0, Eigen::InnerStride<> > ArrayXrStridedConstRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:93
autodiff::RowVectorXreal RowVectorXr
Convenient alias to Eigen type.
Definition: Matrix.hpp:147
Eigen::Map< const RowVectorXl > RowVectorXlConstMap
Convenient alias to Eigen type.
Definition: Matrix.hpp:157
Eigen::Ref< ArrayXXd > ArrayXXdRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:120
Eigen::Array< T, -1, 1, 0, -1, 1 > ArrayX
Convenient alias to Eigen type.
Definition: Matrix.hpp:46
Eigen::Map< VectorXl > VectorXlMap
Convenient alias to Eigen type.
Definition: Matrix.hpp:69
Eigen::Ref< VectorXl, 0, Eigen::InnerStride<> > VectorXlStridedRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:71
auto cols(Eigen::MatrixBase< Derived > &mat, Index start, Index num) -> decltype(mat.middleCols(start, num))
Return a view of a sequence of columns of a matrix.
Definition: Matrix.hpp:606
Eigen::Ref< const RowVectorXr > RowVectorXrConstRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:149
Eigen::PermutationMatrix< Eigen::Dynamic, Eigen::Dynamic > PermutationMatrix
Define an alias to a permutation matrix type of the Eigen library.
Definition: Matrix.hpp:170
Eigen::Ref< const RowVectorXd > RowVectorXdConstRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:161
Eigen::Ref< VectorXl > VectorXlRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:67
auto sqrt(const Eigen::MatrixBase< Derived > &mat) -> decltype(mat.cwiseSqrt())
Return the component-wise square root of a matrix.
Definition: Matrix.hpp:804
Eigen::Map< const RowVectorXd > RowVectorXdConstMap
Convenient alias to Eigen type.
Definition: Matrix.hpp:163
auto min(const Eigen::MatrixBase< Derived > &mat) -> decltype(mat.minCoeff())
Return the minimum component of a matrix.
Definition: Matrix.hpp:732
std::vector< Index > Indices
Define a type that represents a collection of indices.
Definition: Index.hpp:29
auto diag(const Eigen::MatrixBase< Derived > &vec) -> decltype(vec.asDiagonal())
Return a diagonal matrix representation of a vector.
Definition: Matrix.hpp:684
Eigen::Ref< RowVectorXr > RowVectorXrRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:148
Eigen::Map< const MatrixXd > MatrixXdConstMap
Convenient alias to Eigen type.
Definition: Matrix.hpp:141
Eigen::Ref< const MatrixXd > MatrixXdConstRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:139
auto block(Eigen::MatrixBase< Derived > &mat, Index irow, Index icol, Index nrows, Index ncols) -> decltype(mat.block(irow, icol, nrows, ncols))
Return a view of some rows and columns of a matrix.
Definition: Matrix.hpp:642
Eigen::Ref< const ArrayXr > ArrayXrConstRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:89
auto inv(const Eigen::MatrixBase< Derived > &mat) -> decltype(mat.cwiseInverse())
Return the component-wise inverse of the matrix.
Definition: Matrix.hpp:678
auto log(const Eigen::MatrixBase< Derived > &mat) -> decltype(mat.array().log().matrix())
Return the component-wise natural log of a matrix.
Definition: Matrix.hpp:822
auto identity(Index rows, Index cols) -> decltype(MatrixXd::Identity(rows, cols))
Return an expression of an identity matrix.
Definition: Matrix.hpp:576
Eigen::Matrix< T, -1, 1, 0, -1, 1 > VectorX
Convenient alias to Eigen type.
Definition: Matrix.hpp:38
Eigen::Ref< VectorXd, 0, Eigen::InnerStride<> > VectorXdStridedRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:79
Eigen::Array< T, -1, -1, 0, -1, -1 > ArrayXX
Convenient alias to Eigen type.
Definition: Matrix.hpp:50
Eigen::Ref< MatrixXd > MatrixXdRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:138
auto zeros(Index rows) -> decltype(VectorXd::Zero(rows))
Return an expression of a zero vector.
Definition: Matrix.hpp:521
Eigen::Map< const ArrayXl > ArrayXlConstMap
Convenient alias to Eigen type.
Definition: Matrix.hpp:99
auto exp(const Eigen::MatrixBase< Derived > &mat) -> decltype(mat.array().exp().matrix())
Return the component-wise natural exponential of a matrix.
Definition: Matrix.hpp:816
Eigen::Ref< ArrayXXr, 0, Eigen::InnerStride<> > ArrayXXrStridedRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:116
auto random(Index rows) -> decltype(VectorXd::Random(rows))
Return an expression of a vector with random entries.
Definition: Matrix.hpp:536
autodiff::ArrayXreal ArrayXr
Convenient alias to Eigen type.
Definition: Matrix.hpp:87
auto diagonal(Eigen::MatrixBase< Derived > &mat) -> decltype(mat.diagonal())
Return a vector representation of the diagonal of a matrix.
Definition: Matrix.hpp:690
Eigen::Ref< RowVectorXd > RowVectorXdRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:160
Eigen::Ref< VectorXd > VectorXdRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:75
Eigen::Ref< VectorXr, 0, Eigen::InnerStride<> > VectorXrStridedRef
Convenient alias to Eigen type.
Definition: Matrix.hpp:63
auto max(const Eigen::MatrixBase< Derived > &mat) -> decltype(mat.maxCoeff())
Return the maximum component of a matrix.
Definition: Matrix.hpp:744
VectorX< Eigen::Index > VectorXl
Convenient alias to Eigen type.
Definition: Matrix.hpp:66
Eigen::Map< ArrayXr > ArrayXrMap
Convenient alias to Eigen type.
Definition: Matrix.hpp:90
Eigen::Map< const ArrayXr > ArrayXrConstMap
Convenient alias to Eigen type.
Definition: Matrix.hpp:91
auto log10(const Eigen::MatrixBase< Derived > &mat) -> decltype(mat.array().log10().matrix())
Return the component-wise log10 of a matrix.
Definition: Matrix.hpp:828
Eigen::Map< VectorXd > VectorXdMap
Convenient alias to Eigen type.
Definition: Matrix.hpp:77
static auto equal(const CacheType &a, const Type &b)
Return true if two arrays are equal.
Definition: Matrix.hpp:457
static auto assign(const CacheType &a, const Type &b)
Assign an Eigen ref object to an Eigen object.
Definition: Matrix.hpp:478
static auto equal(const CacheType &a, const Type &b)
Return true if the two Eigen objects are equal.
Definition: Matrix.hpp:472
Used to enable function arguments of a type T to be cached in a memoized version of the function.
Definition: Memoization.hpp:30
static auto assign(CacheType &a, const Type &b)
Assign the value of b, of type T, into a, of type CacheType.
Definition: Memoization.hpp:64
static auto equal(const CacheType &a, const Type &b)
Check if a, of type CacheType, is equal to b, of type T.
Definition: Memoization.hpp:56
Type CacheType
The type of the object constructed with a given object of type T.
Definition: Memoization.hpp:47
Definition: TypeOp.hpp:35
Definition: TypeOp.hpp:29