aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2011-01-27 14:39:01 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2011-01-27 14:39:01 +0100
commit9ccd16609cc100c0749692e90b9ac353b3faf153 (patch)
treec37f5da2cc65d8649abd5146a90ff1801f8a9996 /Eigen
parentf5d0f115b477aa1d26bb6ee750f48f1bc79478be (diff)
fix twisted selfadjoint to selfadjoint (conjugation issue)
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/Sparse/SparseSelfAdjointView.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Eigen/src/Sparse/SparseSelfAdjointView.h b/Eigen/src/Sparse/SparseSelfAdjointView.h
index 3749c604a..0f76ed581 100644
--- a/Eigen/src/Sparse/SparseSelfAdjointView.h
+++ b/Eigen/src/Sparse/SparseSelfAdjointView.h
@@ -367,6 +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;
Index size = mat.rows();
VectorI count(size);
@@ -404,7 +405,7 @@ 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] = it.value();
+ dest._valuePtr()[k] = cj(it.value());
}
}
}