MOAB
4.9.3pre
|
Represents a sequence of transpositions (row/column interchange) More...
#include <Transpositions.h>
Public Types | |
typedef TranspositionsBase < Transpositions > | Base |
typedef Traits::IndicesType | IndicesType |
typedef IndicesType::Scalar | StorageIndex |
Public Member Functions | |
Transpositions () | |
template<typename OtherDerived > | |
Transpositions (const TranspositionsBase< OtherDerived > &other) | |
Transpositions (const Transpositions &other) | |
template<typename Other > | |
Transpositions (const MatrixBase< Other > &indices) | |
template<typename OtherDerived > | |
Transpositions & | operator= (const TranspositionsBase< OtherDerived > &other) |
Transpositions & | operator= (const Transpositions &other) |
Transpositions (Index size) | |
const IndicesType & | indices () const |
IndicesType & | indices () |
Protected Attributes | |
IndicesType | m_indices |
Private Types | |
typedef internal::traits < Transpositions > | Traits |
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.
Definition at line 158 of file Transpositions.h.
typedef TranspositionsBase<Transpositions> Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::Base |
Definition at line 163 of file Transpositions.h.
typedef Traits::IndicesType Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::IndicesType |
Reimplemented from Eigen::TranspositionsBase< Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >.
Definition at line 164 of file Transpositions.h.
typedef IndicesType::Scalar Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::StorageIndex |
Reimplemented from Eigen::TranspositionsBase< Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >.
Definition at line 165 of file Transpositions.h.
typedef internal::traits<Transpositions> Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::Traits [private] |
Reimplemented from Eigen::TranspositionsBase< Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >.
Definition at line 160 of file Transpositions.h.
Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::Transpositions | ( | ) | [inline] |
Definition at line 167 of file Transpositions.h.
{}
Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::Transpositions | ( | const TranspositionsBase< OtherDerived > & | other | ) | [inline] |
Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::Transpositions | ( | const Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > & | other | ) | [inline] |
Standard copy constructor. Defined only to prevent a default copy constructor from hiding the other templated constructor
Definition at line 177 of file Transpositions.h.
: m_indices(other.indices()) {}
Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::Transpositions | ( | const MatrixBase< Other > & | indices | ) | [inline, explicit] |
Generic constructor from expression of the transposition indices.
Definition at line 182 of file Transpositions.h.
Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::Transpositions | ( | Index | size | ) | [inline] |
Constructs an uninitialized permutation matrix of given size.
Definition at line 205 of file Transpositions.h.
const IndicesType& Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::indices | ( | ) | const [inline] |
const version of indices().
Reimplemented from Eigen::TranspositionsBase< Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >.
Definition at line 209 of file Transpositions.h.
{ return m_indices; }
IndicesType& Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::indices | ( | ) | [inline] |
Reimplemented from Eigen::TranspositionsBase< Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >.
Definition at line 211 of file Transpositions.h.
{ return m_indices; }
Transpositions& Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::operator= | ( | const TranspositionsBase< OtherDerived > & | other | ) | [inline] |
Copies the other transpositions into *this
Reimplemented from Eigen::TranspositionsBase< Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >.
Definition at line 187 of file Transpositions.h.
{ return Base::operator=(other); }
Transpositions& Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::operator= | ( | const Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > & | other | ) | [inline] |
This is a special case of the templated operator=. Its purpose is to prevent a default operator= from hiding the templated operator=.
Definition at line 196 of file Transpositions.h.
{ m_indices = other.m_indices; return *this; }
IndicesType Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::m_indices [protected] |
Definition at line 215 of file Transpositions.h.