10#ifndef EIGEN_SPARSE_PERMUTATION_H
11#define EIGEN_SPARSE_PERMUTATION_H
19template<
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)
56 for(
typename MatrixTypeCleaned::InnerIterator
it(
mat,
jsrc);
it; ++
it)
57 tmp.insertByOuterInner(
jdst,
it.index()) =
it.value();
73 for(
typename MatrixTypeCleaned::InnerIterator
it(
mat,
j);
it; ++
it)
77 for(
typename MatrixTypeCleaned::InnerIterator
it(
mat,
j);
it; ++
it)
95template<
typename Lhs,
typename Rhs,
int ProductTag>
97 :
public evaluator<typename permutation_matrix_product<Rhs,OnTheLeft,false,SparseShape>::ReturnType>
110 ::new (
static_cast<Base*
>(
this))
Base(m_result);
118template<
typename Lhs,
typename Rhs,
int ProductTag>
120 :
public evaluator<typename permutation_matrix_product<Lhs,OnTheRight,false,SparseShape>::ReturnType>
133 ::new (
static_cast<Base*
>(
this))
Base(m_result);
145template<
typename SparseDerived,
typename PermDerived>
152template<
typename SparseDerived,
typename PermDerived>
153inline const Product<PermDerived, SparseDerived, AliasFreeProduct>
160template<
typename SparseDerived,
typename PermutationType>
161inline const Product<SparseDerived, Inverse<PermutationType>,
AliasFreeProduct>
169template<
typename SparseDerived,
typename PermutationType>
170inline const Product<Inverse<PermutationType>, SparseDerived,
AliasFreeProduct>
MatrixXf mat
Definition Tutorial_AdvancedInitialization_CommaTemporary.cpp:1
int rows
Definition Tutorial_commainit_02.cpp:1
int cols
Definition Tutorial_commainit_02.cpp:1
SCALAR Scalar
Definition bench_gemm.cpp:46
Base class for permutations.
Definition PermutationMatrix.h:47
EIGEN_DEVICE_FUNC Derived & derived()
Definition EigenBase.h:46
Expression of the product of two arbitrary matrices or vectors.
Definition Product.h:75
Base class of any sparse matrices or sparse expressions.
Definition SparseMatrixBase.h:28
A versatible sparse matrix representation.
Definition SparseMatrix.h:98
Definition TensorRef.h:81
Map< Matrix< T, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > matrix(T *data, int rows, int cols, int stride)
Definition common.h:110
std::vector< Array2i > sizes
Definition dense_solvers.cpp:12
@ ColMajor
Definition Constants.h:319
@ RowMajor
Definition Constants.h:321
@ OnTheLeft
Definition Constants.h:332
@ OnTheRight
Definition Constants.h:334
const unsigned int EvalBeforeNestingBit
Definition Constants.h:70
const unsigned int RowMajorBit
Definition Constants.h:66
@ Lhs
Definition TensorContractionMapper.h:19
@ Rhs
Definition TensorContractionMapper.h:18
Namespace containing all symbols from the Eigen library.
Definition bench_norm.cpp:85
@ AliasFreeProduct
Definition Constants.h:500
EIGEN_DEVICE_FUNC const Product< MatrixDerived, PermutationDerived, AliasFreeProduct > operator*(const MatrixBase< MatrixDerived > &matrix, const PermutationBase< PermutationDerived > &permutation)
Definition PermutationMatrix.h:515
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:74
Definition BandTriangularSolver.h:13
Definition Constants.h:535
Definition Constants.h:516
Definition Constants.h:537
Definition Constants.h:510
Definition CoreEvaluators.h:91
Definition ProductEvaluators.h:86
internal::conditional< MoveOuter, SparseMatrix< Scalar, SrcStorageOrder, StorageIndex >, SparseMatrix< Scalar, int(SrcStorageOrder)==RowMajor?ColMajor:RowMajor, StorageIndex > >::type ReturnType
Definition SparsePermutation.h:35
nested_eval< ExpressionType, 1 >::type MatrixType
Definition SparsePermutation.h:22
static void run(Dest &dst, const PermutationType &perm, const ExpressionType &xpr)
Definition SparsePermutation.h:38
MatrixTypeCleaned::Scalar Scalar
Definition SparsePermutation.h:25
remove_all< MatrixType >::type MatrixTypeCleaned
Definition SparsePermutation.h:23
MatrixTypeCleaned::StorageIndex StorageIndex
Definition SparsePermutation.h:26
Definition ProductEvaluators.h:998
Product< Lhs, Rhs, AliasFreeProduct > XprType
Definition SparsePermutation.h:122
permutation_matrix_product< Lhs, OnTheRight, false, SparseShape >::ReturnType PlainObject
Definition SparsePermutation.h:123
product_evaluator(const XprType &xpr)
Definition SparsePermutation.h:130
evaluator< PlainObject > Base
Definition SparsePermutation.h:124
PlainObject m_result
Definition SparsePermutation.h:138
permutation_matrix_product< Rhs, OnTheLeft, false, SparseShape >::ReturnType PlainObject
Definition SparsePermutation.h:100
evaluator< PlainObject > Base
Definition SparsePermutation.h:101
Product< Lhs, Rhs, AliasFreeProduct > XprType
Definition SparsePermutation.h:99
product_evaluator(const XprType &xpr)
Definition SparsePermutation.h:107
PlainObject m_result
Definition SparsePermutation.h:115
Definition ForwardDeclarations.h:164
Definition ForwardDeclarations.h:17
std::ptrdiff_t j
Definition tut_arithmetic_redux_minmax.cpp:2