Eigen  3.2.91
Eigen::PermutationWrapper< _IndicesType > Class Template Reference

Detailed Description

template<typename _IndicesType>
class Eigen::PermutationWrapper< _IndicesType >

Class to view a vector of integers as a permutation matrix.

Parameters
_IndicesTypethe type of the vector of integer (can be any compatible expression)

This class allows to view any vector expression of integers as a permutation matrix.

See also
class PermutationBase, class PermutationMatrix
+ Inheritance diagram for Eigen::PermutationWrapper< _IndicesType >:

Public Types

typedef Eigen::Index Index
 The interface type of indices. More...
 

Public Member Functions

PermutationWrapper< _IndicesType > & applyTranspositionOnTheLeft (Index i, Index j)
 
PermutationWrapper< _IndicesType > & applyTranspositionOnTheRight (Index i, Index j)
 
Index cols () const
 
Derived & derived ()
 
const Derived & derived () const
 
Index determinant () const
 
IndicesType & indices ()
 
const internal::remove_all< typename IndicesType::Nested >::type & indices () const
 
TransposeReturnType inverse () const
 
PlainPermutationType operator* (const PermutationBase< Other > &other) const
 
PlainPermutationType operator* (const Transpose< PermutationBase< Other > > &other) const
 
void resize (Index newSize)
 
Index rows () const
 
void setIdentity ()
 
void setIdentity (Index newSize)
 
Index size () const
 
DenseMatrixType toDenseMatrix () const
 
TransposeReturnType transpose () const
 

Member Typedef Documentation

template<typename Derived>
typedef Eigen::Index Eigen::EigenBase< Derived >::Index
inherited

The interface type of indices.

To change this, #define the preprocessor symbol EIGEN_DEFAULT_DENSE_INDEX_TYPE.

Deprecated:
Since Eigen 3.3, its usage is deprecated. Use Eigen::Index instead.
See also
StorageIndex, Preprocessor directives.

Member Function Documentation

PermutationWrapper< _IndicesType > & Eigen::PermutationBase< PermutationWrapper< _IndicesType > >::applyTranspositionOnTheLeft ( Index  i,
Index  j 
)
inlineinherited

Multiplies *this by the transposition $(ij)$ on the left.

Returns
a reference to *this.
Warning
This is much slower than applyTranspositionOnTheRight(Index,Index): this has linear complexity and requires a lot of branching.
See also
applyTranspositionOnTheRight(Index,Index)
PermutationWrapper< _IndicesType > & Eigen::PermutationBase< PermutationWrapper< _IndicesType > >::applyTranspositionOnTheRight ( Index  i,
Index  j 
)
inlineinherited

Multiplies *this by the transposition $(ij)$ on the right.

Returns
a reference to *this.

This is a fast operation, it only consists in swapping two indices.

See also
applyTranspositionOnTheLeft(Index,Index)
Index Eigen::PermutationBase< PermutationWrapper< _IndicesType > >::cols ( void  ) const
inlineinherited
Returns
the number of columns
template<typename Derived>
Derived& Eigen::EigenBase< Derived >::derived ( )
inlineinherited
Returns
a reference to the derived object

Referenced by Eigen::IterativeSolverBase< ConjugateGradient< _MatrixType, _UpLo, _Preconditioner > >::analyzePattern(), Eigen::MatrixBase< Derived >::applyOnTheLeft(), Eigen::MatrixBase< Derived >::applyOnTheRight(), Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::applyTranspositionOnTheLeft(), Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::applyTranspositionOnTheRight(), Eigen::SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::bottomRightCorner(), Eigen::EigenBase< BandMatrixWrapper< _CoefficientsType, _Rows, _Cols, _Supers, _Subs, _Options > >::cols(), Eigen::SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::cols(), Eigen::IterativeSolverBase< ConjugateGradient< _MatrixType, _UpLo, _Preconditioner > >::compute(), Eigen::TriangularBase< SelfAdjointView< _MatrixType, UpLo > >::copyCoeff(), Eigen::SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::eval(), Eigen::IterativeSolverBase< ConjugateGradient< _MatrixType, _UpLo, _Preconditioner > >::factorize(), Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::indices(), Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::inverse(), Eigen::RotationBase< Derived, 3 >::operator*(), Eigen::SparseSelfAdjointView< MatrixType, _Mode >::operator*(), Eigen::Translation< _Scalar, _Dim >::operator*(), Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::operator*(), Eigen::SparseMatrixBase< Derived >::operator*(), Eigen::Transform< _Scalar, _Dim, _Mode, _Options >::operator*(), Eigen::MatrixBase< Derived >::operator*=(), Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::operator=(), Eigen::Transform< _Scalar, _Dim, _Mode, _Options >::operator=(), Eigen::DenseBase< Derived >::operator=(), Eigen::PlainObjectBase< Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::operator=(), Eigen::PlainObjectBase< Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::PlainObjectBase(), Eigen::PlainObjectBase< Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::resizeLike(), Eigen::EigenBase< BandMatrixWrapper< _CoefficientsType, _Rows, _Cols, _Supers, _Subs, _Options > >::rows(), Eigen::SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::rows(), Eigen::SparseSolverBase< SimplicialLDLT< _MatrixType, _UpLo, _Ordering > >::solve(), Eigen::SparseMatrix< Scalar, RowMajor, StorageIndex >::SparseMatrix(), Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::toDenseMatrix(), Eigen::SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::topLeftCorner(), Eigen::Transform< _Scalar, _Dim, _Mode, _Options >::Transform(), Eigen::PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex > >::transpose(), and Eigen::SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::twistedBy().

