10 #ifndef EIGEN_SPARSE_PERMUTATION_H    11 #define EIGEN_SPARSE_PERMUTATION_H    19 template<
typename ExpressionType, 
int S
ide, 
bool Transposed>
    25     typedef typename MatrixTypeCleaned::Scalar 
Scalar;
    37     template<
typename Dest,
typename PermutationType>
    38     static inline void run(Dest& dst, 
const PermutationType& perm, 
const ExpressionType& xpr)
    43         SparseMatrix<Scalar,SrcStorageOrder,StorageIndex> tmp(mat.rows(), mat.cols());
    45         for(
Index j=0; j<mat.outerSize(); ++j)
    48           sizes[((Side==
OnTheLeft) ^ Transposed) ? jp : j] = StorageIndex(mat.innerVector(((Side==
OnTheRight) ^ Transposed) ? jp : j).nonZeros());
    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)
    57             tmp.insertByOuterInner(jdst,it.index()) = it.value();
    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>
   160 template<
typename SparseDerived, 
typename PermutationType>
   169 template<
typename SparseDerived, 
typename PermutationType>
   178 #endif // EIGEN_SPARSE_SELFADJOINTVIEW_H static void run(Dest &dst, const PermutationType &perm, const ExpressionType &xpr)
Expression of the product of two arbitrary matrices or vectors. 
A versatible sparse matrix representation. 
evaluator< PlainObject > Base
internal::conditional< MoveOuter, SparseMatrix< Scalar, SrcStorageOrder, StorageIndex >, SparseMatrix< Scalar, int(SrcStorageOrder)==RowMajor?ColMajor:RowMajor, StorageIndex > >::type ReturnType
EIGEN_DEVICE_FUNC const LhsNestedCleaned & lhs() const
nested_eval< ExpressionType, 1 >::type MatrixType
const unsigned int RowMajorBit
Base class for permutations. 
permutation_matrix_product< Lhs, OnTheRight, false, SparseShape >::ReturnType PlainObject
remove_all< MatrixType >::type MatrixTypeCleaned
product_evaluator(const XprType &xpr)
Base class of any sparse matrices or sparse expressions. 
MatrixTypeCleaned::Scalar Scalar
const IndicesType & indices() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & coeff(Index rowId, Index colId) const
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API. 
EIGEN_DEVICE_FUNC const Product< MatrixDerived, PermutationDerived, AliasFreeProduct > operator*(const MatrixBase< MatrixDerived > &matrix, const PermutationBase< PermutationDerived > &permutation)
EIGEN_DEVICE_FUNC Derived & setZero(Index size)
evaluator< PlainObject > Base
InverseReturnType transpose() const
const Derived & derived() const
Product< Lhs, Rhs, AliasFreeProduct > XprType
const unsigned int EvalBeforeNestingBit
MatrixTypeCleaned::StorageIndex StorageIndex
product_evaluator(const XprType &xpr)
EIGEN_DEVICE_FUNC Derived & derived()
Product< Lhs, Rhs, AliasFreeProduct > XprType
permutation_matrix_product< Rhs, OnTheLeft, false, SparseShape >::ReturnType PlainObject
EIGEN_DEVICE_FUNC const RhsNestedCleaned & rhs() const