Go to the documentation of this file.
10 #ifndef EIGEN_SPARSE_PERMUTATION_H
11 #define EIGEN_SPARSE_PERMUTATION_H
19 template<
typename ExpressionType,
int S
ide,
bool Transposed>
37 template<
typename Dest,
typename PermutationType>
38 static inline void run(Dest& dst,
const PermutationType& perm,
const ExpressionType& xpr)
45 for(
Index j=0; j<
mat.outerSize(); ++j)
47 Index jp = perm.indices().coeff(j);
51 for(
Index j=0; j<
mat.outerSize(); ++j)
53 Index jp = perm.indices().coeff(j);
56 for(
typename MatrixTypeCleaned::InnerIterator it(
mat,jsrc); it; ++it)
72 for(
Index j=0; j<
mat.outerSize(); ++j)
73 for(
typename MatrixTypeCleaned::InnerIterator it(
mat,j); it; ++it)
74 sizes[perm_cpy.
indices().coeff(it.index())]++;
76 for(
Index j=0; j<
mat.outerSize(); ++j)
77 for(
typename MatrixTypeCleaned::InnerIterator it(
mat,j); it; ++it)
78 tmp.insertByOuterInner(perm_cpy.
indices().coeff(it.index()),j) = it.value();
95 template<
typename Lhs,
typename Rhs,
int ProductTag>
97 :
public evaluator<typename permutation_matrix_product<Rhs,OnTheLeft,false,SparseShape>::ReturnType>
108 : m_result(xpr.rows(), xpr.cols())
110 ::new (
static_cast<Base*
>(
this))
Base(m_result);
118 template<
typename Lhs,
typename Rhs,
int ProductTag>
120 :
public evaluator<typename permutation_matrix_product<Lhs,OnTheRight,false,SparseShape>::ReturnType>
131 : m_result(xpr.rows(), xpr.cols())
133 ::new (
static_cast<Base*
>(
this))
Base(m_result);
145 template<
typename SparseDerived,
typename PermDerived>
152 template<
typename SparseDerived,
typename PermDerived>
153 inline const Product<PermDerived, SparseDerived, AliasFreeProduct>
160 template<
typename SparseDerived,
typename PermutationType>
161 inline const Product<SparseDerived, Inverse<PermutationType>,
AliasFreeProduct>
169 template<
typename SparseDerived,
typename PermutationType>
170 inline const Product<Inverse<PermutationType>, SparseDerived,
AliasFreeProduct>
178 #endif // EIGEN_SPARSE_SELFADJOINTVIEW_H
A versatible sparse matrix representation.
remove_all< MatrixType >::type MatrixTypeCleaned
EIGEN_DEVICE_FUNC Derived & derived()
const IndicesType & indices() const
InverseReturnType transpose() const
evaluator< PlainObject > Base
MatrixTypeCleaned::Scalar Scalar
const unsigned int RowMajorBit
Product< Lhs, Rhs, AliasFreeProduct > XprType
const EIGEN_DEVICE_FUNC RhsNestedCleaned & rhs() const
Map< Matrix< T, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > matrix(T *data, int rows, int cols, int stride)
const EIGEN_DEVICE_FUNC Product< MatrixDerived, PermutationDerived, AliasFreeProduct > operator*(const MatrixBase< MatrixDerived > &matrix, const PermutationBase< PermutationDerived > &permutation)
permutation_matrix_product< Lhs, OnTheRight, false, SparseShape >::ReturnType PlainObject
nested_eval< ExpressionType, 1 >::type MatrixType
MatrixTypeCleaned::StorageIndex StorageIndex
Expression of the product of two arbitrary matrices or vectors.
Product< Lhs, Rhs, AliasFreeProduct > XprType
void reserve(Index reserveSize)
product_evaluator(const XprType &xpr)
evaluator< PlainObject > Base
Base class for permutations.
Base class of any sparse matrices or sparse expressions.
static void run(Dest &dst, const PermutationType &perm, const ExpressionType &xpr)
Scalar & insertByOuterInner(Index j, Index i)
EIGEN_DEVICE_FUNC Derived & setZero(Index size)
EIGEN_DEVICE_FUNC Derived & derived()
const unsigned int EvalBeforeNestingBit
internal::conditional< MoveOuter, SparseMatrix< Scalar, SrcStorageOrder, StorageIndex >, SparseMatrix< Scalar, int(SrcStorageOrder)==RowMajor?ColMajor:RowMajor, StorageIndex > >::type ReturnType
permutation_matrix_product< Rhs, OnTheLeft, false, SparseShape >::ReturnType PlainObject
product_evaluator(const XprType &xpr)
const EIGEN_DEVICE_FUNC LhsNestedCleaned & lhs() const
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
control_box_rst
Author(s): Christoph Rösmann
autogenerated on Wed Mar 2 2022 00:06:22