template<typename Derived>
const Derived& Eigen::EigenBase< Derived >::derived ( ) const
inlineinherited
Returns
a const reference to the derived object
Index Eigen::PermutationBase< PermutationWrapper< _IndicesType > >::determinant ( ) const
inlineinherited
Returns
the determinant of the permutation matrix, which is either 1 or -1 depending on the parity of the permutation.

This function is O(n) procedure allocating a buffer of n booleans.

IndicesType& Eigen::PermutationBase< PermutationWrapper< _IndicesType > >::indices ( )
inlineinherited
Returns
a reference to the stored array representing the permutation.
template<typename _IndicesType >
const internal::remove_all<typename IndicesType::Nested>::type& Eigen::PermutationWrapper< _IndicesType >::indices ( ) const
inline

const version of indices().

TransposeReturnType Eigen::PermutationBase< PermutationWrapper< _IndicesType > >::inverse ( ) const
inlineinherited
Returns
the inverse permutation matrix.
Note
This function returns the result by value. In order to make that efficient, it is implemented as just a return statement using a special constructor, hopefully allowing the compiler to perform a RVO (return value optimization).
PlainPermutationType Eigen::PermutationBase< PermutationWrapper< _IndicesType > >::operator* ( const PermutationBase< Other > &  other) const
inlineinherited
Returns
the product permutation matrix.
Note
This function returns the result by value. In order to make that efficient, it is implemented as just a return statement using a special constructor, hopefully allowing the compiler to perform a RVO (return value optimization).
PlainPermutationType Eigen::PermutationBase< PermutationWrapper< _IndicesType > >::operator* ( const Transpose< PermutationBase< Other > > &  other) const
inlineinherited
Returns
the product of a permutation with another inverse permutation.
Note
This function returns the result by value. In order to make that efficient, it is implemented as just a return statement using a special constructor, hopefully allowing the compiler to perform a RVO (return value optimization).
void Eigen::PermutationBase< PermutationWrapper< _IndicesType > >::resize ( Index  newSize)
inlineinherited

Resizes to given size.

Index Eigen::PermutationBase< PermutationWrapper< _IndicesType > >::rows ( void  ) const
inlineinherited
Returns
the number of rows
void Eigen::PermutationBase< PermutationWrapper< _IndicesType > >::setIdentity ( )
inlineinherited

Sets *this to be the identity permutation matrix

void Eigen::PermutationBase< PermutationWrapper< _IndicesType > >::setIdentity ( Index  newSize)
inlineinherited

Sets *this to be the identity permutation matrix of given size.

Index Eigen::PermutationBase< PermutationWrapper< _IndicesType > >::size ( ) const
inlineinherited
Returns
the size of a side of the respective square matrix, i.e., the number of indices
DenseMatrixType Eigen::PermutationBase< PermutationWrapper< _IndicesType > >::toDenseMatrix ( ) const
inlineinherited
Returns
a Matrix object initialized from this permutation matrix. Notice that it is inefficient to return this Matrix object by value. For efficiency, favor using the Matrix constructor taking EigenBase objects.
TransposeReturnType Eigen::PermutationBase< PermutationWrapper< _IndicesType > >::transpose ( ) const
inlineinherited
Returns
the tranpose permutation matrix.
Note
This function returns the result by value. In order to make that efficient, it is implemented as just a return statement using a special constructor, hopefully allowing the compiler to perform a RVO (return value optimization).

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