Eigen::IndexedView< XprType, RowIndices, ColIndices > Class Template Reference

Expression of a non-sequential sub-matrix defined by arbitrary sequences of row and column indices. More...

#include <IndexedView.h>

+ Inheritance diagram for Eigen::IndexedView< XprType, RowIndices, ColIndices >:

Public Types

typedef internal::IndexedViewImpl< XprType, RowIndices, ColIndices, typename internal::traits< XprType >::StorageKind,(internal::traits< IndexedView< XprType, RowIndices, ColIndices >>::Flags &DirectAccessBit) !=0 > Base
 
- Public Types inherited from Eigen::internal::IndexedViewImpl< XprType, RowIndices, ColIndices, internal::traits< XprType >::StorageKind,(internal::traits< IndexedView< XprType, RowIndices, ColIndices > >::Flags &DirectAccessBit) !=0 >
typedef internal::generic_xpr_base< IndexedView< XprType, RowIndices, ColIndices > >::type Base
 
typedef internal::ref_selector< XprType >::non_const_type MatrixTypeNested
 
typedef internal::remove_all_t< XprTypeNestedExpression
 
typedef XprType::Scalar Scalar
 

Public Member Functions

template<typename T0 , typename T1 >
 IndexedView (XprType &xpr, const T0 &rowIndices, const T1 &colIndices)
 
- Public Member Functions inherited from Eigen::internal::IndexedViewImpl< XprType, RowIndices, ColIndices, internal::traits< XprType >::StorageKind,(internal::traits< IndexedView< XprType, RowIndices, ColIndices > >::Flags &DirectAccessBit) !=0 >
 IndexedViewImpl (XprType &xpr, const T0 &rowIndices, const T1 &colIndices)
 
Index rows () const
 
Index cols () const
 
const internal::remove_all_t< XprType > & nestedExpression () const
 
std::remove_reference_t< XprType > & nestedExpression ()
 
const RowIndices & rowIndices () const
 
const ColIndices & colIndices () const
 
constexpr ScalarcoeffRef (Index rowId, Index colId)
 
constexpr const ScalarcoeffRef (Index rowId, Index colId) const
 

Additional Inherited Members

- Protected Attributes inherited from Eigen::internal::IndexedViewImpl< XprType, RowIndices, ColIndices, internal::traits< XprType >::StorageKind,(internal::traits< IndexedView< XprType, RowIndices, ColIndices > >::Flags &DirectAccessBit) !=0 >
MatrixTypeNested m_xpr
 
RowIndices m_rowIndices
 
ColIndices m_colIndices
 

Detailed Description

template<typename XprType, typename RowIndices, typename ColIndices>
class Eigen::IndexedView< XprType, RowIndices, ColIndices >

Expression of a non-sequential sub-matrix defined by arbitrary sequences of row and column indices.

Template Parameters
XprTypethe type of the expression in which we are taking the intersections of sub-rows and sub-columns
RowIndicesthe type of the object defining the sequence of row indices
ColIndicesthe type of the object defining the sequence of column indices

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 \( \{r_0,r_1,..r_{m-1}\} \) and column indices \( \{c_0,c_1,..c_{n-1} \}\). Let \( A \) be the nested matrix, then the resulting matrix \( B \) has m rows and n columns, and its entries are given by: \( B(i,j) = A(r_i,c_j) \).

The RowIndices and ColIndices types must be compatible with the following API:

<integral type> operator[](Index) const;
Index size() const;
Scalar Scalar int size
Definition: benchVecAdd.cpp:17
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
type
Definition: compute_granudrum_aor.py:141

Typical supported types thus include:

  • std::vector<int>
  • std::valarray<int>
  • std::array<int>
  • Eigen::ArrayXi
  • decltype(ArrayXi::LinSpaced(...))
  • Any view/expressions of the previous types
  • Eigen::ArithmeticSequence
  • Eigen::internal::AllRange (helper for Eigen::placeholders::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::operator()(const RowIndices&, const ColIndices&).

See also
class Block

Member Typedef Documentation

◆ Base

template<typename XprType , typename RowIndices , typename ColIndices >
typedef internal::IndexedViewImpl< XprType, RowIndices, ColIndices, typename internal::traits<XprType>::StorageKind, (internal::traits<IndexedView<XprType, RowIndices, ColIndices>>::Flags & DirectAccessBit) != 0> Eigen::IndexedView< XprType, RowIndices, ColIndices >::Base

Constructor & Destructor Documentation

◆ IndexedView()

template<typename XprType , typename RowIndices , typename ColIndices >
template<typename T0 , typename T1 >
Eigen::IndexedView< XprType, RowIndices, ColIndices >::IndexedView ( XprType xpr,
const T0 &  rowIndices,
const T1 &  colIndices 
)
inline
134 : Base(xpr, rowIndices, colIndices) {}
internal::IndexedViewImpl< XprType, RowIndices, ColIndices, typename internal::traits< XprType >::StorageKind,(internal::traits< IndexedView< XprType, RowIndices, ColIndices >>::Flags &DirectAccessBit) !=0 > Base
Definition: IndexedView.h:129

The documentation for this class was generated from the following file: