Go to the source code of this file.
Functions | |
| template<typename Indices > | |
| IndexedView_or_VectorBlock | operator() (const Indices &indices) |
| template<typename RowIndices , typename ColIndices > | |
| IndexedView_or_Block | operator() (const RowIndices &rowIndices, const ColIndices &colIndices) |
| IndexedView_or_VectorBlock operator() | ( | const Indices & | indices | ) |
This is an overload of operator()(const RowIndices&, const ColIndices&) for 1D vectors or arrays
This is only for vectors (either row-vectors or column-vectors), i.e. matrices which are known at compile-time to have either one row or one column.
| IndexedView_or_Block operator() | ( | const RowIndices & | rowIndices, |
| const ColIndices & | colIndices | ||
| ) |
Each parameter must either be:
int[N]<integral type> stands for any integer type compatible with Eigen::Index (i.e. std::ptrdiff_t).The last statement implies compatibility with std::vector, std::valarray, std::array, many of the Range-v3's ranges, etc.
If the submatrix can be represented using a starting position (i,j) and positive sizes (rows,columns), then this method will returns a Block object after extraction of the relevant information from the passed arguments. This is the case when all arguments are either:
Otherwise a more general IndexedView<Derived,RowIndices',ColIndices'> object will be returned, after conversion of the inputs to more suitable types RowIndices' and ColIndices'.
For 1D vectors and arrays, you better use the operator()(const Indices&) overload, which behave the same way but taking a single parameter.
See also this question and its answer for an example of how to duplicate coefficients.