codac 2.0.0
|
Go to the source code of this file.
Functions | |
template<int R = RowsAtCompileTime, int C = ColsAtCompileTime> requires IsVectorOrRow<R,C> | |
auto | diag_matrix () const |
Converts a vector into a diagonal matrix. | |
template<int R = RowsAtCompileTime, int C = ColsAtCompileTime> requires IsVectorOrRow<R,C> | |
auto | subvector (Index start_id, Index end_id) const |
Extracts a subvector from the current vector. | |
This file is included in the declaration of Eigen::MatrixBase, thanks to the preprocessor token EIGEN_MATRIXBASE_PLUGIN. See: https://eigen.tuxfamily.org/dox/TopicCustomizing_Plugins.html and the file codac2_matrices.h
|
inline |
Converts a vector into a diagonal matrix.
Creates a square matrix whose diagonal entries are taken from the vector. Off-diagonal entries are set to zero. The matrix returned has size equal to the size of the vector.
|
inline |
Extracts a subvector from the current vector.
Returns a new vector containing elements from index start_id
to end_id
.
start_id | The starting index of the subvector. |
end_id | The ending index of the subvector. |
0 <= start_id <= end_id < this->size()