mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-11 11:19:02 +08:00
fix compilation of sparse_basic for DynamicSparseMatrix
This commit is contained in:
parent
aec0782719
commit
0b32c5bdda
@ -74,6 +74,7 @@ class DynamicSparseMatrix
|
|||||||
// EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATOR(DynamicSparseMatrix, -=)
|
// EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATOR(DynamicSparseMatrix, -=)
|
||||||
typedef MappedSparseMatrix<Scalar,Flags> Map;
|
typedef MappedSparseMatrix<Scalar,Flags> Map;
|
||||||
using Base::IsRowMajor;
|
using Base::IsRowMajor;
|
||||||
|
using Base::operator=;
|
||||||
enum {
|
enum {
|
||||||
Options = _Options
|
Options = _Options
|
||||||
};
|
};
|
||||||
@ -284,6 +285,12 @@ class DynamicSparseMatrix
|
|||||||
return SparseMatrixBase<DynamicSparseMatrix>::operator=(other.derived());
|
return SparseMatrixBase<DynamicSparseMatrix>::operator=(other.derived());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename OtherDerived>
|
||||||
|
EIGEN_STRONG_INLINE DynamicSparseMatrix& operator=(const ReturnByValue<OtherDerived>& func)
|
||||||
|
{
|
||||||
|
return Base::operator=(func);
|
||||||
|
}
|
||||||
|
|
||||||
/** Destructor */
|
/** Destructor */
|
||||||
inline ~DynamicSparseMatrix() {}
|
inline ~DynamicSparseMatrix() {}
|
||||||
|
|
||||||
|
@ -122,6 +122,14 @@ template<typename MatrixType, unsigned int UpLo> class SparseSelfAdjointView
|
|||||||
internal::permute_symm_to_fullsymm<UpLo>(m_matrix, _dest);
|
internal::permute_symm_to_fullsymm<UpLo>(m_matrix, _dest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename DestScalar> void evalTo(DynamicSparseMatrix<DestScalar>& _dest) const
|
||||||
|
{
|
||||||
|
// TODO directly evaluate into _dest;
|
||||||
|
SparseMatrix<DestScalar> tmp(_dest.rows(),_dest.cols());
|
||||||
|
internal::permute_symm_to_fullsymm<UpLo>(m_matrix, tmp);
|
||||||
|
_dest = tmp;
|
||||||
|
}
|
||||||
|
|
||||||
/** \returns an expression of P^-1 H P */
|
/** \returns an expression of P^-1 H P */
|
||||||
SparseSymmetricPermutationProduct<_MatrixTypeNested,UpLo> twistedBy(const PermutationMatrix<Dynamic>& perm) const
|
SparseSymmetricPermutationProduct<_MatrixTypeNested,UpLo> twistedBy(const PermutationMatrix<Dynamic>& perm) const
|
||||||
{
|
{
|
||||||
@ -291,7 +299,7 @@ void permute_symm_to_fullsymm(const MatrixType& mat, SparseMatrix<typename Matri
|
|||||||
|
|
||||||
Dest& dest(_dest.derived());
|
Dest& dest(_dest.derived());
|
||||||
enum {
|
enum {
|
||||||
StorageOrderMatch = Dest::IsRowMajor == MatrixType::IsRowMajor
|
StorageOrderMatch = int(Dest::IsRowMajor) == int(MatrixType::IsRowMajor)
|
||||||
};
|
};
|
||||||
eigen_assert(perm==0);
|
eigen_assert(perm==0);
|
||||||
Index size = mat.rows();
|
Index size = mat.rows();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user