Permutation matrix. More...
#include <PermutationMatrix.h>
Public Member Functions | |
PermutationMatrix < SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > & | applyTranspositionOnTheLeft (Index i, Index j) |
PermutationMatrix < SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > & | applyTranspositionOnTheRight (Index i, Index j) |
Index | cols () const |
PermutationMatrix < SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > & | derived () |
const PermutationMatrix < SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > & | derived () const |
const IndicesType & | indices () const |
IndicesType & | indices () |
Transpose< PermutationBase > | inverse () const |
PlainPermutationType | operator* (const PermutationBase< Other > &other) const |
PlainPermutationType | operator* (const Transpose< PermutationBase< Other > > &other) const |
template<typename Other > | |
PermutationMatrix & | operator= (const PermutationBase< Other > &other) |
template<typename Other > | |
PermutationMatrix & | operator= (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) | |
void | resize (Index size) |
Index | rows () const |
void | setIdentity () |
void | setIdentity (Index size) |
Index | size () const |
DenseMatrixType | toDenseMatrix () const |
Transpose< PermutationBase > | transpose () const |
Friends | |
PlainPermutationType | operator* (const Transpose< PermutationBase< Other > > &other, const PermutationBase &perm) |
Permutation matrix.
SizeAtCompileTime | the number of rows/cols, or Dynamic |
MaxSizeAtCompileTime | the maximum number of rows/cols, or Dynamic. This optional parameter defaults to SizeAtCompileTime. Most of the time, you should not have to specify it. |
IndexType | the interger type of the indices |
This class represents a permutation matrix, internally stored as a vector of integers.
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 | ) | [inline, explicit] |
Generic constructor from expression of the indices. The indices array has the meaning that the permutations sends each integer i to indices[i].
PermutationMatrix | ( | const TranspositionsBase< Other > & | tr | ) | [inline, explicit] |
Convert the Transpositions tr to a permutation matrix
PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > & applyTranspositionOnTheLeft | ( | Index | i, |
Index | j | ||
) | [inline, inherited] |
Multiplies *this by the transposition on the left.
PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > & applyTranspositionOnTheRight | ( | Index | i, |
Index | j | ||
) | [inline, inherited] |
Multiplies *this by the transposition on the right.
This is a fast operation, it only consists in swapping two indices.
Index cols | ( | void | ) | const [inline, inherited] |
Reimplemented from EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >.
PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > & derived | ( | ) | [inline, inherited] |
const PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > & derived | ( | ) | const [inline, inherited] |
const IndicesType& indices | ( | ) | const [inline] |
const version of indices().
Reimplemented from PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >.
IndicesType& indices | ( | ) | [inline] |
Reimplemented from PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >.
Transpose<PermutationBase> inverse | ( | ) | const [inline, inherited] |
PlainPermutationType operator* | ( | const PermutationBase< Other > & | other | ) | const [inline, inherited] |
PlainPermutationType operator* | ( | const Transpose< PermutationBase< Other > > & | other | ) | const [inline, inherited] |
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
void resize | ( | Index | size | ) | [inline, inherited] |
Resizes to given size.
Index rows | ( | void | ) | const [inline, inherited] |
Reimplemented from EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >.
void setIdentity | ( | ) | [inline, inherited] |
Sets *this to be the identity permutation matrix
void setIdentity | ( | Index | size | ) | [inline, inherited] |
Sets *this to be the identity permutation matrix of given size.
Index size | ( | ) | const [inline, inherited] |
Reimplemented from EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >.
DenseMatrixType toDenseMatrix | ( | ) | const [inline, inherited] |
Transpose<PermutationBase> transpose | ( | ) | const [inline, inherited] |
PlainPermutationType operator* | ( | const Transpose< PermutationBase< Other > > & | other, |
const PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > > & | perm | ||
) | [friend, inherited] |