Eigen  5.0.1
 
Loading...
Searching...
No Matches
Eigen::ScaledPermutationBase< Derived > Class Template Reference

#include <Eigen/src/Core/ScaledPermutationMatrix.h>

Detailed Description

template<typename Derived>
class Eigen::ScaledPermutationBase< Derived >

Base class for scaled permutation matrices.

A scaled permutation is the product \(P D\) of a permutation matrix and a diagonal matrix: a square matrix with exactly one nonzero per row and per column. It is stored as the permutation's indices and one scale per column, so that coefficient (indices()(k), k) equals scales()(k).

The set is closed under products with permutations, diagonal matrices, scalars and other scaled permutations, and under inversion and transposition; all of these cost \(O(n)\) and return a plain ScaledPermutationMatrix. Products with a dense matrix scale and permute its rows or columns in \(O(nm)\), and assigning to a dense matrix scatters the scales, so writing P * D * x or P * D * P.inverse() never forms an \(n \times n\) intermediate. Sums with a dense matrix are lazy expressions.

See also
class ScaledPermutationMatrix, class PermutationBase, class DiagonalBase
+ Inheritance diagram for Eigen::ScaledPermutationBase< Derived >:

Public Member Functions

PlainObject adjoint () const
 
Scalar coeff (Index row, Index col) const
 
constexpr Index cols () const
 
Scalar determinant () const
 
constexpr const IndicesType & indices () const
 
PlainObject inverse () const
 
template<typename OtherDerived>
internal::scaled_permutation_product_result< Derived, OtherDerived, StorageIndex >::type operator* (const DiagonalBase< OtherDerived > &other) const
 
template<typename OtherDerived>
PlainObject operator* (const InverseImpl< OtherDerived, PermutationStorage > &other) const
 
template<typename OtherDerived>
const Product< Derived, OtherDerived, DefaultProduct > operator* (const MatrixBase< OtherDerived > &other) const
 
template<typename OtherDerived>
PlainObject operator* (const PermutationBase< OtherDerived > &other) const
 
PlainObject operator* (const Scalar &alpha) const
 
template<typename OtherDerived>
internal::scaled_permutation_product_result< Derived, OtherDerived, StorageIndex >::type operator* (const ScaledPermutationBase< OtherDerived > &other) const
 
template<typename OtherDerived>
const Product< Derived, OtherDerived, DefaultProduct > operator* (const TriangularBase< OtherDerived > &other) const
 
PlainObject operator- () const
 
const PermutationType & permutation () const
 
constexpr Index rows () const
 
const ScalesType & scales () const
 
DenseMatrixType toDenseMatrix () const
 
PlainObject transpose () const
 
- Public Member Functions inherited from Eigen::EigenBase< Derived >
constexpr Index cols () const noexcept
 
constexpr Derived & derived ()
 
constexpr const Derived & derived () const
 
constexpr Index rows () const noexcept
 
constexpr Index size () const noexcept
 

Additional Inherited Members

- Public Types inherited from Eigen::EigenBase< Derived >
using Index
 The interface type of indices.
 

Member Function Documentation

◆ adjoint()

template<typename Derived>
PlainObject Eigen::ScaledPermutationBase< Derived >::adjoint ( ) const
inline
Returns
the adjoint, the transpose with conjugated scales

◆ coeff()

template<typename Derived>
Scalar Eigen::ScaledPermutationBase< Derived >::coeff ( Index row,
Index col ) const
inline
Returns
the coefficient at (row, col) of the represented matrix

◆ cols()

template<typename Derived>
Index Eigen::ScaledPermutationBase< Derived >::cols ( ) const
inlineconstexpr
Returns
the number of columns

◆ determinant()

template<typename Derived>
Scalar Eigen::ScaledPermutationBase< Derived >::determinant ( ) const
inline
Returns
the determinant, the permutation's sign times the product of the scales

◆ indices()

template<typename Derived>
const IndicesType & Eigen::ScaledPermutationBase< Derived >::indices ( ) const
inlineconstexpr
Returns
the permutation's indices: column k has its nonzero in row indices()(k)

◆ inverse()

template<typename Derived>
PlainObject Eigen::ScaledPermutationBase< Derived >::inverse ( ) const
inline
Returns
the inverse, \((PD)^{-1} = D^{-1} P^{-1}\), which has \(1 / \text{scales}(k)\) at (k, indices()(k)). The scales must be nonzero.

◆ operator*() [1/7]

template<typename Derived>
template<typename OtherDerived>
internal::scaled_permutation_product_result< Derived, OtherDerived, StorageIndex >::type Eigen::ScaledPermutationBase< Derived >::operator* ( const DiagonalBase< OtherDerived > & other) const
inline
Returns
the scaled permutation *this times the diagonal matrix other

◆ operator*() [2/7]

template<typename Derived>
template<typename OtherDerived>
PlainObject Eigen::ScaledPermutationBase< Derived >::operator* ( const InverseImpl< OtherDerived, PermutationStorage > & other) const
inline
Returns
the scaled permutation *this times the inverse permutation other

◆ operator*() [3/7]

template<typename Derived>
template<typename OtherDerived>
const Product< Derived, OtherDerived, DefaultProduct > Eigen::ScaledPermutationBase< Derived >::operator* ( const MatrixBase< OtherDerived > & other) const
inline
Returns
the dense matrix product of *this by the dense matrix other: rows of other are scaled and permuted.

◆ operator*() [4/7]

template<typename Derived>
template<typename OtherDerived>
PlainObject Eigen::ScaledPermutationBase< Derived >::operator* ( const PermutationBase< OtherDerived > & other) const
inline
Returns
the scaled permutation *this times the permutation other

◆ operator*() [5/7]

template<typename Derived>
PlainObject Eigen::ScaledPermutationBase< Derived >::operator* ( const Scalar & alpha) const
inline
Returns
*this with its scales multiplied by alpha

◆ operator*() [6/7]

template<typename Derived>
template<typename OtherDerived>
internal::scaled_permutation_product_result< Derived, OtherDerived, StorageIndex >::type Eigen::ScaledPermutationBase< Derived >::operator* ( const ScaledPermutationBase< OtherDerived > & other) const
inline
Returns
the scaled permutation *this times the scaled permutation other

◆ operator*() [7/7]

template<typename Derived>
template<typename OtherDerived>
const Product< Derived, OtherDerived, DefaultProduct > Eigen::ScaledPermutationBase< Derived >::operator* ( const TriangularBase< OtherDerived > & other) const
inline
Returns
the dense matrix product of *this by the triangular or self-adjoint view other

◆ operator-()

template<typename Derived>
PlainObject Eigen::ScaledPermutationBase< Derived >::operator- ( ) const
inline
Returns
*this with its scales negated

◆ permutation()

template<typename Derived>
const PermutationType & Eigen::ScaledPermutationBase< Derived >::permutation ( ) const
inline
Returns
the permutation factor \(P\)

◆ rows()

template<typename Derived>
Index Eigen::ScaledPermutationBase< Derived >::rows ( ) const
inlineconstexpr
Returns
the number of rows

◆ scales()

template<typename Derived>
const ScalesType & Eigen::ScaledPermutationBase< Derived >::scales ( ) const
inline
Returns
the scales: column k's nonzero equals scales()(k)

◆ toDenseMatrix()

template<typename Derived>
DenseMatrixType Eigen::ScaledPermutationBase< Derived >::toDenseMatrix ( ) const
inline
Returns
the represented matrix as a plain dense matrix

◆ transpose()

template<typename Derived>
PlainObject Eigen::ScaledPermutationBase< Derived >::transpose ( ) const
inline
Returns
the transpose, which has scales()(k) at (k, indices()(k))

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