Public Member Functions | List of all members
PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > Class Template Reference

Permutation matrix. More...

+ Inheritance diagram for PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType >:

Public Member Functions

const IndicesType & indices () const
 
IndicesType & indices ()
 
template<typename Other >
PermutationMatrixoperator= (const PermutationBase< Other > &other)
 
template<typename Other >
PermutationMatrixoperator= (const TranspositionsBase< Other > &tr)
 
 PermutationMatrix (int size)
 
template<typename OtherDerived >
 PermutationMatrix (const PermutationBase< OtherDerived > &other)
 
template<typename Other >
 PermutationMatrix (const MatrixBase< Other > &indices)
 
template<typename Other >
 PermutationMatrix (const TranspositionsBase< Other > &tr)
 
- Public Member Functions inherited from PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >
PermutationMatrix
< SizeAtCompileTime,
MaxSizeAtCompileTime,
IndexType > & 
applyTranspositionOnTheLeft (Index i, Index j)
 
PermutationMatrix
< SizeAtCompileTime,
MaxSizeAtCompileTime,
IndexType > & 
applyTranspositionOnTheRight (Index i, Index j)
 
Index cols () const
 
const IndicesType & indices () const
 
IndicesType & indices ()
 
Transpose< PermutationBaseinverse () const
 
PlainPermutationType operator* (const PermutationBase< Other > &other) const
 
PlainPermutationType operator* (const Transpose< PermutationBase< Other > > &other) const
 
PermutationMatrix
< SizeAtCompileTime,
MaxSizeAtCompileTime,
IndexType > & 
operator= (const PermutationBase< OtherDerived > &other)
 
PermutationMatrix
< SizeAtCompileTime,
MaxSizeAtCompileTime,
IndexType > & 
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< PermutationBasetranspose () const
 

Detailed Description

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

Permutation matrix.

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.
IndexTypethe interger 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

Constructor & Destructor Documentation

PermutationMatrix ( int  size)
inline

Constructs an uninitialized permutation matrix of given size.

PermutationMatrix ( const PermutationBase< OtherDerived > &  other)
inline

Copy constructor.

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 ( const TranspositionsBase< Other > &  tr)
inlineexplicit

Convert the Transpositions tr to a permutation matrix

Member Function Documentation

const IndicesType& indices ( ) const
inline

const version of indices().

IndicesType& indices ( )
inline
Returns
a reference to the stored array representing the permutation.
PermutationMatrix& operator= ( const PermutationBase< Other > &  other)
inline

Copies the other permutation into *this

PermutationMatrix& operator= ( const TranspositionsBase< Other > &  tr)
inline

Assignment from the Transpositions tr


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