Skip to content
Snippets Groups Projects
Commit 4fc93204 authored by Carsten Gräser's avatar Carsten Gräser
Browse files

Default implement getSol()

This is the first step towards getting rid of the infamous
getSol() method which has several problems: It returns
a copy, it's non-const, it allows that iteration steps
bypass the x_ member which is dedicated to storing the
iterate.

Having the default implementation allows to remove the
implementation of this method from most interation
steps.
parent 803cec75
No related branches found
No related tags found
No related merge requests found
......@@ -54,7 +54,10 @@ class IterationStep : virtual public NumProc, public CanIgnore<BitVectorType>
}
//! Return solution object
virtual VectorType getSol() = 0;
virtual VectorType getSol()
{
return *getIterate();
}
/** \brief Checks whether all relevant member variables are set
* \exception SolverError if the iteration step is not set up properly
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment