Matrix.hpp
111 auto linspace(Index rows, double start, double stop) -> decltype(Vector::LinSpaced(rows, start, stop));
147 auto rows(Eigen::MatrixBase<Derived>& mat, Index start, Index num) -> decltype(mat.middleRows(start, num));
153 auto rows(const Eigen::MatrixBase<Derived>& mat, Index start, Index num) -> decltype(mat.middleRows(start, num));
159 auto rows(Eigen::MatrixBase<Derived>& mat, const Indices& irows) -> decltype(mat(irows, Eigen::all));
165 auto rows(const Eigen::MatrixBase<Derived>& mat, const Indices& irows) -> decltype(mat(irows, Eigen::all));
171 auto cols(Eigen::MatrixBase<Derived>& mat, Index start, Index num) -> decltype(mat.middleCols(start, num));
177 auto cols(const Eigen::MatrixBase<Derived>& mat, Index start, Index num) -> decltype(mat.middleCols(start, num));
183 auto cols(Eigen::MatrixBase<Derived>& mat, const Indices& icols) -> decltype(mat(Eigen::all, icols));
189 auto cols(const Eigen::MatrixBase<Derived>& mat, const Indices& icols) -> decltype(mat(Eigen::all, icols));
196 auto segment(Eigen::MatrixBase<Derived>& vec, Index irow, Index nrows) -> decltype(vec.segment(irow, nrows));
203 auto segment(const Eigen::MatrixBase<Derived>& vec, Index irow, Index nrows) -> decltype(vec.segment(irow, nrows));
210 auto block(Eigen::MatrixBase<Derived>& mat, Index irow, Index icol, Index nrows, Index ncols) -> decltype(mat.block(irow, icol, nrows, ncols));
217 auto block(const Eigen::MatrixBase<Derived>& mat, Index irow, Index icol, Index nrows, Index ncols) -> decltype(mat.block(irow, icol, nrows, ncols));
224 auto submatrix(Eigen::MatrixBase<Derived>& mat, const Indices& irows, const Indices& icols) -> decltype(mat(irows, icols));
231 auto submatrix(const Eigen::MatrixBase<Derived>& mat, const Indices& irows, const Indices& icols) -> decltype(mat(irows, icols));
240 auto blockmap(Eigen::Matrix<Scalar,Rows,Cols,Options,MaxRows,MaxCols>& mat, Index row, Index col, Index nrows, Index ncols) -> Eigen::Map<Eigen::Matrix<Scalar,Rows,Cols,Options,MaxRows,MaxCols>, Eigen::Unaligned, Eigen::Stride<Rows,Cols>>
243 return Eigen::Map<Eigen::Matrix<Scalar,Rows,Cols,Options,MaxRows,MaxCols>, Eigen::Unaligned, Eigen::Stride<MaxRows,MaxCols>>(
254 auto blockmap(const Eigen::Matrix<Scalar,Rows,Cols,Options,MaxRows,MaxCols>& mat, Index row, Index col, Index nrows, Index ncols) -> Eigen::Map<const Eigen::Matrix<Scalar,Rows,Cols,Options,MaxRows,MaxCols>, Eigen::Unaligned, Eigen::Stride<Rows,Cols>>
257 return Eigen::Map<const Eigen::Matrix<Scalar,Rows,Cols,Options,MaxRows,MaxCols>, Eigen::Unaligned, Eigen::Stride<MaxRows,MaxCols>>(
266 auto rowsmap(Eigen::Matrix<Scalar,Rows,Cols,Options,MaxRows,MaxCols>& mat, Index row, Index nrows) -> Eigen::Map<Eigen::Matrix<Scalar,Rows,Cols,Options,MaxRows,MaxCols>, Eigen::Unaligned, Eigen::Stride<Rows,Cols>>
276 auto rowsmap(const Eigen::Matrix<Scalar,Rows,Cols,Options,MaxRows,MaxCols>& mat, Index row, Index nrows) -> Eigen::Map<const Eigen::Matrix<Scalar,Rows,Cols,Options,MaxRows,MaxCols>, Eigen::Unaligned, Eigen::Stride<Rows,Cols>>
288 auto colsmap(Eigen::Matrix<Scalar,Rows,Cols,Options,MaxRows,MaxCols>& mat, Index col, Index ncols) -> Eigen::Map<Eigen::Matrix<Scalar,Rows,Cols,Options,MaxRows,MaxCols>, Eigen::Unaligned, Eigen::Stride<Rows,Cols>>
300 auto colsmap(const Eigen::Matrix<Scalar,Rows,Cols,Options,MaxRows,MaxCols>& mat, Index col, Index ncols) -> Eigen::Map<const Eigen::Matrix<Scalar,Rows,Cols,Options,MaxRows,MaxCols>, Eigen::Unaligned, Eigen::Stride<Rows,Cols>>
347 auto dot(const Eigen::MatrixBase<DerivedLHS>& lhs, const Eigen::MatrixBase<DerivedRHS>& rhs) -> decltype(lhs.dot(rhs));
355 auto min(const Eigen::MatrixBase<DerivedLHS>& lhs, const Eigen::MatrixBase<DerivedRHS>& rhs) -> decltype(lhs.cwiseMin(rhs));
363 auto max(const Eigen::MatrixBase<DerivedLHS>& lhs, const Eigen::MatrixBase<DerivedRHS>& rhs) -> decltype(lhs.cwiseMax(rhs));
367 auto operator%(const Eigen::MatrixBase<DerivedLHS>& lhs, const Eigen::MatrixBase<DerivedRHS>& rhs) -> decltype(lhs.cwiseProduct(rhs));
371 auto operator/(const Eigen::MatrixBase<DerivedLHS>& lhs, const Eigen::MatrixBase<DerivedRHS>& rhs) -> decltype(lhs.cwiseQuotient(rhs));
375 auto operator/(const typename Derived::Scalar& scalar, const Eigen::MatrixBase<Derived>& mat) -> decltype(scalar*mat.cwiseInverse());
379 auto operator+(const typename Derived::Scalar& scalar, const Eigen::MatrixBase<Derived>& mat) -> decltype((scalar + mat.array()).matrix());
383 auto operator+(const Eigen::MatrixBase<Derived>& mat, const typename Derived::Scalar& scalar) -> decltype((scalar + mat.array()).matrix());
387 auto operator-(const typename Derived::Scalar& scalar, const Eigen::MatrixBase<Derived>& mat) -> decltype((scalar - mat.array()).matrix());
391 auto operator-(const Eigen::MatrixBase<Derived>& mat, const typename Derived::Scalar& scalar) -> decltype((mat.array() - scalar).matrix());
Eigen::MatrixXi MatrixXi
Alias to Eigen type Eigen::MatrixXd.
Definition: Matrix.hpp:70
auto rowsmap(Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols > &mat, Index row, Index nrows) -> Eigen::Map< Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols >, Eigen::Unaligned, Eigen::Stride< Rows, Cols >>
Return a mapped view of a sequence of rows of a matrix.
Definition: Matrix.hpp:266
Eigen::Ref< Eigen::MatrixXd > MatrixRef
Alias to Eigen type Ref<MatrixXd>.
Definition: Matrix.hpp:43
auto random(Index rows) -> decltype(Vector::Random(rows))
Return an expression of a vector with random entries.
Definition: Matrix.hxx:37
Eigen::Ref< MatrixXd > MatrixXdRef
Alias to Eigen type Eigen::Ref<MatrixXd>.
Definition: Matrix.hpp:73
Eigen::Map< MatrixXd > MatrixXdMap
Alias to Eigen type Eigen::Map<MatrixXd>.
Definition: Matrix.hpp:81
auto inv(const Eigen::MatrixBase< Derived > &mat) -> decltype(mat.cwiseInverse())
Return the component-wise inverse of the matrix.
Definition: Matrix.hxx:179
Eigen::Ref< VectorXi > VectorXiRef
Alias to Eigen type Eigen::Ref<VectorXi>.
Definition: Matrix.hpp:54
Eigen::Map< Eigen::MatrixXd > MatrixMap
Alias to Eigen type Map<MatrixXd>.
Definition: Matrix.hpp:45
Eigen::Ref< const VectorXi > VectorXiConstRef
Alias to Eigen type Eigen::Ref<const VectorXi>.
Definition: Matrix.hpp:58
auto norminf(const Eigen::MatrixBase< Derived > &mat) -> double
Return the L-inf norm of a matrix.
Definition: Matrix.hxx:215
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.hxx:155
Eigen::Ref< const MatrixXi > MatrixXiConstRef
Alias to Eigen type Eigen::Ref<const MatrixXi>.
Definition: Matrix.hpp:78
Eigen::Map< const Eigen::VectorXd > VectorConstMap
< Alias to Eigen type Map<VectorXd>.
Definition: Matrix.hpp:33
auto row(ChemicalVectorBase< V, T, P, N > &vec, Index irow) -> ChemicalScalarBase< decltype(vec.val[irow]), decltype(vec.ddn.row(irow))>
Return a ChemicalScalarBase with reference to the chemical scalar in a given row.
Definition: ChemicalVector.hpp:652
Eigen::Map< MatrixXi > MatrixXiMap
Alias to Eigen type Eigen::Map<MatrixXi>.
Definition: Matrix.hpp:82
auto norm(const Eigen::MatrixBase< Derived > &mat) -> double
Return the Lp norm of a matrix.
Definition: Matrix.hxx:203
Eigen::RowVectorXd RowVector
< Alias to Eigen type Map<const VectorXd>.
Definition: Matrix.hpp:35
Eigen::Map< VectorXi > VectorXiMap
Alias to Eigen type Eigen::Map<VectorXi>.
Definition: Matrix.hpp:62
Eigen::Ref< const Eigen::RowVectorXd > RowVectorConstRef
< Alias to Eigen type Ref<RowVectorXd>.
Definition: Matrix.hpp:38
Eigen::MatrixXd MatrixXd
Alias to Eigen type Eigen::MatrixXd.
Definition: Matrix.hpp:69
Eigen::Map< const Eigen::MatrixXd > MatrixConstMap
Alias to Eigen type Map<const MatrixXd>.
Definition: Matrix.hpp:46
auto colsmap(Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols > &mat, Index col, Index ncols) -> Eigen::Map< Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols >, Eigen::Unaligned, Eigen::Stride< Rows, Cols >>
Return a mapped view of a sequence of columns of a matrix.
Definition: Matrix.hpp:288
auto linspace(Index rows, double start, double stop) -> decltype(Vector::LinSpaced(rows, start, stop))
Return a linearly spaced vector.
Definition: Matrix.hxx:42
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
auto identity(Index rows, Index cols) -> decltype(Matrix::Identity(rows, cols))
Return an expression of an identity matrix.
Definition: Matrix.hxx:77
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.hxx:131
auto zeros(const ChemicalVectorBase< V, T, P, N > &v) -> ChemicalVectorBase< decltype(zeros(0)), decltype(zeros(0)), decltype(zeros(0)), decltype(zeros(0, 0))>
Return a ChemicalVectorBase expression representing zeros with same dimension of given vector.
Definition: ChemicalVector.hpp:361
Eigen::Ref< Eigen::RowVectorXd > RowVectorRef
< Alias to Eigen type RowVectorXd.
Definition: Matrix.hpp:36
auto rows(ChemicalVectorBase< V, T, P, N > &vec, Index irow, Index nrows) -> ChemicalVectorBase< decltype(rows(vec.val, irow, nrows)), decltype(rows(vec.ddT, irow, nrows)), decltype(rows(vec.ddP, irow, nrows)), decltype(rows(vec.ddn, irow, nrows))>
Return a reference of a sequence of rows of this ChemicalVectorBase instance.
Definition: ChemicalVector.hpp:680
auto blockmap(Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols > &mat, Index row, Index col, Index nrows, Index ncols) -> Eigen::Map< Eigen::Matrix< Scalar, Rows, Cols, Options, MaxRows, MaxCols >, Eigen::Unaligned, Eigen::Stride< Rows, Cols >>
Return a block mapped view of a matrix.
Definition: Matrix.hpp:240
Eigen::Map< VectorXd > VectorXdMap
Alias to Eigen type Eigen::Map<VectorXd>.
Definition: Matrix.hpp:61
Eigen::Ref< Eigen::RowVectorXd, 0, Eigen::InnerStride<> > RowVectorStridedRef
< Alias to Eigen type Ref<RowVectorXd>.
Definition: Matrix.hpp:37
Eigen::Map< const Eigen::RowVectorXd > RowVectorConstMap
< Alias to Eigen type Map<VectorXd>.
Definition: Matrix.hpp:40
Eigen::VectorXi VectorXi
Alias to Eigen type Eigen::VectorXd.
Definition: Matrix.hpp:50
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.hxx:107
Eigen::PermutationMatrix< Eigen::Dynamic, Eigen::Dynamic > PermutationMatrix
Define an alias to a permutation matrix type of the Eigen library.
Definition: Matrix.hpp:89
Eigen::Map< Eigen::RowVectorXd > RowVectorMap
< Alias to Eigen type Ref<const RowVectorXd>.
Definition: Matrix.hpp:39
auto diagonal(Eigen::MatrixBase< Derived > &mat) -> decltype(mat.diagonal())
Return a vector representation of the diagonal of a matrix.
Definition: Matrix.hxx:191
std::vector< Index > Indices
Define a type that represents a collection of indices.
Definition: Index.hpp:29
Eigen::Ref< MatrixXi > MatrixXiRef
Alias to Eigen type Eigen::Ref<MatrixXi>.
Definition: Matrix.hpp:74
Eigen::Map< const VectorXd > VectorXdConstMap
Alias to Eigen type Eigen::Map<const VectorXd>.
Definition: Matrix.hpp:65
auto ones(const ChemicalVectorBase< V, T, P, N > &v) -> ChemicalVectorBase< decltype(ones(0)), decltype(zeros(0)), decltype(zeros(0)), decltype(zeros(0, 0))>
Return a ChemicalVectorBase expression representing ones with same dimension of given vector.
Definition: ChemicalVector.hpp:369
Eigen::Map< Eigen::VectorXd > VectorMap
< Alias to Eigen type Ref<const VectorXd>.
Definition: Matrix.hpp:32
auto tr(Eigen::MatrixBase< Derived > &mat) -> decltype(mat.transpose())
Return the transpose of the matrix.
Definition: Matrix.hxx:167
Eigen::Ref< const VectorXd > VectorXdConstRef
Alias to Eigen type Eigen::Ref<const VectorXd>.
Definition: Matrix.hpp:57
Eigen::Ref< const Eigen::MatrixXd > MatrixConstRef
Alias to Eigen type Ref<const MatrixXd>.
Definition: Matrix.hpp:44
Eigen::Ref< Eigen::VectorXd > VectorRef
< Alias to Eigen type VectorXd.
Definition: Matrix.hpp:29
Eigen::Map< const MatrixXi > MatrixXiConstMap
Alias to Eigen type Eigen::Map<const MatrixXi>.
Definition: Matrix.hpp:86
Eigen::Ref< Vector, 0, Eigen::InnerStride<> > VectorStridedRef
< Alias to Eigen type Ref<VectorXd>.
Definition: Matrix.hpp:30
Eigen::Ref< const MatrixXd > MatrixXdConstRef
Alias to Eigen type Eigen::Ref<const MatrixXd>.
Definition: Matrix.hpp:77
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.hxx:143
Eigen::Ref< const Eigen::VectorXd > VectorConstRef
< Alias to Eigen type Ref<VectorXd>.
Definition: Matrix.hpp:31
Eigen::Ref< VectorXd > VectorXdRef
Alias to Eigen type Eigen::Ref<VectorXd>.
Definition: Matrix.hpp:53
Eigen::Map< const MatrixXd > MatrixXdConstMap
Alias to Eigen type Eigen::Map<const MatrixXd>.
Definition: Matrix.hpp:85
auto diag(const Eigen::MatrixBase< Derived > &vec) -> decltype(vec.asDiagonal())
Return a diagonal matrix representation of a vector.
Definition: Matrix.hxx:185
auto unit(Index rows, Index i) -> decltype(Vector::Unit(rows, i))
Return an expression of a unit vector.
Definition: Matrix.hxx:47
Eigen::Map< const VectorXi > VectorXiConstMap
Alias to Eigen type Eigen::Map<const VectorXi>.
Definition: Matrix.hpp:66
Eigen::VectorXd VectorXd
Alias to Eigen type Eigen::VectorXd.
Definition: Matrix.hpp:49