Public Types | Public Member Functions | Protected Attributes | Private Types | List of all members
Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > Class Template Reference

Represents a sequence of transpositions (row/column interchange) More...

#include <Transpositions.h>

Inheritance diagram for Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType >:
Inheritance graph
[legend]

Public Types

typedef TranspositionsBase< TranspositionsBase
 
typedef IndicesType::Scalar Index
 
typedef Traits::IndicesType IndicesType
 
- Public Types inherited from Eigen::TranspositionsBase< Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >
typedef IndicesType::Scalar Index
 
typedef Traits::IndicesType IndicesType
 

Public Member Functions

const IndicesTypeindices () const
 
IndicesTypeindices ()
 
template<typename OtherDerived >
Transpositionsoperator= (const TranspositionsBase< OtherDerived > &other)
 
Transpositionsoperator= (const Transpositions &other)
 
 Transpositions ()
 
template<typename OtherDerived >
 Transpositions (const TranspositionsBase< OtherDerived > &other)
 
 Transpositions (const Transpositions &other)
 
template<typename Other >
 Transpositions (const MatrixBase< Other > &a_indices)
 
 Transpositions (Index size)
 
- Public Member Functions inherited from Eigen::TranspositionsBase< Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > >
const Indexcoeff (Index i) const
 
IndexcoeffRef (Index i)
 
Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > & derived ()
 
const Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > & derived () const
 
const IndicesTypeindices () const
 
IndicesTypeindices ()
 
Transpose< TranspositionsBaseinverse () const
 
const Indexoperator() (Index i) const
 
Indexoperator() (Index i)
 
Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > & operator= (const TranspositionsBase< OtherDerived > &other)
 
Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > & operator= (const TranspositionsBase &other)
 
const Indexoperator[] (Index i) const
 
Indexoperator[] (Index i)
 
void resize (int newSize)
 
void setIdentity ()
 
Index size () const
 
Transpose< TranspositionsBasetranspose () const
 

Protected Attributes

IndicesType m_indices
 

Private Types

typedef internal::traits< TranspositionsTraits
 

Detailed Description

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

Represents a sequence of transpositions (row/column interchange)

Parameters
SizeAtCompileTimethe number of transpositions, or Dynamic
MaxSizeAtCompileTimethe 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 $[T_{n-1} \ldots T_{i} \ldots T_{0}]$. It is internally stored as a vector of integers indices. Each transposition $ T_{i} $ applied on the left of a matrix ( $ T_{i} M$) interchanges the rows i and indices[i] of the matrix M. A transposition applied on the right (e.g., $ M T_{i}$) 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:

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.

See also
class PermutationMatrix

Definition at line 156 of file Transpositions.h.

Member Typedef Documentation

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename IndexType>
typedef TranspositionsBase<Transpositions> Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType >::Base

Definition at line 161 of file Transpositions.h.

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename IndexType>
typedef IndicesType::Scalar Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType >::Index

Definition at line 163 of file Transpositions.h.

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename IndexType>
typedef Traits::IndicesType Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType >::IndicesType

Definition at line 162 of file Transpositions.h.

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename IndexType>
typedef internal::traits<Transpositions> Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType >::Traits
private

Definition at line 158 of file Transpositions.h.

Constructor & Destructor Documentation

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename IndexType>
Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType >::Transpositions ( )
inline

Definition at line 165 of file Transpositions.h.

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename IndexType>
template<typename OtherDerived >
Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType >::Transpositions ( const TranspositionsBase< OtherDerived > &  other)
inline

Copy constructor.

Definition at line 169 of file Transpositions.h.

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename IndexType>
Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType >::Transpositions ( const Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > &  other)
inline

Standard copy constructor. Defined only to prevent a default copy constructor from hiding the other templated constructor

Definition at line 175 of file Transpositions.h.

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename IndexType>
template<typename Other >
Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType >::Transpositions ( const MatrixBase< Other > &  a_indices)
inlineexplicit

Generic constructor from expression of the transposition indices.

Definition at line 180 of file Transpositions.h.

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename IndexType>
Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType >::Transpositions ( Index  size)
inline

Constructs an uninitialized permutation matrix of given size.

Definition at line 203 of file Transpositions.h.

Member Function Documentation

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

const version of indices().

Definition at line 207 of file Transpositions.h.

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

Definition at line 209 of file Transpositions.h.

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename IndexType>
template<typename OtherDerived >
Transpositions& Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType >::operator= ( const TranspositionsBase< OtherDerived > &  other)
inline

Copies the other transpositions into *this

Definition at line 185 of file Transpositions.h.

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename IndexType>
Transpositions& Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType >::operator= ( const Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType > &  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 194 of file Transpositions.h.

Member Data Documentation

template<int SizeAtCompileTime, int MaxSizeAtCompileTime, typename IndexType>
IndicesType Eigen::Transpositions< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType >::m_indices
protected

Definition at line 213 of file Transpositions.h.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:35:42