optimize: Update documentation for Global and clean up usage of globa… (#265)

* optimize: Update documentation for Global and clean up usage of globalStatus
This commit is contained in:
Brendan Tracey
2017-10-17 09:15:41 -06:00
committed by GitHub
parent aff0e10c44
commit 38fbc22caf
3 changed files with 168 additions and 81 deletions

View File

@@ -148,10 +148,10 @@ func minimize(p *Problem, method Method, settings *Settings, stats *Stats, optLo
status = checkConvergence(optLoc, settings, true)
default: // Any of the Evaluation operations.
status, err = evaluate(p, loc, op, x)
updateStats(stats, op)
updateEvaluationStats(stats, op)
}
status, err = iterCleanup(status, err, stats, settings, statuser, startTime, loc, op)
status, err = finishIteration(status, err, stats, settings, statuser, startTime, loc, op)
if status != NotTerminated || err != nil {
return
}
@@ -209,7 +209,7 @@ func getStartingLocation(p *Problem, method Method, initX []float64, stats *Stat
}
x := make([]float64, len(loc.X))
evaluate(p, loc, eval, x)
updateStats(stats, eval)
updateEvaluationStats(stats, eval)
}
if math.IsInf(loc.F, 1) || math.IsNaN(loc.F) {