Shapeworks Studio  2.1
Shape analysis software suite
List of all members | Public Types | Public Member Functions | Protected Attributes | Friends
Eigen::SparseSelfAdjointView< MatrixType, UpLo > Class Template Reference

Pseudo expression to manipulate a triangular sparse matrix as a selfadjoint matrix. More...

#include <SparseSelfAdjointView.h>

+ Inheritance diagram for Eigen::SparseSelfAdjointView< MatrixType, UpLo >:
+ Collaboration diagram for Eigen::SparseSelfAdjointView< MatrixType, UpLo >:

Public Types

typedef MatrixType::Scalar Scalar
 
typedef MatrixType::Index Index
 
typedef Matrix< Index, Dynamic, 1 > VectorI
 
typedef MatrixType::Nested MatrixTypeNested
 
typedef internal::remove_all< MatrixTypeNested >::type _MatrixTypeNested
 
- Public Types inherited from Eigen::EigenBase< SparseSelfAdjointView< MatrixType, UpLo > >
typedef internal::traits< SparseSelfAdjointView< MatrixType, UpLo > >::StorageKind StorageKind
 
typedef internal::traits< SparseSelfAdjointView< MatrixType, UpLo > >::Index Index
 

Public Member Functions

 SparseSelfAdjointView (const MatrixType &matrix)
 
Index rows () const
 
Index cols () const
 
const _MatrixTypeNested & matrix () const
 
_MatrixTypeNested & matrix ()
 
template<typename OtherDerived >
SparseSparseProduct< typename OtherDerived::PlainObject, OtherDerived > operator* (const SparseMatrixBase< OtherDerived > &rhs) const
 
template<typename OtherDerived >
SparseSelfAdjointTimeDenseProduct< MatrixType, OtherDerived, UpLo > operator* (const MatrixBase< OtherDerived > &rhs) const
 
template<typename DerivedU >
SparseSelfAdjointViewrankUpdate (const SparseMatrixBase< DerivedU > &u, const Scalar &alpha=Scalar(1))
 
template<typename DestScalar , int StorageOrder>
void evalTo (SparseMatrix< DestScalar, StorageOrder, Index > &_dest) const
 
template<typename DestScalar >
void evalTo (DynamicSparseMatrix< DestScalar, ColMajor, Index > &_dest) const
 
SparseSymmetricPermutationProduct< _MatrixTypeNested, UpLo > twistedBy (const PermutationMatrix< Dynamic, Dynamic, Index > &perm) const
 
template<typename SrcMatrixType , int SrcUpLo>
SparseSelfAdjointViewoperator= (const SparseSymmetricPermutationProduct< SrcMatrixType, SrcUpLo > &permutedMatrix)
 
SparseSelfAdjointViewoperator= (const SparseSelfAdjointView &src)
 
template<typename SrcMatrixType , unsigned int SrcUpLo>
SparseSelfAdjointViewoperator= (const SparseSelfAdjointView< SrcMatrixType, SrcUpLo > &src)
 
template<typename DerivedU >
SparseSelfAdjointView< MatrixType, UpLo > & rankUpdate (const SparseMatrixBase< DerivedU > &u, const Scalar &alpha)
 
- Public Member Functions inherited from Eigen::EigenBase< SparseSelfAdjointView< MatrixType, UpLo > >
SparseSelfAdjointView< MatrixType, UpLo > & derived ()
 
const SparseSelfAdjointView< MatrixType, UpLo > & derived () const
 
SparseSelfAdjointView< MatrixType, UpLo > & const_cast_derived () const
 
const SparseSelfAdjointView< MatrixType, UpLo > & const_derived () const
 
Index rows () const
 
Index cols () const
 
Index size () const
 
void evalTo (Dest &dst) const
 
void addTo (Dest &dst) const
 
void subTo (Dest &dst) const
 
void applyThisOnTheRight (Dest &dst) const
 
void applyThisOnTheLeft (Dest &dst) const
 

Protected Attributes

MatrixType::Nested m_matrix
 
VectorI m_countPerRow
 
VectorI m_countPerCol
 

Friends

template<typename OtherDerived >
SparseSparseProduct< OtherDerived, typename OtherDerived::PlainObject > operator* (const SparseMatrixBase< OtherDerived > &lhs, const SparseSelfAdjointView &rhs)
 
template<typename OtherDerived >
DenseTimeSparseSelfAdjointProduct< OtherDerived, MatrixType, UpLo > operator* (const MatrixBase< OtherDerived > &lhs, const SparseSelfAdjointView &rhs)
 

Detailed Description

template<typename MatrixType, unsigned int UpLo>
class Eigen::SparseSelfAdjointView< MatrixType, UpLo >

