You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tn...@apache.org on 2013/12/10 23:13:14 UTC

svn commit: r1549985 - /commons/proper/math/trunk/src/userguide/java/org/apache/commons/math3/userguide/genetics/ImageEvolutionExample.java

Author: tn
Date: Tue Dec 10 22:13:14 2013
New Revision: 1549985

URL: http://svn.apache.org/r1549985
Log:
Remove some debug code.

Modified:
    commons/proper/math/trunk/src/userguide/java/org/apache/commons/math3/userguide/genetics/ImageEvolutionExample.java

Modified: commons/proper/math/trunk/src/userguide/java/org/apache/commons/math3/userguide/genetics/ImageEvolutionExample.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/userguide/java/org/apache/commons/math3/userguide/genetics/ImageEvolutionExample.java?rev=1549985&r1=1549984&r2=1549985&view=diff
==============================================================================
--- commons/proper/math/trunk/src/userguide/java/org/apache/commons/math3/userguide/genetics/ImageEvolutionExample.java (original)
+++ commons/proper/math/trunk/src/userguide/java/org/apache/commons/math3/userguide/genetics/ImageEvolutionExample.java Tue Dec 10 22:13:14 2013
@@ -142,24 +142,14 @@ public class ImageEvolutionExample {
             noStopRequested = true;
             Runnable r = new Runnable() {
                 public void run() {
-                    try {
-                        double lastBestFit = Double.MIN_VALUE;
-                        int evolution = 0;
-                        while (noStopRequested) {
-                            currentPopulation = ga.nextGeneration(currentPopulation);
-
-                            System.out.println("generation: " + evolution++ + ": " + bestFit.toString());
-                            bestFit = currentPopulation.getFittestChromosome();
-
-                            if (lastBestFit > bestFit.getFitness()) {
-                                System.out.println("gotcha");
-                            }
-                            lastBestFit = bestFit.getFitness();
-                            painter.repaint();
-                        }
-                    } catch (Exception x) {
-                        // in case ANY exception slips through
-                        x.printStackTrace();
+                    int evolution = 0;
+                    while (noStopRequested) {
+                        currentPopulation = ga.nextGeneration(currentPopulation);
+
+                        System.out.println("generation: " + evolution++ + ": " + bestFit.toString());
+                        bestFit = currentPopulation.getFittestChromosome();
+
+                        painter.repaint();
                     }
                 }
             };