Allows Lower|Upper as a template argument of CG and MINRES: in this case the full matrix will be considered.

This commit is contained in:
Gael Guennebaud
2015-02-10 18:57:41 +01:00
parent f9931a0392
commit 7b35b4cacc
5 changed files with 43 additions and 13 deletions

View File

@@ -161,7 +161,10 @@ int generate_sparse_spd_problem(Solver& , typename Solver::MatrixType& A, typena
dA = dM * dM.adjoint();
halfA.resize(size,size);
halfA.template selfadjointView<Solver::UpLo>().rankUpdate(M);
if(Solver::UpLo==(Lower|Upper))
halfA = A;
else
halfA.template selfadjointView<Solver::UpLo>().rankUpdate(M);
return size;
}