Merging MK branch rev 586 (best-of-run in AbstractStatistics)

This commit is contained in:
Marcel Kronfeld 2010-08-05 15:31:17 +00:00
parent 57ee6d7dfb
commit 050af6e8e0

View File

@ -292,9 +292,9 @@ public abstract class AbstractStatistics implements InterfaceTextListener, Inter
functionCallSum += functionCalls; functionCallSum += functionCalls;
if (printRunStoppedVerbosity() && (stopMessage != null)) printToTextListener(" Termination message: " + stopMessage + "\n"); if (printRunStoppedVerbosity() && (stopMessage != null)) printToTextListener(" Termination message: " + stopMessage + "\n");
if (printRunStoppedVerbosity()) printToTextListener(" Function calls run: " + functionCalls + ", sum: " + functionCallSum + "\n"); if (printRunStoppedVerbosity()) printToTextListener(" Function calls run: " + functionCalls + ", sum: " + functionCallSum + "\n");
// check for convergence // check if target zero was reached
if (bestCurrentIndy != null) { if (bestCurrentIndy != null) {
if (Mathematics.norm(bestCurrentIndy.getFitness()) < this.m_StatsParams.getConvergenceRateThreshold()) { if (Mathematics.norm(bestOfRunIndy.getFitness()) < this.m_StatsParams.getConvergenceRateThreshold()) {
convergenceCnt++; convergenceCnt++;
} }
if (printRunStoppedVerbosity()) printIndy("Last best", bestCurrentIndy); if (printRunStoppedVerbosity()) printIndy("Last best", bestCurrentIndy);