|
OSVR-Core
|
Base class for permutations. More...
#include <PermutationMatrix.h>
Public Types | |
| enum | { Flags = Traits::Flags, CoeffReadCost = Traits::CoeffReadCost, RowsAtCompileTime = Traits::RowsAtCompileTime, ColsAtCompileTime = Traits::ColsAtCompileTime, MaxRowsAtCompileTime = Traits::MaxRowsAtCompileTime, MaxColsAtCompileTime = Traits::MaxColsAtCompileTime } |
| typedef Traits::IndicesType | IndicesType |
| typedef Traits::Scalar | Scalar |
| typedef Traits::Index | Index |
| typedef Matrix< Scalar, RowsAtCompileTime, ColsAtCompileTime, 0, MaxRowsAtCompileTime, MaxColsAtCompileTime > | DenseMatrixType |
| typedef PermutationMatrix< IndicesType::SizeAtCompileTime, IndicesType::MaxSizeAtCompileTime, Index > | PlainPermutationType |
Public Types inherited from Eigen::EigenBase< Derived > | |
| typedef internal::traits< Derived >::StorageKind | StorageKind |
| typedef internal::traits< Derived >::Index | Index |
Public Member Functions | |
| template<typename OtherDerived > | |
| Derived & | operator= (const PermutationBase< OtherDerived > &other) |
| Copies the other permutation into *this. | |
| template<typename OtherDerived > | |
| Derived & | operator= (const TranspositionsBase< OtherDerived > &tr) |
| Assignment from the Transpositions tr. | |
| Derived & | operator= (const PermutationBase &other) |
| This is a special case of the templated operator=. More... | |
| Index | rows () const |
| Index | cols () const |
| Index | size () const |
| template<typename DenseDerived > | |
| void | evalTo (MatrixBase< DenseDerived > &other) const |
| DenseMatrixType | toDenseMatrix () const |
| const IndicesType & | indices () const |
| const version of indices(). More... | |
| IndicesType & | indices () |
| void | resize (Index newSize) |
| Resizes to given size. | |
| void | setIdentity () |
| Sets *this to be the identity permutation matrix. | |
| void | setIdentity (Index newSize) |
| Sets *this to be the identity permutation matrix of given size. | |
| Derived & | applyTranspositionOnTheLeft (Index i, Index j) |
| Multiplies *this by the transposition \((ij)\) on the left. More... | |
| Derived & | applyTranspositionOnTheRight (Index i, Index j) |
| Multiplies *this by the transposition \((ij)\) on the right. More... | |
| Transpose< PermutationBase > | inverse () const |
| Transpose< PermutationBase > | transpose () const |
| template<typename Other > | |
| PlainPermutationType | operator* (const PermutationBase< Other > &other) const |
| template<typename Other > | |
| PlainPermutationType | operator* (const Transpose< PermutationBase< Other > > &other) const |
| Index | determinant () const |
Public Member Functions inherited from Eigen::EigenBase< Derived > | |
| Derived & | derived () |
| const Derived & | derived () const |
| Derived & | const_cast_derived () const |
| const Derived & | const_derived () const |
| Index | rows () const |
| Index | cols () const |
| Index | size () const |
| template<typename Dest > | |
| void | evalTo (Dest &dst) const |
| template<typename Dest > | |
| void | addTo (Dest &dst) const |
| template<typename Dest > | |
| void | subTo (Dest &dst) const |
| template<typename Dest > | |
| void | applyThisOnTheRight (Dest &dst) const |
| template<typename Dest > | |
| void | applyThisOnTheLeft (Dest &dst) const |
Protected Member Functions | |
| template<typename OtherDerived > | |
| void | assignTranspose (const PermutationBase< OtherDerived > &other) |
| template<typename Lhs , typename Rhs > | |
| void | assignProduct (const Lhs &lhs, const Rhs &rhs) |
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 \( \sigma \) is a permutation, the corresponding permutation matrix \( P_\sigma \) is such that if \( (e_1,\ldots,e_p) \) is the canonical basis, we have:
\[ P_\sigma(e_i) = e_{\sigma(i)}. \]
This convention ensures that for any two permutations \( \sigma, \tau \), we have:
\[ P_{\sigma\circ\tau} = P_\sigma P_\tau. \]
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 \((ij)\) on the left.
|
inline |
Multiplies *this by the transposition \((ij)\) on the right.
This is a fast operation, it only consists in swapping two indices.
|
inline |
|
inline |
This function is O(n) procedure allocating a buffer of n booleans.
|
inline |
const version of indices().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
This is a special case of the templated operator=.
Its purpose is to prevent a default operator= from hiding the templated operator=.
|
inline |
|
inline |
|
inline |
|
inline |
|
friend |
1.8.12