$treeview $search $mathjax
Eigen
3.2.5
$projectbrief
|
$projectbrief
|
$searchbox |
Base class for permutations. More...
Public Member Functions | |
Derived & | applyTranspositionOnTheLeft (Index i, Index j) |
Derived & | applyTranspositionOnTheRight (Index i, Index j) |
Index | cols () const |
const Derived & | derived () const |
Derived & | derived () |
Index | determinant () const |
IndicesType & | indices () |
const IndicesType & | indices () const |
Transpose< PermutationBase > | inverse () const |
template<typename Other > | |
PlainPermutationType | operator* (const Transpose< PermutationBase< Other > > &other) const |
template<typename Other > | |
PlainPermutationType | operator* (const PermutationBase< Other > &other) const |
template<typename OtherDerived > | |
Derived & | operator= (const TranspositionsBase< OtherDerived > &tr) |
template<typename OtherDerived > | |
Derived & | operator= (const PermutationBase< OtherDerived > &other) |
void | resize (Index newSize) |
Index | rows () const |
void | setIdentity (Index newSize) |
void | setIdentity () |
Index | size () const |
DenseMatrixType | toDenseMatrix () const |
Transpose< PermutationBase > | transpose () const |
Friends | |
template<typename Other > | |
PlainPermutationType | operator* (const Transpose< PermutationBase< Other > > &other, const PermutationBase &perm) |
Base class for permutations.
Derived | the derived class |
This class is the base class for all expressions representing a permutation matrix, internally stored as a vector of integers. The convention followed here is that if is a permutation, the corresponding permutation matrix
is such that if
is the canonical basis, we have:
This convention ensures that for any two permutations , we have:
Permutation matrices are square and invertible.
Notice that in addition to the member functions and operators listed here, there also are non-member operator* to multiply any kind of permutation object with any kind of matrix expression (MatrixBase) on either side.
Derived& applyTranspositionOnTheLeft | ( | Index | i, | |
Index | j | |||
) | [inline] |
Multiplies *this by the transposition on the left.
Derived& applyTranspositionOnTheRight | ( | Index | i, | |
Index | j | |||
) | [inline] |
Multiplies *this by the transposition on the right.
This is a fast operation, it only consists in swapping two indices.
Referenced by FullPivLU< _MatrixType >::compute(), FullPivHouseholderQR< _MatrixType >::compute(), ColPivHouseholderQR< _MatrixType >::compute(), and PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::operator=().
Index cols | ( | void | ) | const [inline] |
Reimplemented from EigenBase< Derived >.
const Derived& derived | ( | ) | const [inline, inherited] |
Derived& derived | ( | ) | [inline, inherited] |
Referenced by PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::applyTranspositionOnTheLeft(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::applyTranspositionOnTheRight(), EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::cols(), MatrixBase< TriangularProduct< Mode, true, Lhs, false, Rhs, true > >::cwiseEqual(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::cwiseSqrt(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::indices(), SparseMatrixBase< Derived >::innerVector(), SparseMatrixBase< Derived >::innerVectors(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::inverse(), Translation< _Scalar, _Dim >::operator*(), Transform< _Scalar, _Dim, _Mode, _Options >::operator*(), SparseSelfAdjointView< MatrixType, UpLo >::operator*(), SparseMatrixBase< Derived >::operator*(), SparseMatrixBase< CwiseBinaryOp< BinaryOp, Lhs, Rhs > >::operator*(), RotationBase< Derived, 3 >::operator*(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::operator*(), Transform< _Scalar, _Dim, _Mode, _Options >::operator=(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::operator=(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::operator=(), DenseBase< Derived >::operator=(), MatrixBase< Derived >::operator=(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::PlainObjectBase(), PlainObjectBase< Matrix< int, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::resizeLike(), EigenBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::rows(), UmfPackLU< _MatrixType >::solve(), SuperLUBase< _MatrixType, SuperILU< _MatrixType > >::solve(), SparseLU< _MatrixType, _OrderingType >::solve(), SimplicialCholeskyBase< SimplicialLDLT< _MatrixType, _UpLo, _Ordering > >::solve(), IterativeSolverBase< ConjugateGradient< _MatrixType, _UpLo, _Preconditioner > >::solve(), CholmodBase< _MatrixType, _UpLo, CholmodSimplicialLLT< _MatrixType, _UpLo > >::solve(), SparseMatrix< Scalar, RowMajor >::SparseMatrix(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::toDenseMatrix(), Transform< _Scalar, _Dim, _Mode, _Options >::Transform(), and PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::transpose().
Index determinant | ( | ) | const [inline] |
This function is O(n
) procedure allocating a buffer of n
booleans.
Referenced by SparseLU< _MatrixType, _OrderingType >::factorize().
IndicesType& indices | ( | ) | [inline] |
Reimplemented in PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType >, PermutationMatrix< Dynamic, Dynamic, Index >, PermutationMatrix< ColsAtCompileTime, MaxColsAtCompileTime >, and PermutationMatrix< RowsAtCompileTime, MaxRowsAtCompileTime >.
const IndicesType& indices | ( | ) | const [inline] |
const version of indices().
Reimplemented in PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, IndexType >, PermutationWrapper< _IndicesType >, PermutationMatrix< Dynamic, Dynamic, Index >, PermutationMatrix< ColsAtCompileTime, MaxColsAtCompileTime >, and PermutationMatrix< RowsAtCompileTime, MaxRowsAtCompileTime >.
Referenced by PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::applyTranspositionOnTheLeft(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::applyTranspositionOnTheRight(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::cols(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::determinant(), PermutationMatrix< RowsAtCompileTime, MaxRowsAtCompileTime >::operator=(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::operator=(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::resize(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::rows(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::setIdentity(), and PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::size().
Transpose<PermutationBase> inverse | ( | ) | const [inline] |
Referenced by SparseQR< _MatrixType, _OrderingType >::analyzePattern(), SparseQR< _MatrixType, _OrderingType >::factorize(), SparseLU< _MatrixType, _OrderingType >::factorize(), PartialPivLU< _MatrixType >::reconstructedMatrix(), and FullPivLU< _MatrixType >::reconstructedMatrix().
PlainPermutationType operator* | ( | const Transpose< PermutationBase< Other > > & | other | ) | const [inline] |
PlainPermutationType operator* | ( | const PermutationBase< Other > & | other | ) | const [inline] |
Derived& operator= | ( | const TranspositionsBase< OtherDerived > & | tr | ) | [inline] |
Assignment from the Transpositions tr
Derived& operator= | ( | const PermutationBase< OtherDerived > & | other | ) | [inline] |
Copies the other permutation into *this
Referenced by PermutationMatrix< RowsAtCompileTime, MaxRowsAtCompileTime >::operator=().
void resize | ( | Index | newSize | ) | [inline] |
Index rows | ( | void | ) | const [inline] |
Reimplemented from EigenBase< Derived >.
void setIdentity | ( | Index | newSize | ) | [inline] |
Sets *this to be the identity permutation matrix of given size.
void setIdentity | ( | ) | [inline] |
Sets *this to be the identity permutation matrix
Referenced by FullPivLU< _MatrixType >::compute(), FullPivHouseholderQR< _MatrixType >::compute(), ColPivHouseholderQR< _MatrixType >::compute(), SparseQR< _MatrixType, _OrderingType >::factorize(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::operator=(), and PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::setIdentity().
Index size | ( | ) | const [inline] |
Reimplemented from EigenBase< Derived >.
Referenced by SparseQR< _MatrixType, _OrderingType >::analyzePattern(), SparseLU< _MatrixType, _OrderingType >::analyzePattern(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::applyTranspositionOnTheLeft(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::applyTranspositionOnTheRight(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::cols(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::determinant(), SparseQR< _MatrixType, _OrderingType >::factorize(), SparseLU< _MatrixType, _OrderingType >::factorize(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::operator=(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::rows(), PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::setIdentity(), and PermutationBase< PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, Index > >::size().
DenseMatrixType toDenseMatrix | ( | ) | const [inline] |
Transpose<PermutationBase> transpose | ( | ) | const [inline] |
PlainPermutationType operator* | ( | const Transpose< PermutationBase< Other > > & | other, | |
const PermutationBase< Derived > & | perm | |||
) | [friend] |