Pseudo expression to manipulate a triangular sparse matrix as a selfadjoint matrix.

Parameters
MatrixTypethe type of the dense matrix storing the coefficients
UpLocan be either #Lower or #Upper

This class is an expression of a sefladjoint matrix from a triangular part of a matrix with given dense storage of the coefficients. It is the return type of MatrixBase::selfadjointView() and most of the time this is the only way that it is used.

See also
SparseMatrixBase::selfadjointView()

Definition at line 49 of file SparseSelfAdjointView.h.

Member Function Documentation

template<typename MatrixType, unsigned int UpLo>
template<typename OtherDerived >
SparseSparseProduct<typename OtherDerived::PlainObject, OtherDerived> Eigen::SparseSelfAdjointView< MatrixType, UpLo >::operator* ( const SparseMatrixBase< OtherDerived > &  rhs) const
inline
Returns
an expression of the matrix product between a sparse self-adjoint matrix *this and a sparse matrix rhs.

Note that there is no algorithmic advantage of performing such a product compared to a general sparse-sparse matrix product. Indeed, the SparseSelfadjointView operand is first copied into a temporary SparseMatrix before computing the product.

Definition at line 79 of file SparseSelfAdjointView.h.

80  {
81  return SparseSparseProduct<typename OtherDerived::PlainObject, OtherDerived>(*this, rhs.derived());
82  }
template<typename MatrixType, unsigned int UpLo>
template<typename OtherDerived >
SparseSelfAdjointTimeDenseProduct<MatrixType,OtherDerived,UpLo> Eigen::SparseSelfAdjointView< MatrixType, UpLo >::operator* ( const MatrixBase< OtherDerived > &  rhs) const
inline

Efficient sparse self-adjoint matrix times dense vector/matrix product

Definition at line 99 of file SparseSelfAdjointView.h.

100  {
101  return SparseSelfAdjointTimeDenseProduct<MatrixType,OtherDerived,UpLo>(m_matrix, rhs.derived());
102  }
template<typename MatrixType, unsigned int UpLo>
template<typename DerivedU >
SparseSelfAdjointView& Eigen::SparseSelfAdjointView< MatrixType, UpLo >::rankUpdate ( const SparseMatrixBase< DerivedU > &  u,
const Scalar &  alpha = Scalar(1) 
)

Perform a symmetric rank K update of the selfadjoint matrix *this: $ this = this + \alpha ( u u^* ) $ where u is a vector or matrix.

Returns
a reference to *this

To perform $ this = this + \alpha ( u^* u ) $ you can simply call this function with u.adjoint().

template<typename MatrixType, unsigned int UpLo>
SparseSymmetricPermutationProduct<_MatrixTypeNested,UpLo> Eigen::SparseSelfAdjointView< MatrixType, UpLo >::twistedBy ( const PermutationMatrix< Dynamic, Dynamic, Index > &  perm) const
inline
Returns
an expression of P H P^-1

Definition at line 138 of file SparseSelfAdjointView.h.

139  {
140  return SparseSymmetricPermutationProduct<_MatrixTypeNested,UpLo>(m_matrix, perm);
141  }

Friends And Related Function Documentation

template<typename MatrixType, unsigned int UpLo>
template<typename OtherDerived >
SparseSparseProduct<OtherDerived, typename OtherDerived::PlainObject > operator* ( const SparseMatrixBase< OtherDerived > &  lhs,
const SparseSelfAdjointView< MatrixType, UpLo > &  rhs 
)
friend
Returns
an expression of the matrix product between a sparse matrix lhs and a sparse self-adjoint matrix rhs.

Note that there is no algorithmic advantage of performing such a product compared to a general sparse-sparse matrix product. Indeed, the SparseSelfadjointView operand is first copied into a temporary SparseMatrix before computing the product.

Definition at line 91 of file SparseSelfAdjointView.h.

92  {
93  return SparseSparseProduct<OtherDerived, typename OtherDerived::PlainObject>(lhs.derived(), rhs);
94  }
template<typename MatrixType, unsigned int UpLo>
template<typename OtherDerived >
DenseTimeSparseSelfAdjointProduct<OtherDerived,MatrixType,UpLo> operator* ( const MatrixBase< OtherDerived > &  lhs,
const SparseSelfAdjointView< MatrixType, UpLo > &  rhs 
)
friend

Efficient dense vector/matrix times sparse self-adjoint matrix product

Definition at line 107 of file SparseSelfAdjointView.h.

108  {
109  return DenseTimeSparseSelfAdjointProduct<OtherDerived,_MatrixTypeNested,UpLo>(lhs.derived(), rhs.m_matrix);
110  }

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