artofscience / SAOR

Sequential Approximate Optimization Repository
GNU General Public License v3.0
5 stars 1 forks source link

Refactor `criterion` class #95

Open Giannis1993 opened 2 years ago

Giannis1993 commented 2 years ago

After talking to @artofscience, we agreed upon making the following changes to the convergence criteria class:

  1. Rename converged object to criterion tp make it self-explanatory.
  2. Add a criterion.value attribute in order to access its value without recalculating it.
  3. Return an array of values if multiple criteria are considered at the same time.
MaxvdKolk commented 2 years ago

For the criterion.value you can use the done attribute implemented by the Criterion class. To return a list of values we need to walk the tree of Criterion classes contained in the Criteria when using the & | ~ operators. I can try to add that feature.