![]() |
Eigen
3.3.3
|
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 |
Index | determinant () const |
const IndicesType & | indices () const |
IndicesType & | indices () |
InverseReturnType | inverse () const |
template<typename Other > | |
PlainPermutationType | operator* (const PermutationBase< Other > &other) const |
template<typename Other > | |
PlainPermutationType | operator* (const InverseImpl< Other, PermutationStorage > &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 |
InverseReturnType | transpose () const |
Friends | |
template<typename Other > | |
PlainPermutationType | operator* (const InverseImpl< Other, PermutationStorage > &other, const PermutationBase &perm) |
Derived& Eigen::PermutationBase< Derived >::applyTranspositionOnTheLeft | ( | Index | i, |
Index | j | ||
) | [inline] |
Multiplies *this by the transposition on the left.
Derived& Eigen::PermutationBase< Derived >::applyTranspositionOnTheRight | ( | Index | i, |
Index | j | ||
) | [inline] |
Multiplies *this by the transposition on the right.
This is a fast operation, it only consists in swapping two indices.
Index Eigen::PermutationBase< Derived >::cols | ( | void | ) | const [inline] |
Reimplemented from Eigen::EigenBase< Derived >.
Index Eigen::PermutationBase< Derived >::determinant | ( | ) | const [inline] |
This function is O(n
) procedure allocating a buffer of n
booleans.
const IndicesType& Eigen::PermutationBase< Derived >::indices | ( | ) | const [inline] |
const version of indices().
Reimplemented in Eigen::PermutationWrapper< _IndicesType >, Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >, Eigen::PermutationMatrix< ColsAtCompileTime, MaxColsAtCompileTime >, Eigen::PermutationMatrix< Dynamic, Dynamic, StorageIndex >, and Eigen::PermutationMatrix< RowsAtCompileTime, MaxRowsAtCompileTime >.
IndicesType& Eigen::PermutationBase< Derived >::indices | ( | ) | [inline] |
Reimplemented in Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >, Eigen::PermutationMatrix< ColsAtCompileTime, MaxColsAtCompileTime >, Eigen::PermutationMatrix< Dynamic, Dynamic, StorageIndex >, and Eigen::PermutationMatrix< RowsAtCompileTime, MaxRowsAtCompileTime >.
InverseReturnType Eigen::PermutationBase< Derived >::inverse | ( | ) | const [inline] |
PlainPermutationType Eigen::PermutationBase< Derived >::operator* | ( | const PermutationBase< Other > & | other | ) | const [inline] |
PlainPermutationType Eigen::PermutationBase< Derived >::operator* | ( | const InverseImpl< Other, PermutationStorage > & | other | ) | const [inline] |
Derived& Eigen::PermutationBase< Derived >::operator= | ( | const PermutationBase< OtherDerived > & | other | ) | [inline] |
Copies the other permutation into *this
Derived& Eigen::PermutationBase< Derived >::operator= | ( | const TranspositionsBase< OtherDerived > & | tr | ) | [inline] |
Assignment from the Transpositions tr
void Eigen::PermutationBase< Derived >::resize | ( | Index | newSize | ) | [inline] |
Resizes to given size.
Index Eigen::PermutationBase< Derived >::rows | ( | void | ) | const [inline] |
Reimplemented from Eigen::EigenBase< Derived >.
void Eigen::PermutationBase< Derived >::setIdentity | ( | ) | [inline] |
Sets *this to be the identity permutation matrix
void Eigen::PermutationBase< Derived >::setIdentity | ( | Index | newSize | ) | [inline] |
Sets *this to be the identity permutation matrix of given size.
Index Eigen::PermutationBase< Derived >::size | ( | ) | const [inline] |
Reimplemented from Eigen::EigenBase< Derived >.
DenseMatrixType Eigen::PermutationBase< Derived >::toDenseMatrix | ( | ) | const [inline] |
InverseReturnType Eigen::PermutationBase< Derived >::transpose | ( | ) | const [inline] |
PlainPermutationType operator* | ( | const InverseImpl< Other, PermutationStorage > & | other, |
const PermutationBase< Derived > & | perm | ||
) | [friend] |