Base class for permutations. More...
#include <PermutationMatrix.h>
Public Types | |
typedef internal::traits < Derived >::Index | Index |
typedef internal::traits < Derived >::StorageKind | StorageKind |
Public Member Functions | |
template<typename Dest > | |
void | addTo (Dest &dst) const |
template<typename Dest > | |
void | applyThisOnTheLeft (Dest &dst) const |
template<typename Dest > | |
void | applyThisOnTheRight (Dest &dst) const |
Derived & | applyTranspositionOnTheLeft (Index i, Index j) |
Derived & | applyTranspositionOnTheRight (Index i, Index j) |
Index | cols () const |
Derived & | const_cast_derived () const |
const Derived & | const_derived () const |
Derived & | derived () |
const Derived & | derived () const |
template<typename Dest > | |
void | evalTo (Dest &dst) const |
const IndicesType & | indices () const |
IndicesType & | indices () |
Transpose< PermutationBase > | inverse () const |
template<typename Other > | |
PlainPermutationType | operator* (const PermutationBase< Other > &other) const |
template<typename Other > | |
PlainPermutationType | operator* (const Transpose< PermutationBase< Other > > &other) const |
template<typename OtherDerived > | |
Derived & | operator= (const PermutationBase< OtherDerived > &other) |
template<typename OtherDerived > | |
Derived & | operator= (const TranspositionsBase< OtherDerived > &tr) |
void | resize (Index size) |
Index | rows () const |
void | setIdentity () |
void | setIdentity (Index size) |
Index | size () const |
template<typename Dest > | |
void | subTo (Dest &dst) const |
DenseMatrixType | toDenseMatrix () const |
Transpose< PermutationBase > | transpose () const |
Friends | |
template<typename Other > | |
PlainPermutationType | operator* (const Transpose< PermutationBase< Other > > &other, const PermutationBase &perm) |
Base class for permutations.
Derived | the derived class |
This class is the base class for all expressions representing a permutation matrix, internally stored as a vector of integers. The convention followed here is that if is a permutation, the corresponding permutation matrix
is such that if
is the canonical basis, we have:
This convention ensures that for any two permutations , we have:
Permutation matrices are square and invertible.
Notice that in addition to the member functions and operators listed here, there also are non-member operator* to multiply any kind of permutation object with any kind of matrix expression (MatrixBase) on either side.
|
inherited |
|
inlineinherited |
|
inlineinherited |
Reimplemented in HouseholderSequence< VectorsType, CoeffsType, Side >.
|
inlineinherited |
Reimplemented in HouseholderSequence< VectorsType, CoeffsType, Side >.
Multiplies *this by the transposition on the left.
Multiplies *this by the transposition on the right.
This is a fast operation, it only consists in swapping two indices.
Referenced by PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::operator=().
|
inline |
Reimplemented from EigenBase< Derived >.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Referenced by MatrixBase< Derived >::applyOnTheLeft(), MatrixBase< Derived >::applyOnTheRight(), EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::applyThisOnTheLeft(), EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::applyThisOnTheRight(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::applyTranspositionOnTheLeft(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::applyTranspositionOnTheRight(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::assign(), SparseVector< _Scalar, _Options, _Index >::assign(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::assignGeneric(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::binaryExpr(), TriangularBase< SelfAdjointView< MatrixType, UpLo > >::coeff(), TriangularBase< SelfAdjointView< MatrixType, UpLo > >::coeffRef(), EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::cols(), TriangularBase< SelfAdjointView< MatrixType, UpLo > >::cols(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::cols(), TriangularBase< SelfAdjointView< MatrixType, UpLo > >::copyCoeff(), SparseMatrixBase< Derived >::dot(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::eval(), EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::evalTo(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::evalTo(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::indices(), TriangularBase< SelfAdjointView< MatrixType, UpLo > >::innerStride(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::inverse(), TriangularView< _MatrixType, _Mode >::lazyAssign(), SluMatrix::Map(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::markAsRValue(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::nonZeros(), RotationBase< Derived, 3 >::operator*(), Translation< _Scalar, _Dim >::operator*(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::operator*(), SparseMatrixBase< Derived >::operator*(), Transform< _Scalar, _Dim, _Mode, _Options >::operator*(), Eigen::operator*(), MatrixBase< Derived >::operator*=(), DenseBase< Derived >::operator+=(), SparseMatrixBase< Derived >::operator+=(), DenseBase< Derived >::operator-=(), SparseMatrixBase< Derived >::operator-=(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::operator=(), MatrixBase< Derived >::operator=(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::operator=(), TriangularView< _MatrixType, _Mode >::operator=(), DenseBase< Derived >::operator=(), Transform< _Scalar, _Dim, _Mode, _Options >::operator=(), Map< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType >, _PacketAccess >::operator=(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::operator=(), SparseMatrix< Scalar, RowMajor >::operator=(), TriangularBase< SelfAdjointView< MatrixType, UpLo > >::outerStride(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::PlainObjectBase(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::resizeLike(), EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::rows(), TriangularBase< SelfAdjointView< MatrixType, UpLo > >::rows(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::rows(), SimplicialCholeskyBase< SimplicialLDLT< _MatrixType, _UpLo > >::solve(), PardisoImpl< PardisoLU< MatrixType > >::solve(), IterativeSolverBase< ConjugateGradient< _MatrixType, _UpLo, _Preconditioner > >::solve(), CholmodBase< _MatrixType, _UpLo, CholmodSimplicialLLT< _MatrixType, _UpLo > >::solve(), PastixBase< PastixLU< _MatrixType > >::solve(), SparseTriangularView< MatrixType, Mode >::solveInPlace(), SparseMatrix< Scalar, RowMajor >::SparseMatrix(), SparseVector< _Scalar, _Options, _Index >::SparseVector(), TriangularView< _MatrixType, _Mode >::swap(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::toDense(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::toDenseMatrix(), Transform< _Scalar, _Dim, _Mode, _Options >::Transform(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::transpose(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::transpose(), and SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::twistedBy().
|
inlineinherited |
|
inlineinherited |
|
inline |
const version of indices().
Reimplemented in PermutationWrapper< _IndicesType >, Map< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType >, _PacketAccess >, PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType >, PermutationMatrix< Dynamic, Dynamic, Index >, PermutationMatrix< Dynamic, Dynamic >, PermutationMatrix< ColsAtCompileTime, MaxColsAtCompileTime >, and PermutationMatrix< RowsAtCompileTime, MaxRowsAtCompileTime >.
Referenced by PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::applyTranspositionOnTheLeft(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::applyTranspositionOnTheRight(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::cols(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::operator=(), PermutationMatrix< RowsAtCompileTime, MaxRowsAtCompileTime >::operator=(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::resize(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::rows(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::setIdentity(), and PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::size().
|
inline |
Reimplemented in Map< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType >, _PacketAccess >, PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType >, PermutationMatrix< Dynamic, Dynamic, Index >, PermutationMatrix< Dynamic, Dynamic >, PermutationMatrix< ColsAtCompileTime, MaxColsAtCompileTime >, and PermutationMatrix< RowsAtCompileTime, MaxRowsAtCompileTime >.
|
inline |
|
inline |
|
inline |
|
inline |
Copies the other permutation into *this
Referenced by PermutationMatrix< RowsAtCompileTime, MaxRowsAtCompileTime >::operator=().
|
inline |
Assignment from the Transpositions tr
|
inline |
Resizes to given size.
Referenced by Eigen::internal::minimum_degree_ordering(), and PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::setIdentity().
|
inline |
Reimplemented from EigenBase< Derived >.
|
inline |
Sets *this to be the identity permutation matrix
Referenced by PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::operator=(), and PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::setIdentity().
|
inline |
Sets *this to be the identity permutation matrix of given size.
|
inline |
Reimplemented from EigenBase< Derived >.
Referenced by PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::applyTranspositionOnTheLeft(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::applyTranspositionOnTheRight(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::operator=(), and PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::setIdentity().
|
inlineinherited |
|
inline |
|
inline |
|
friend |