Represents a sequence of transpositions (row/column interchange)
| SizeAtCompileTime | the number of transpositions, or Dynamic |
| MaxSizeAtCompileTime | the maximum number of transpositions, or Dynamic. This optional parameter defaults to SizeAtCompileTime. Most of the time, you should not have to specify it. |
This class represents a permutation transformation as a sequence of n transpositions
. It is internally stored as a vector of integers indices. Each transposition
applied on the left of a matrix (
) interchanges the rows i and indices[i] of the matrix M. A transposition applied on the right (e.g.,
) yields a column interchange.
Compared to the class PermutationMatrix, such a sequence of transpositions is what is computed during a decomposition with pivoting, and it is faster when applying the permutation in-place.
To apply a sequence of transpositions to a matrix, simply use the operator * as in the following example:
Transpositions tr; MatrixXf mat; mat = tr * mat;
In this example, we detect that the matrix appears on both side, and so the transpositions are applied in-place without any temporary or extra copy.

Public Types | |
| typedef TranspositionsBase < Transpositions > | Base |
| typedef Traits::IndicesType | IndicesType |
| typedef IndicesType::Scalar | Index |
Public Member Functions | |
| Transpositions () | |
| template<typename OtherDerived > | |
| Transpositions (const TranspositionsBase< OtherDerived > &other) | |
| Copy constructor. | |
| template<typename Other > | |
| Transpositions (const MatrixBase< Other > &indices) | |
| Generic constructor from expression of the transposition indices. | |
| template<typename OtherDerived > | |
| Transpositions & | operator= (const TranspositionsBase< OtherDerived > &other) |
Copies the other transpositions into *this. | |
| Transpositions (Index size) | |
| Constructs an uninitialized permutation matrix of given size. | |
| const IndicesType & | indices () const |
| const version of indices(). | |
| IndicesType & | indices () |
| Derived & | derived () |
| const Derived & | derived () const |
| Index | size () const |
| const Index & | coeff (Index i) const |
| Direct access to the underlying index vector. | |
| Index & | coeffRef (Index i) |
| Direct access to the underlying index vector. | |
| const Index & | operator() (Index i) const |
| Direct access to the underlying index vector. | |
| Index & | operator() (Index i) |
| Direct access to the underlying index vector. | |
| const Index & | operator[] (Index i) const |
| Direct access to the underlying index vector. | |
| Index & | operator[] (Index i) |
| Direct access to the underlying index vector. | |
| void | resize (int size) |
| Resizes to given size. | |
| void | setIdentity () |
Sets *this to represents an identity transformation. | |
| Transpose< TranspositionsBase > | inverse () const |
| Transpose< TranspositionsBase > | transpose () const |
Protected Attributes | |
| IndicesType | m_indices |
Private Types | |
| typedef internal::traits < Transpositions > | Traits |
| typedef IndicesType::Scalar Eigen::Transpositions::Index |
| typedef Traits::IndicesType Eigen::Transpositions::IndicesType |
typedef internal::traits<Transpositions> Eigen::Transpositions::Traits [private] |
| Eigen::Transpositions::Transpositions | ( | const TranspositionsBase< OtherDerived > & | other | ) | [inline] |
| Eigen::Transpositions::Transpositions | ( | const MatrixBase< Other > & | indices | ) | [inline, explicit] |
| Eigen::Transpositions::Transpositions | ( | Index | size | ) | [inline] |
| Derived& Eigen::TranspositionsBase::derived | ( | ) | [inline, inherited] |
| const Derived& Eigen::TranspositionsBase::derived | ( | ) | const [inline, inherited] |
| const IndicesType& Eigen::Transpositions::indices | ( | ) | const [inline] |
const version of indices().
Reimplemented from Eigen::TranspositionsBase< Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >.
| IndicesType& Eigen::Transpositions::indices | ( | ) | [inline] |
Reimplemented from Eigen::TranspositionsBase< Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >.
| Transpose<TranspositionsBase> Eigen::TranspositionsBase::inverse | ( | ) | const [inline, inherited] |
| Transpositions& Eigen::Transpositions::operator= | ( | const TranspositionsBase< OtherDerived > & | other | ) | [inline] |
Copies the other transpositions into *this.
Reimplemented from Eigen::TranspositionsBase< Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >.
| void Eigen::TranspositionsBase::resize | ( | int | size | ) | [inline, inherited] |
| void Eigen::TranspositionsBase::setIdentity | ( | ) | [inline, inherited] |
| Index Eigen::TranspositionsBase::size | ( | ) | const [inline, inherited] |
| Transpose<TranspositionsBase> Eigen::TranspositionsBase::transpose | ( | ) | const [inline, inherited] |
IndicesType Eigen::Transpositions::m_indices [protected] |
| Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011 |