Eigen  3.4.90 (git rev a4098ac676528a83cfb73d4d26ce1b42ec05f47c)
Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_ > Class Template Reference

Detailed Description

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_>
class Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_ >

Permutation matrix.

Template Parameters
SizeAtCompileTimethe number of rows/cols, or Dynamic
MaxSizeAtCompileTimethe maximum number of rows/cols, or Dynamic. This optional parameter defaults to SizeAtCompileTime. Most of the time, you should not have to specify it.
StorageIndex_the integer type of the indices

This class represents a permutation matrix, internally stored as a vector of integers.

See also
class PermutationBase, class PermutationWrapper, class DiagonalMatrix
+ Inheritance diagram for Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_ >:

Public Member Functions

IndicesType & indices ()
 
const IndicesType & indices () const
 
template<typename Other >
PermutationMatrixoperator= (const PermutationBase< Other > &other)
 
template<typename Other >
PermutationMatrixoperator= (const TranspositionsBase< Other > &tr)
 
template<typename Other >
 PermutationMatrix (const MatrixBase< Other > &indices)
 
template<typename OtherDerived >
 PermutationMatrix (const PermutationBase< OtherDerived > &other)
 
template<typename Other >
 PermutationMatrix (const TranspositionsBase< Other > &tr)
 
 PermutationMatrix (Index size)
 
- Public Member Functions inherited from Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_ > >
PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_ > & applyTranspositionOnTheLeft (Index i, Index j)
 
PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_ > & applyTranspositionOnTheRight (Index i, Index j)
 
Index cols () const
 
Index determinant () const
 
IndicesType & indices ()
 
const IndicesType & indices () const
 
InverseReturnType inverse () const
 
PlainPermutationType operator* (const InverseImpl< Other, PermutationStorage > &other) const
 
PlainPermutationType operator* (const PermutationBase< Other > &other) const
 
PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_ > & operator= (const PermutationBase< OtherDerived > &other)
 
PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_ > & 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
 
- Public Member Functions inherited from Eigen::EigenBase< Derived >
EIGEN_CONSTEXPR Index cols () const EIGEN_NOEXCEPT
 
Derived & derived ()
 
const Derived & derived () const
 
EIGEN_CONSTEXPR Index rows () const EIGEN_NOEXCEPT
 
EIGEN_CONSTEXPR Index size () const EIGEN_NOEXCEPT
 

Additional Inherited Members

- Public Types inherited from Eigen::EigenBase< Derived >
typedef Eigen::Index Index
 The interface type of indices. More...
 

Constructor & Destructor Documentation

◆ PermutationMatrix() [1/4]

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_ >
Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_ >::PermutationMatrix ( Index  size)
inlineexplicit

Constructs an uninitialized permutation matrix of given size.

◆ PermutationMatrix() [2/4]

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_ >
template<typename OtherDerived >
Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_ >::PermutationMatrix ( const PermutationBase< OtherDerived > &  other)
inline

Copy constructor.

◆ PermutationMatrix() [3/4]

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_ >
template<typename Other >
Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_ >::PermutationMatrix ( const MatrixBase< Other > &  indices)
inlineexplicit

Generic constructor from expression of the indices. The indices array has the meaning that the permutations sends each integer i to indices[i].

Warning
It is your responsibility to check that the indices array that you passes actually describes a permutation, i.e., each value between 0 and n-1 occurs exactly once, where n is the array's size.

◆ PermutationMatrix() [4/4]

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_ >
template<typename Other >
Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_ >::PermutationMatrix ( const TranspositionsBase< Other > &  tr)
inlineexplicit

Convert the Transpositions tr to a permutation matrix

Member Function Documentation

◆ indices() [1/2]

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_ >
IndicesType & Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_ >::indices ( )
inline
Returns
a reference to the stored array representing the permutation.

◆ indices() [2/2]

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_ >
const IndicesType & Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_ >::indices ( ) const
inline

const version of indices().

◆ operator=() [1/2]

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_ >
template<typename Other >
PermutationMatrix & Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_ >::operator= ( const PermutationBase< Other > &  other)
inline

Copies the other permutation into *this

◆ operator=() [2/2]

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename StorageIndex_ >
template<typename Other >
PermutationMatrix & Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, StorageIndex_ >::operator= ( const TranspositionsBase< Other > &  tr)
inline

Assignment from the Transpositions tr


The documentation for this class was generated from the following file: