Base class for permutations. More...
#include <PermutationMatrix.h>
Inheritance diagram for PermutationBase< Derived >:Public Member Functions | |
| Derived & | applyTranspositionOnTheLeft (Index i, Index j) |
| Derived & | applyTranspositionOnTheRight (Index i, Index j) |
| Index | cols () const |
| Derived & | derived () |
| const Derived & | derived () const |
| IndicesType & | indices () |
| const IndicesType & | indices () const |
| 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 |
| DenseMatrixType | toDenseMatrix () const |
| Transpose< PermutationBase > | transpose () const |
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 


![\[ P_\sigma(e_i) = e_{\sigma(i)}. \]](form_22.png)
This convention ensures that for any two permutations 
![\[ P_{\sigma\circ\tau} = P_\sigma P_\tau. \]](form_24.png)
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.
|
inline |
Multiplies *this by the transposition 
|
inline |
Multiplies *this by the transposition 
This is a fast operation, it only consists in swapping two indices.
Referenced by PermutationBase< PermutationMatrix >::operator=().
|
inline |
|
inlineinherited |
Referenced by MatrixBase< Derived >::applyOnTheLeft(), MatrixBase< Derived >::applyOnTheRight(), PermutationBase< PermutationMatrix >::applyTranspositionOnTheLeft(), PermutationBase< PermutationMatrix >::applyTranspositionOnTheRight(), SparseMatrixBase< SparseDenseOuterProduct >::binaryExpr(), cols(), SparseMatrixBase< SparseDenseOuterProduct >::imag(), PermutationBase< PermutationMatrix >::indices(), PermutationBase< PermutationMatrix >::indices(), SparseMatrixBase< Derived >::innerVector(), SparseMatrixBase< Derived >::innerVector(), SparseMatrixBase< SparseDenseOuterProduct >::innerVector(), SparseMatrixBase< Derived >::innerVectors(), SparseMatrixBase< Derived >::innerVectors(), PermutationBase< PermutationMatrix >::inverse(), PermutationBase< PermutationMatrix >::operator*(), RotationBase< AngleAxis< _Scalar >, 3 >::operator*(), RotationBase< AngleAxis< _Scalar >, 3 >::operator*, SparseMatrixBase< Derived >::operator*(), SparseMatrixBase< Derived >::operator*(), SparseMatrixBase< SparseDenseOuterProduct >::operator*, Transform< Scalar, Dim, Mode, Options >::operator*, Transform< Scalar, Dim, Mode, Options >::operator*(), Translation< _Scalar, _Dim >::operator*(), Translation< Scalar, Dim >::operator*, MatrixBase< Derived >::operator*=(), DenseBase< Derived >::operator=(), PermutationBase< PermutationMatrix >::operator=(), PermutationBase< PermutationMatrix >::operator=(), PlainObjectBase< Array >::operator=(), Transform< Scalar, Dim, Mode, Options >::operator=(), PlainObjectBase< Array >::PlainObjectBase(), PlainObjectBase< Array >::resizeLike(), rows(), CholmodBase< _MatrixType, _UpLo, CholmodSimplicialLLT >::solve(), IterativeSolverBase< BiCGSTAB >::solve(), SimplicialCholeskyBase< SimplicialLLT >::solve(), SparseMatrix< Scalar, RowMajor >::SparseMatrix(), SparseMatrix< Scalar, RowMajor >::SparseMatrix(), PermutationBase< PermutationMatrix >::toDenseMatrix(), Transform< Scalar, Dim, Mode, Options >::Transform(), PermutationBase< PermutationMatrix >::transpose(), and SparseMatrixBase< SparseDenseOuterProduct >::unaryExpr().
|
inlineinherited |
|
inline |
|
inline |
const version of indices().
Referenced by PermutationBase< PermutationMatrix >::applyTranspositionOnTheLeft(), PermutationBase< PermutationMatrix >::applyTranspositionOnTheRight(), PermutationBase< PermutationMatrix >::cols(), PermutationBase< PermutationMatrix >::operator=(), PermutationMatrix< RowsAtCompileTime, MaxRowsAtCompileTime >::operator=(), PermutationBase< PermutationMatrix >::resize(), PermutationBase< PermutationMatrix >::rows(), PermutationBase< PermutationMatrix >::setIdentity(), and PermutationBase< PermutationMatrix >::size().
|
inline |
|
inline |
|
inline |
|
inline |
Copies the other permutation into *this
|
inline |
Assignment from the Transpositions tr
|
inline |
Resizes to given size.
Referenced by PermutationBase< PermutationMatrix >::setIdentity().
|
inline |
|
inline |
Sets *this to be the identity permutation matrix
Referenced by PermutationBase< PermutationMatrix >::operator=(), and PermutationBase< PermutationMatrix >::setIdentity().
|
inline |
Sets *this to be the identity permutation matrix of given size.
|
inline |
Referenced by PermutationBase< PermutationMatrix >::applyTranspositionOnTheLeft(), PermutationBase< PermutationMatrix >::applyTranspositionOnTheRight(), PermutationBase< PermutationMatrix >::cols(), PermutationBase< PermutationMatrix >::operator=(), PermutationBase< PermutationMatrix >::rows(), PermutationBase< PermutationMatrix >::setIdentity(), and PermutationBase< PermutationMatrix >::size().
|
inline |
|
inline |