WPILibC++ 2023.4.3
|
Base class for permutations. More...
Public Types | |
enum | { Flags = Traits::Flags , RowsAtCompileTime = Traits::RowsAtCompileTime , ColsAtCompileTime = Traits::ColsAtCompileTime , MaxRowsAtCompileTime = Traits::MaxRowsAtCompileTime , MaxColsAtCompileTime = Traits::MaxColsAtCompileTime } |
typedef Traits::IndicesType | IndicesType |
typedef Traits::StorageIndex | StorageIndex |
typedef Matrix< StorageIndex, RowsAtCompileTime, ColsAtCompileTime, 0, MaxRowsAtCompileTime, MaxColsAtCompileTime > | DenseMatrixType |
typedef PermutationMatrix< IndicesType::SizeAtCompileTime, IndicesType::MaxSizeAtCompileTime, StorageIndex > | PlainPermutationType |
typedef PlainPermutationType | PlainObject |
typedef Inverse< Derived > | InverseReturnType |
typedef void | Scalar |
Public Types inherited from Eigen::EigenBase< Derived > | |
typedef Eigen::Index | Index |
The interface type of indices. More... | |
typedef internal::traits< Derived >::StorageKind | StorageKind |
Public Member Functions | |
template<typename OtherDerived > | |
Derived & | operator= (const PermutationBase< OtherDerived > &other) |
Copies the other permutation into *this. More... | |
template<typename OtherDerived > | |
Derived & | operator= (const TranspositionsBase< OtherDerived > &tr) |
Assignment from the Transpositions tr. More... | |
EIGEN_DEVICE_FUNC Index | rows () const |
EIGEN_DEVICE_FUNC Index | cols () const |
EIGEN_DEVICE_FUNC 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. More... | |
void | setIdentity () |
Sets *this to be the identity permutation matrix. More... | |
void | setIdentity (Index newSize) |
Sets *this to be the identity permutation matrix of given size. More... | |
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... | |
InverseReturnType | inverse () const |
InverseReturnType | transpose () const |
template<typename Other > | |
PlainPermutationType | operator* (const PermutationBase< Other > &other) const |
template<typename Other > | |
PlainPermutationType | operator* (const InverseImpl< Other, PermutationStorage > &other) const |
Index | determinant () const |
EIGEN_DEVICE_FUNC Derived & | derived () |
EIGEN_DEVICE_FUNC const Derived & | derived () const |
Public Member Functions inherited from Eigen::EigenBase< Derived > | |
EIGEN_DEVICE_FUNC Derived & | derived () |
EIGEN_DEVICE_FUNC const Derived & | derived () const |
EIGEN_DEVICE_FUNC Derived & | const_cast_derived () const |
EIGEN_DEVICE_FUNC const Derived & | const_derived () const |
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | rows () const EIGEN_NOEXCEPT |
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | cols () const EIGEN_NOEXCEPT |
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | size () const EIGEN_NOEXCEPT |
template<typename Dest > | |
EIGEN_DEVICE_FUNC void | evalTo (Dest &dst) const |
template<typename Dest > | |
EIGEN_DEVICE_FUNC void | addTo (Dest &dst) const |
template<typename Dest > | |
EIGEN_DEVICE_FUNC void | subTo (Dest &dst) const |
template<typename Dest > | |
EIGEN_DEVICE_FUNC void | applyThisOnTheRight (Dest &dst) const |
template<typename Dest > | |
EIGEN_DEVICE_FUNC 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 InverseImpl< Other, PermutationStorage > &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.
typedef Matrix<StorageIndex,RowsAtCompileTime,ColsAtCompileTime,0,MaxRowsAtCompileTime,MaxColsAtCompileTime> Eigen::PermutationBase< Derived >::DenseMatrixType |
typedef Traits::IndicesType Eigen::PermutationBase< Derived >::IndicesType |
typedef Inverse<Derived> Eigen::PermutationBase< Derived >::InverseReturnType |
typedef PlainPermutationType Eigen::PermutationBase< Derived >::PlainObject |
typedef PermutationMatrix<IndicesType::SizeAtCompileTime,IndicesType::MaxSizeAtCompileTime,StorageIndex> Eigen::PermutationBase< Derived >::PlainPermutationType |
typedef void Eigen::PermutationBase< Derived >::Scalar |
typedef Traits::StorageIndex Eigen::PermutationBase< Derived >::StorageIndex |
anonymous enum |
|
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.
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
inline |
This function is O(n
) procedure allocating a buffer of n
booleans.
|
inline |
|
inline |
|
inline |
const version of indices().
|
inline |
|
inline |
|
inline |
|
inline |
Copies the other permutation into *this.
|
inline |
Assignment from the Transpositions tr.
|
inline |
Resizes to given size.
|
inline |
|
inline |
Sets *this to be the identity permutation matrix.
|
inline |
Sets *this to be the identity permutation matrix of given size.
|
inline |
|
inline |
|
inline |
|
friend |