commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1549985 - /commons/proper/math/trunk/src/userguide/java/org/apache/commons/math3/userguide/genetics/ImageEvolutionExample.java
Date Tue, 10 Dec 2013 22:13:14 GMT
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();
                     }
                 }
             };



Mime
View raw message