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 d10d6a40dd
commit c6e8caf090
5 changed files with 23 additions and 8 deletions

View File

@@ -195,7 +195,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;
}