MOAB
4.9.3pre
|
Pseudo expression to manipulate a triangular sparse matrix as a selfadjoint matrix. More...
#include <SparseSelfAdjointView.h>
Public Types | |
enum | { Mode = _Mode, RowsAtCompileTime = internal::traits<SparseSelfAdjointView>::RowsAtCompileTime, ColsAtCompileTime = internal::traits<SparseSelfAdjointView>::ColsAtCompileTime } |
typedef EigenBase < SparseSelfAdjointView > | Base |
typedef MatrixType::Scalar | Scalar |
typedef MatrixType::StorageIndex | StorageIndex |
typedef Matrix< StorageIndex, Dynamic, 1 > | VectorI |
typedef internal::ref_selector < MatrixType >::non_const_type | MatrixTypeNested |
typedef internal::remove_all < MatrixTypeNested >::type | _MatrixTypeNested |
Public Member Functions | |
SparseSelfAdjointView (MatrixType &matrix) | |
Index | rows () const |
Index | cols () const |
const _MatrixTypeNested & | matrix () const |
internal::remove_reference < MatrixTypeNested >::type & | matrix () |
template<typename OtherDerived > | |
Product< SparseSelfAdjointView, OtherDerived > | operator* (const SparseMatrixBase< OtherDerived > &rhs) const |
template<typename OtherDerived > | |
Product< SparseSelfAdjointView, OtherDerived > | operator* (const MatrixBase< OtherDerived > &rhs) const |
template<typename DerivedU > | |
SparseSelfAdjointView & | rankUpdate (const SparseMatrixBase< DerivedU > &u, const Scalar &alpha=Scalar(1)) |
SparseSymmetricPermutationProduct < _MatrixTypeNested, Mode > | twistedBy (const PermutationMatrix< Dynamic, Dynamic, StorageIndex > &perm) const |
template<typename SrcMatrixType , int SrcMode> | |
SparseSelfAdjointView & | operator= (const SparseSymmetricPermutationProduct< SrcMatrixType, SrcMode > &permutedMatrix) |
SparseSelfAdjointView & | operator= (const SparseSelfAdjointView &src) |
template<typename SrcMatrixType , unsigned int SrcMode> | |
SparseSelfAdjointView & | operator= (const SparseSelfAdjointView< SrcMatrixType, SrcMode > &src) |
void | resize (Index rows, Index cols) |
Protected Attributes | |
MatrixTypeNested | m_matrix |
Private Member Functions | |
template<typename Dest > | |
void | evalTo (Dest &) const |
Friends | |
template<typename OtherDerived > | |
Product< OtherDerived, SparseSelfAdjointView > | operator* (const SparseMatrixBase< OtherDerived > &lhs, const SparseSelfAdjointView &rhs) |
template<typename OtherDerived > | |
Product< OtherDerived, SparseSelfAdjointView > | operator* (const MatrixBase< OtherDerived > &lhs, const SparseSelfAdjointView &rhs) |
Pseudo expression to manipulate a triangular sparse matrix as a selfadjoint matrix.
MatrixType | the type of the dense matrix storing the coefficients |
Mode | can 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.
Definition at line 43 of file SparseSelfAdjointView.h.
typedef internal::remove_all<MatrixTypeNested>::type Eigen::SparseSelfAdjointView< MatrixType, _Mode >::_MatrixTypeNested |
Definition at line 59 of file SparseSelfAdjointView.h.
typedef EigenBase<SparseSelfAdjointView> Eigen::SparseSelfAdjointView< MatrixType, _Mode >::Base |
Definition at line 54 of file SparseSelfAdjointView.h.
typedef internal::ref_selector<MatrixType>::non_const_type Eigen::SparseSelfAdjointView< MatrixType, _Mode >::MatrixTypeNested |
Definition at line 58 of file SparseSelfAdjointView.h.
typedef MatrixType::Scalar Eigen::SparseSelfAdjointView< MatrixType, _Mode >::Scalar |
Definition at line 55 of file SparseSelfAdjointView.h.
typedef MatrixType::StorageIndex Eigen::SparseSelfAdjointView< MatrixType, _Mode >::StorageIndex |
Definition at line 56 of file SparseSelfAdjointView.h.
typedef Matrix<StorageIndex,Dynamic,1> Eigen::SparseSelfAdjointView< MatrixType, _Mode >::VectorI |
Definition at line 57 of file SparseSelfAdjointView.h.
anonymous enum |
Definition at line 48 of file SparseSelfAdjointView.h.
{ Mode = _Mode, RowsAtCompileTime = internal::traits<SparseSelfAdjointView>::RowsAtCompileTime, ColsAtCompileTime = internal::traits<SparseSelfAdjointView>::ColsAtCompileTime };
Eigen::SparseSelfAdjointView< MatrixType, _Mode >::SparseSelfAdjointView | ( | MatrixType & | matrix | ) | [inline, explicit] |
Definition at line 61 of file SparseSelfAdjointView.h.
: m_matrix(matrix) { eigen_assert(rows()==cols() && "SelfAdjointView is only for squared matrices"); }
Index Eigen::SparseSelfAdjointView< MatrixType, _Mode >::cols | ( | void | ) | const [inline] |
Reimplemented from Eigen::EigenBase< SparseSelfAdjointView< MatrixType, _Mode > >.
Definition at line 67 of file SparseSelfAdjointView.h.
{ return m_matrix.cols(); }
void Eigen::SparseSelfAdjointView< MatrixType, _Mode >::evalTo | ( | Dest & | dst | ) | const [private] |
Don't use it, but do the equivalent:
dst = *this;
Reimplemented from Eigen::EigenBase< SparseSelfAdjointView< MatrixType, _Mode > >.
const _MatrixTypeNested& Eigen::SparseSelfAdjointView< MatrixType, _Mode >::matrix | ( | ) | const [inline] |
Definition at line 70 of file SparseSelfAdjointView.h.
{ return m_matrix; }
internal::remove_reference<MatrixTypeNested>::type& Eigen::SparseSelfAdjointView< MatrixType, _Mode >::matrix | ( | ) | [inline] |
Definition at line 71 of file SparseSelfAdjointView.h.
{ return m_matrix; }
Product<SparseSelfAdjointView, OtherDerived> Eigen::SparseSelfAdjointView< MatrixType, _Mode >::operator* | ( | const SparseMatrixBase< OtherDerived > & | rhs | ) | const [inline] |
*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 80 of file SparseSelfAdjointView.h.
{ return Product<SparseSelfAdjointView, OtherDerived>(*this, rhs.derived()); }
Product<SparseSelfAdjointView,OtherDerived> Eigen::SparseSelfAdjointView< MatrixType, _Mode >::operator* | ( | const MatrixBase< OtherDerived > & | rhs | ) | const [inline] |
Efficient sparse self-adjoint matrix times dense vector/matrix product
Definition at line 100 of file SparseSelfAdjointView.h.
{ return Product<SparseSelfAdjointView,OtherDerived>(*this, rhs.derived()); }
SparseSelfAdjointView& Eigen::SparseSelfAdjointView< MatrixType, _Mode >::operator= | ( | const SparseSymmetricPermutationProduct< SrcMatrixType, SrcMode > & | permutedMatrix | ) | [inline] |
Definition at line 132 of file SparseSelfAdjointView.h.
{ internal::call_assignment_no_alias_no_transpose(*this, permutedMatrix); return *this; }
SparseSelfAdjointView& Eigen::SparseSelfAdjointView< MatrixType, _Mode >::operator= | ( | const SparseSelfAdjointView< MatrixType, _Mode > & | src | ) | [inline] |
Definition at line 138 of file SparseSelfAdjointView.h.
{ PermutationMatrix<Dynamic,Dynamic,StorageIndex> pnull; return *this = src.twistedBy(pnull); }
SparseSelfAdjointView& Eigen::SparseSelfAdjointView< MatrixType, _Mode >::operator= | ( | const SparseSelfAdjointView< SrcMatrixType, SrcMode > & | src | ) | [inline] |
Definition at line 145 of file SparseSelfAdjointView.h.
{ PermutationMatrix<Dynamic,Dynamic,StorageIndex> pnull; return *this = src.twistedBy(pnull); }
SparseSelfAdjointView< MatrixType, Mode > & Eigen::SparseSelfAdjointView< MatrixType, Mode >::rankUpdate | ( | const SparseMatrixBase< DerivedU > & | u, |
const Scalar & | alpha = Scalar(1) |
||
) |
Perform a symmetric rank K update of the selfadjoint matrix *this
: where u is a vector or matrix.
*this
To perform you can simply call this function with u.adjoint().
Definition at line 193 of file SparseSelfAdjointView.h.
void Eigen::SparseSelfAdjointView< MatrixType, _Mode >::resize | ( | Index | rows, |
Index | cols | ||
) | [inline] |
Definition at line 151 of file SparseSelfAdjointView.h.
{ EIGEN_ONLY_USED_FOR_DEBUG(rows); EIGEN_ONLY_USED_FOR_DEBUG(cols); eigen_assert(rows == this->rows() && cols == this->cols() && "SparseSelfadjointView::resize() does not actually allow to resize."); }
Index Eigen::SparseSelfAdjointView< MatrixType, _Mode >::rows | ( | void | ) | const [inline] |
Reimplemented from Eigen::EigenBase< SparseSelfAdjointView< MatrixType, _Mode > >.
Definition at line 66 of file SparseSelfAdjointView.h.
{ return m_matrix.rows(); }
SparseSymmetricPermutationProduct<_MatrixTypeNested,Mode> Eigen::SparseSelfAdjointView< MatrixType, _Mode >::twistedBy | ( | const PermutationMatrix< Dynamic, Dynamic, StorageIndex > & | perm | ) | const [inline] |
Definition at line 126 of file SparseSelfAdjointView.h.
{ return SparseSymmetricPermutationProduct<_MatrixTypeNested,Mode>(m_matrix, perm); }
Product<OtherDerived, SparseSelfAdjointView> operator* | ( | const SparseMatrixBase< OtherDerived > & | lhs, |
const SparseSelfAdjointView< MatrixType, _Mode > & | rhs | ||
) | [friend] |
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 92 of file SparseSelfAdjointView.h.
{
return Product<OtherDerived, SparseSelfAdjointView>(lhs.derived(), rhs);
}
Product<OtherDerived,SparseSelfAdjointView> operator* | ( | const MatrixBase< OtherDerived > & | lhs, |
const SparseSelfAdjointView< MatrixType, _Mode > & | rhs | ||
) | [friend] |
Efficient dense vector/matrix times sparse self-adjoint matrix product
Definition at line 108 of file SparseSelfAdjointView.h.
{
return Product<OtherDerived,SparseSelfAdjointView>(lhs.derived(), rhs);
}
MatrixTypeNested Eigen::SparseSelfAdjointView< MatrixType, _Mode >::m_matrix [protected] |
Definition at line 161 of file SparseSelfAdjointView.h.