mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 04:35:57 +08:00
really fix permute_symm_to_symm for sparse complex matrix
This commit is contained in:
parent
6ec660ca7e
commit
817d86cbaf
@ -367,7 +367,7 @@ void permute_symm_to_symm(const MatrixType& mat, SparseMatrix<typename MatrixTyp
|
||||
typedef SparseMatrix<Scalar,DestOrder,Index> Dest;
|
||||
Dest& dest(_dest.derived());
|
||||
typedef Matrix<Index,Dynamic,1> VectorI;
|
||||
internal::conj_if<SrcUpLo!=DstUpLo> cj;
|
||||
//internal::conj_if<SrcUpLo!=DstUpLo> cj;
|
||||
|
||||
Index size = mat.rows();
|
||||
VectorI count(size);
|
||||
@ -405,7 +405,11 @@ void permute_symm_to_symm(const MatrixType& mat, SparseMatrix<typename MatrixTyp
|
||||
Index ip = perm? perm[i] : i;
|
||||
Index k = count[DstUpLo==Lower ? std::min(ip,jp) : std::max(ip,jp)]++;
|
||||
dest._innerIndexPtr()[k] = DstUpLo==Lower ? std::max(ip,jp) : std::min(ip,jp);
|
||||
dest._valuePtr()[k] = cj(it.value());
|
||||
|
||||
if((DstUpLo==Lower && ip<jp) || (DstUpLo==Upper && ip>jp))
|
||||
dest._valuePtr()[k] = conj(it.value());
|
||||
else
|
||||
dest._valuePtr()[k] = it.value();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user