mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Adding support for twistedby on SparseMatrixBase
This commit is contained in:
parent
3836402631
commit
a1c7b5aa48
@ -372,6 +372,12 @@ template<typename Derived> class SparseMatrixBase : public EigenBase<Derived>
|
|||||||
const typename SparseDenseProductReturnType<Derived,OtherDerived>::Type
|
const typename SparseDenseProductReturnType<Derived,OtherDerived>::Type
|
||||||
operator*(const MatrixBase<OtherDerived> &other) const;
|
operator*(const MatrixBase<OtherDerived> &other) const;
|
||||||
|
|
||||||
|
/** \returns an expression of P^-1 H P */
|
||||||
|
SparseSymmetricPermutationProduct<Derived,Upper|Lower> twistedBy(const PermutationMatrix<Dynamic,Dynamic,Index>& perm) const
|
||||||
|
{
|
||||||
|
return SparseSymmetricPermutationProduct<Derived,Upper|Lower>(derived(), perm);
|
||||||
|
}
|
||||||
|
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
Derived& operator*=(const SparseMatrixBase<OtherDerived>& other);
|
Derived& operator*=(const SparseMatrixBase<OtherDerived>& other);
|
||||||
|
|
||||||
|
@ -45,9 +45,6 @@ class SparseSelfAdjointTimeDenseProduct;
|
|||||||
template<typename Lhs, typename Rhs, int UpLo>
|
template<typename Lhs, typename Rhs, int UpLo>
|
||||||
class DenseTimeSparseSelfAdjointProduct;
|
class DenseTimeSparseSelfAdjointProduct;
|
||||||
|
|
||||||
template<typename MatrixType,int UpLo>
|
|
||||||
class SparseSymmetricPermutationProduct;
|
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
template<typename MatrixType, unsigned int UpLo>
|
template<typename MatrixType, unsigned int UpLo>
|
||||||
@ -437,7 +434,8 @@ class SparseSymmetricPermutationProduct
|
|||||||
inline Index rows() const { return m_matrix.rows(); }
|
inline Index rows() const { return m_matrix.rows(); }
|
||||||
inline Index cols() const { return m_matrix.cols(); }
|
inline Index cols() const { return m_matrix.cols(); }
|
||||||
|
|
||||||
template<typename DestScalar> void evalTo(SparseMatrix<DestScalar>& _dest) const
|
template<typename DestScalar, int Options, typename DstIndex>
|
||||||
|
void evalTo(SparseMatrix<DestScalar,Options,DstIndex>& _dest) const
|
||||||
{
|
{
|
||||||
internal::permute_symm_to_fullsymm<UpLo>(m_matrix,_dest,m_perm.indices().data());
|
internal::permute_symm_to_fullsymm<UpLo>(m_matrix,_dest,m_perm.indices().data());
|
||||||
}
|
}
|
||||||
|
@ -100,6 +100,7 @@ template<typename Lhs, typename Rhs, bool Transpose> class SparseDenseOuterProdu
|
|||||||
template<typename Lhs, typename Rhs> struct SparseSparseProductReturnType;
|
template<typename Lhs, typename Rhs> struct SparseSparseProductReturnType;
|
||||||
template<typename Lhs, typename Rhs, int InnerSize = internal::traits<Lhs>::ColsAtCompileTime> struct DenseSparseProductReturnType;
|
template<typename Lhs, typename Rhs, int InnerSize = internal::traits<Lhs>::ColsAtCompileTime> struct DenseSparseProductReturnType;
|
||||||
template<typename Lhs, typename Rhs, int InnerSize = internal::traits<Lhs>::ColsAtCompileTime> struct SparseDenseProductReturnType;
|
template<typename Lhs, typename Rhs, int InnerSize = internal::traits<Lhs>::ColsAtCompileTime> struct SparseDenseProductReturnType;
|
||||||
|
template<typename MatrixType,int UpLo> class SparseSymmetricPermutationProduct;
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user