Go to the source code of this file.
|
template<typename U = Scalar, int R = RowsAtCompileTime, int C = ColsAtCompileTime>
requires (!IsIntervalDomain<U>) && (IsVectorOrRow<R,C>) |
Index | min_coeff_index () const |
| Returns the index of the minimum coefficient in the vector.
|
|
template<typename U = Scalar, int R = RowsAtCompileTime, int C = ColsAtCompileTime>
requires (!IsIntervalDomain<U>) && (IsVectorOrRow<R,C>) |
Index | max_coeff_index () const |
| Returns the index of the maximum coefficient in the 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
- Date
- 2024
- Author
- Simon Rohou
- Copyright
- Copyright 2023 Codac Team
- License: GNU Lesser General Public License (LGPL)
◆ min_coeff_index()
template<typename U = Scalar, int R = RowsAtCompileTime, int C = ColsAtCompileTime>
requires (!IsIntervalDomain<U>) && (IsVectorOrRow<R,C>)
Index min_coeff_index |
( |
| ) |
const |
|
inline |
Returns the index of the minimum coefficient in the vector.
- Returns
- The index (0-based) of the minimum coefficient.
- Note
- For a column vector, the returned index is the row index. For a row vector, it is the column index.
27{
28 Index r,c;
29 this->minCoeff(&r,&c);
30 assert((C == 1 && c == 0) || (R == 1 && r == 0));
31 return r;
32}
◆ max_coeff_index()
template<typename U = Scalar, int R = RowsAtCompileTime, int C = ColsAtCompileTime>
requires (!IsIntervalDomain<U>) && (IsVectorOrRow<R,C>)
Index max_coeff_index |
( |
| ) |
const |
|
inline |
Returns the index of the maximum coefficient in the vector.
- Returns
- The index (0-based) of the maximum coefficient.
- Note
- For a column vector, the returned index is the row index. For a row vector, it is the column index.
45{
46 Index r,c;
47 this->maxCoeff(&r,&c);
48 assert((C == 1 && c == 0) || (R == 1 && r == 0));
49 return r;
50}