template<typename XprType, typename RowIndices, typename ColIndices>
IndexedView class
Expression of a non-sequential sub-matrix defined by arbitrary sequences of row and column indices.
Template parameters | |
---|---|
XprType | the type of the expression in which we are taking the intersections of sub-rows and sub-columns |
RowIndices | the type of the object defining the sequence of row indices |
ColIndices | the type of the object defining the sequence of column indices |
Contents
- Reference
This class represents an expression of a sub-matrix (or sub-vector) defined as the intersection of sub-sets of rows and columns, that are themself defined by generic sequences of row indices and column indices . Let be the nested matrix, then the resulting matrix has m
rows and n
columns, and its entries are given by: .
The RowIndices
and ColIndices
types must be compatible with the following API:
<integral type> operator[](Index) const; Index size() const;
Typical supported types thus include:
- std::vector<int>
- std::valarray<int>
- std::array<int>
- Plain C arrays: int[N]
- Eigen::ArrayXi
- decltype(ArrayXi::LinSpaced(...))
- Any view/expressions of the previous types
- Eigen::
ArithmeticSequence - Eigen::internal::AllRange (helper for Eigen::
all) - Eigen::internal::SingleRange (helper for single index)
- etc.
In typical usages of Eigen, this class should never be used directly. It is the return type of DenseBase::
Public functions
- auto colIndices() const -> const ColIndices&
- auto cols() const -> Index
- auto nestedExpression() const -> const internal::remove_all<XprType>::type&
- auto nestedExpression() -> internal::remove_reference<XprType>::type&
- auto rowIndices() const -> const RowIndices&
- auto rows() const -> Index
Function documentation
template<typename XprType, typename RowIndices, typename ColIndices>
const ColIndices& Eigen:: IndexedView<XprType, RowIndices, ColIndices>:: colIndices() const
Returns | a const reference to the object storing/generating the column indices |
---|
template<typename XprType, typename RowIndices, typename ColIndices>
const internal::remove_all<XprType>::type& Eigen:: IndexedView<XprType, RowIndices, ColIndices>:: nestedExpression() const
Returns | the nested expression |
---|
template<typename XprType, typename RowIndices, typename ColIndices>
internal::remove_reference<XprType>::type& Eigen:: IndexedView<XprType, RowIndices, ColIndices>:: nestedExpression()
Returns | the nested expression |
---|
template<typename XprType, typename RowIndices, typename ColIndices>
const RowIndices& Eigen:: IndexedView<XprType, RowIndices, ColIndices>:: rowIndices() const
Returns | a const reference to the object storing/generating the row indices |
---|