![]() |
Eigen
3.2.5
|
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 FullPivLU< _MatrixType >::compute(), and ColPivHouseholderQR< _MatrixType >::compute().
|
inline |
|
inlineinherited |
Referenced by MatrixBase< Derived >::applyOnTheLeft(), MatrixBase< Derived >::applyOnTheRight(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::binaryExpr(), EigenBase< SparseSymmetricPermutationProduct< MatrixType, UpLo > >::cols(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::cols(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::eval(), SparseQR< _MatrixType, _OrderingType >::factorize(), PermutationMatrix< RowsAtCompileTime, MaxRowsAtCompileTime >::indices(), PermutationWrapper< _IndicesType >::indices(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::innerSize(), SparseVector< _Scalar, _Options, _Index >::nonZeros(), RotationBase< Derived, 3 >::operator*(), SparseSelfAdjointView< MatrixType, UpLo >::operator*(), Translation< _Scalar, _Dim >::operator*(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::operator*(), SparseMatrixBase< Derived >::operator*(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::operator*(), Transform< _Scalar, _Dim, _Mode, _Options >::operator*(), MatrixBase< Derived >::operator*=(), MatrixBase< Derived >::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(), SparseMatrix< _Scalar, _Options, _Index >::setFromTriplets(), SparseMatrix< Scalar, RowMajor >::setIdentity(), EigenBase< SparseSymmetricPermutationProduct< MatrixType, UpLo > >::size(), SimplicialCholeskyBase< SimplicialLDLT< _MatrixType, _UpLo, _Ordering > >::solve(), IterativeSolverBase< ConjugateGradient< _MatrixType, _UpLo, _Preconditioner > >::solve(), SparseLU< _MatrixType, _OrderingType >::solve(), SparseQR< _MatrixType, _OrderingType >::solve(), UmfPackLU< _MatrixType >::solve(), CholmodBase< _MatrixType, _UpLo, CholmodSimplicialLLT< _MatrixType, _UpLo > >::solve(), SuperLUBase< _MatrixType, SuperILU< _MatrixType > >::solve(), SparseMatrix< Scalar, RowMajor >::SparseMatrix(), SparseVector< _Scalar, _Options, _Index >::swap(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::topLeftCorner(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::topRows(), Transform< _Scalar, _Dim, _Mode, _Options >::Transform(), SparseSelfAdjointView< MatrixType, UpLo >::twistedBy(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::twistedBy(), and SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::unaryViewExpr().
|
inlineinherited |
|
inline |
This function is O(n
) procedure allocating a buffer of n
booleans.
Referenced by SparseLU< _MatrixType, _OrderingType >::factorize().
|
inline |
const version of indices().
Referenced by PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::operator=(), PermutationMatrix< RowsAtCompileTime, MaxRowsAtCompileTime >::operator=(), and PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::transpose().
|
inline |
|
inline |
Referenced by SparseLU< _MatrixType, _OrderingType >::factorize(), SparseLU< _MatrixType, _OrderingType >::lastErrorMessage(), and FullPivLU< _MatrixType >::reconstructedMatrix().
|
inline |
|
inline |
|
inline |
Copies the other permutation into *this
|
inline |
Assignment from the Transpositions tr
|
inline |
Resizes to given size.
Referenced by SparseLU< _MatrixType, _OrderingType >::factorize(), NaturalOrdering< Index >::operator()(), and COLAMDOrdering< Index >::operator()().
|
inline |
|
inline |
Sets *this to be the identity permutation matrix
Referenced by FullPivLU< _MatrixType >::compute(), and ColPivHouseholderQR< _MatrixType >::compute().
|
inline |
Sets *this to be the identity permutation matrix of given size.
|
inline |
Referenced by SparseLU< _MatrixType, _OrderingType >::analyzePattern(), SparseLU< _MatrixType, _OrderingType >::factorize(), PermutationMatrix< RowsAtCompileTime, MaxRowsAtCompileTime >::indices(), SimplicialCholeskyBase< SimplicialLDLT< _MatrixType, _UpLo, _Ordering > >::setShift(), and PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >::size().
|
inline |
|
inline |
|
friend |