![]() |
Eigen
3.2.7
|
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.
Public Member Functions | |
Derived & | applyTranspositionOnTheLeft (Index i, Index j) |
Derived & | applyTranspositionOnTheRight (Index i, Index j) |
Index | cols () const |
Derived & | derived () |
const Derived & | derived () const |
Index | determinant () 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 newSize) |
Index | rows () const |
void | setIdentity () |
void | setIdentity (Index newSize) |
Index | size () const |
DenseMatrixType | toDenseMatrix () const |
Transpose< PermutationBase > | transpose () const |
Friends | |
template<typename Other > | |
PlainPermutationType | operator* (const Transpose< PermutationBase< Other > > &other, const PermutationBase &perm) |
|
inline |
Multiplies *this by the transposition on the left.
|
inline |
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, IndexType > >::operator=().
|
inline |
|
inlineinherited |
Referenced by IterativeSolverBase< ConjugateGradient< _MatrixType, _UpLo, _Preconditioner > >::analyzePattern(), MatrixBase< Derived >::applyOnTheLeft(), MatrixBase< Derived >::applyOnTheRight(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::applyTranspositionOnTheLeft(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::applyTranspositionOnTheRight(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::bottomRows(), EigenBase< SparseSymmetricPermutationProduct< MatrixType, UpLo > >::cols(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::cols(), IterativeSolverBase< ConjugateGradient< _MatrixType, _UpLo, _Preconditioner > >::compute(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::eval(), IterativeSolverBase< ConjugateGradient< _MatrixType, _UpLo, _Preconditioner > >::factorize(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::indices(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::inverse(), IterativeSolverBase< ConjugateGradient< _MatrixType, _UpLo, _Preconditioner > >::IterativeSolverBase(), RotationBase< Derived, 3 >::operator*(), SparseSelfAdjointView< MatrixType, UpLo >::operator*(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::operator*(), SparseMatrixBase< Derived >::operator*(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::operator*(), Transform< Scalar, Dim, Mode, _Options >::operator*(), Eigen::operator*(), MatrixBase< Derived >::operator*=(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::operator=(), DenseBase< Derived >::operator=(), Transform< Scalar, Dim, Mode, _Options >::operator=(), PlainObjectBase< Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::operator=(), PlainObjectBase< Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::PlainObjectBase(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::real(), PlainObjectBase< Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::resizeLike(), EigenBase< SparseSymmetricPermutationProduct< MatrixType, UpLo > >::rows(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::rows(), SimplicialCholeskyBase< SimplicialLDLT< _MatrixType, _UpLo, _Ordering > >::solve(), IterativeSolverBase< ConjugateGradient< _MatrixType, _UpLo, _Preconditioner > >::solve(), SparseLU< _MatrixType, _OrderingType >::solve(), UmfPackLU< _MatrixType >::solve(), CholmodBase< _MatrixType, _UpLo, CholmodSimplicialLLT< _MatrixType, _UpLo > >::solve(), SuperLUBase< _MatrixType, SuperILU< _MatrixType > >::solve(), SparseMatrix< Scalar, RowMajor >::SparseMatrix(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::toDenseMatrix(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::topLeftCorner(), Transform< Scalar, Dim, Mode, _Options >::Transform(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::transpose(), and SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::twistedBy().
|
inlineinherited |
|
inline |
This function is O(n
) procedure allocating a buffer of n
booleans.
|
inline |
const version of indices().
Referenced by PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::applyTranspositionOnTheLeft(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::applyTranspositionOnTheRight(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::cols(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::determinant(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::operator=(), PermutationMatrix< RowsAtCompileTime, MaxRowsAtCompileTime >::operator=(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::resize(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::rows(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::setIdentity(), and PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::size().
|
inline |
|
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 NaturalOrdering< Index >::operator()(), COLAMDOrdering< Index >::operator()(), and PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::setIdentity().
|
inline |
|
inline |
Sets *this to be the identity permutation matrix
Referenced by PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::operator=(), and PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::setIdentity().
|
inline |
Sets *this to be the identity permutation matrix of given size.
|
inline |
Referenced by PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::applyTranspositionOnTheLeft(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::applyTranspositionOnTheRight(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::cols(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::determinant(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::operator=(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::rows(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::setIdentity(), and PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::size().
|
inline |
|
inline |
|
friend |