The Higher Education and Research forge

Home My Page Projects Code Snippets Project Openings Complex Surface Machining Optimization
Summary Activity SCM

SCM Repository

authorJean-Max Redonnet <jean-max.redonnet@unniv-tlse3.fr>
Mon, 18 May 2020 20:23:35 +0000 (22:23 +0200)
committerJean-Max Redonnet <jean-max.redonnet@unniv-tlse3.fr>
Mon, 18 May 2020 20:23:35 +0000 (22:23 +0200)
26 files changed:
src/org/ica/cosmo/demos/CLusteringDemo.java [moved from src/org/ica/cosmo/tests/CLusteringDemo.java with 96% similarity]
src/org/ica/cosmo/demos/MachiningDemo.java [moved from src/org/ica/cosmo/tests/MachiningDemo.java with 98% similarity]
src/org/ica/cosmo/demos/package-info.java [new file with mode: 0644]
src/org/ica/cosmo/experiments/ApproxMachiningTest.java [moved from src/org/ica/cosmo/tests/ApproxMachiningTest.java with 99% similarity]
src/org/ica/cosmo/experiments/JNomad01.java [moved from src/org/ica/cosmo/tests/JNomad01.java with 97% similarity]
src/org/ica/cosmo/experiments/JNomad5AMachining.java [moved from src/org/ica/cosmo/tests/JNomad5AMachining.java with 99% similarity]
src/org/ica/cosmo/experiments/JNomadClusteringMachining.java [moved from src/org/ica/cosmo/tests/JNomadClusteringMachining.java with 90% similarity]
src/org/ica/cosmo/experiments/JNomadRPCLOpt.java [moved from src/org/ica/cosmo/tests/JNomadRPCLOpt.java with 99% similarity]
src/org/ica/cosmo/experiments/KCLusteringTest.java [moved from src/org/ica/cosmo/tests/KCLusteringTest.java with 99% similarity]
src/org/ica/cosmo/experiments/MTfullRunVTK.java [moved from src/org/ica/cosmo/tests/MTfullRunVTK.java with 99% similarity]
src/org/ica/cosmo/experiments/MachiningSgteTest.java [moved from src/org/ica/cosmo/tests/MachiningSgteTest.java with 98% similarity]
src/org/ica/cosmo/experiments/SurfaceBuilder.java [moved from src/org/ica/cosmo/tests/SurfaceBuilder.java with 99% similarity]
src/org/ica/cosmo/experiments/TestDirection.java [moved from src/org/ica/cosmo/tests/TestDirection.java with 99% similarity]
src/org/ica/cosmo/experiments/TiltedSurfaceTest.java [moved from src/org/ica/cosmo/tests/TiltedSurfaceTest.java with 99% similarity]
src/org/ica/cosmo/experiments/jNomadKmeansOpt.java [moved from src/org/ica/cosmo/tests/jNomadKmeansOpt.java with 98% similarity]
src/org/ica/cosmo/experiments/jNomadMachining.java [moved from src/org/ica/cosmo/tests/jNomadMachining.java with 99% similarity]
src/org/ica/cosmo/experiments/jNomadRosenbrock1.java [moved from src/org/ica/cosmo/tests/jNomadRosenbrock1.java with 98% similarity]
src/org/ica/cosmo/experiments/jNomadRosenbrock2.java [moved from src/org/ica/cosmo/tests/jNomadRosenbrock2.java with 98% similarity]
src/org/ica/cosmo/experiments/jNomadTest.java [moved from src/org/ica/cosmo/tests/jNomadTest.java with 98% similarity]
src/org/ica/cosmo/experiments/package-info.java [new file with mode: 0644]
src/org/ica/cosmo/tests/ClusteringUnitTest.java
src/org/ica/cosmo/tests/Support.java [deleted file]
src/org/ica/cosmo/tests/package-info.java [new file with mode: 0644]
src/org/ica/cosmo/tests/resources/Choi80x80KmeansSlope4.map [deleted file]
src/org/ica/cosmo/tests/resources/choi80x80KmeansSlope3.map
src/org/ica/cosmo/tests/resources/tile80x80KmeansSlope3.map

similarity index 96%
rename from src/org/ica/cosmo/tests/CLusteringDemo.java
rename to src/org/ica/cosmo/demos/CLusteringDemo.java
index c54400e..eb3d4a2 100644 (file)
@@ -1,8 +1,9 @@
-package org.ica.cosmo.tests;
+package org.ica.cosmo.demos;
 
 import org.ica.cosmo.clustering.ALGO_TYPE;
 import org.ica.cosmo.clustering.Clustering;
 import org.ica.cosmo.clustering.METRIC;
+import org.ica.cosmo.experiments.SurfaceBuilder;
 import org.ica.cosmo.machining.MillingContext;
 import org.ica.cosmo.zoning.SurfaceMap;
 import org.ica.vtkviewer.VtkViewer;
similarity index 98%
rename from src/org/ica/cosmo/tests/MachiningDemo.java
rename to src/org/ica/cosmo/demos/MachiningDemo.java
index 14b7742..00b6879 100644 (file)
@@ -1,10 +1,11 @@
-package org.ica.cosmo.tests;
+package org.ica.cosmo.demos;
 
 import java.util.ArrayList;
 
 import org.ica.cosmo.clustering.ALGO_TYPE;
 import org.ica.cosmo.clustering.Clustering;
 import org.ica.cosmo.clustering.METRIC;
+import org.ica.cosmo.experiments.SurfaceBuilder;
 import org.ica.cosmo.machining.AveragePDE;
 import org.ica.cosmo.machining.MillingContext;
 import org.ica.cosmo.machining.ZoneMilling_PPV3A_Approx3;
diff --git a/src/org/ica/cosmo/demos/package-info.java b/src/org/ica/cosmo/demos/package-info.java
new file mode 100644 (file)
index 0000000..b6cc005
--- /dev/null
@@ -0,0 +1,4 @@
+/**
+ * This package is intended to host basic demos with explanatory aim
+ */
+package org.ica.cosmo.demos;
\ No newline at end of file
@@ -1,4 +1,4 @@
-package org.ica.cosmo.tests;
+package org.ica.cosmo.experiments;
 
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
similarity index 97%
rename from src/org/ica/cosmo/tests/JNomad01.java
rename to src/org/ica/cosmo/experiments/JNomad01.java
index e2191f1..f44b5ba 100644 (file)
@@ -1,4 +1,4 @@
-package org.ica.cosmo.tests;
+package org.ica.cosmo.experiments;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -49,8 +49,8 @@ public class JNomad01 {
        private Surface surface;
 
        /** tessellation */
-       private int tessU = 120;
-       private int tessV = 120;
+       private int tessU = 80;
+       private int tessV = 80;
 
        /** nombre de zones */
        private int kmax = 10;
@@ -163,7 +163,7 @@ public class JNomad01 {
        }
        
        public void initModel() {
-               this.surface = SurfaceBuilder.getChoi();
+               this.surface = SurfaceBuilder.getTile();
        }
 
        public class My_Evaluator extends Evaluator {
@@ -187,6 +187,7 @@ public class JNomad01 {
                        Arrays.setAll(omega, i -> x.value(i+kmax+1));
                        DataPoint.setOmega(omega);
                        Clustering c = new Clustering((int) x.value(0), map, metric);
+                       c.run();
 //                     System.out.println("after " + c.getComputationTime() + " ms ");
                        try {
                                map = c.call();
@@ -1,4 +1,4 @@
-package org.ica.cosmo.tests;
+package org.ica.cosmo.experiments;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -1,4 +1,4 @@
-package org.ica.cosmo.tests;
+package org.ica.cosmo.experiments;
 
 import java.util.Arrays;
 
@@ -52,10 +52,12 @@ public class JNomadClusteringMachining {
 
        /** nombre de zones */
        private int k = 3;
+
        /** main program */
        public static void main(String[] args) {
                new JNomadClusteringMachining(args);
        }
+
        public JNomadClusteringMachining(String[] args) {
                super();
                MillingContext.getInstance().setCutter(new Cutter(5.0, 2.0, 100.0));
@@ -67,14 +69,14 @@ public class JNomadClusteringMachining {
                try {
                        jNomad.begin(args.length, args);
                        Parameters p = new Parameters(out);
-                       p.set_DIMENSION(this.k+1+metric.getSize());
+                       p.set_DIMENSION(this.k + 1 + metric.getSize());
 
                        BBOTVector bbot = new BBOTVector(1);
                        bbot.set(0, bb_output_type.OBJ);
 //                     bbot.set(1, bb_output_type.PB);
 //                     bbot.set(2, bb_output_type.PB);
                        p.set_BB_OUTPUT_TYPE(bbot);
-                       
+
                        p.set_HAS_SGTE(true);
                        p.set_SGTELIB_MODEL_DEFINITION("TYPE KRIGING RIDGE OPTIM DISTANCE_TYPE OPTIM BUDGET 50");
                        p.set_MODEL_SEARCH(model_type.SGTELIB_MODEL);
@@ -84,7 +86,7 @@ public class JNomadClusteringMachining {
                        p.set_SGTELIB_MODEL_DIVERSIFICATION(new Double(0.5));
                        p.set_SGTELIB_MODEL_TRIALS(2);
                        p.set_SGTELIB_MODEL_CANDIDATES_NB(2);
-                       
+
 //                     p.set_NM_SEARCH(false);
 //                     p.set_VNS_SEARCH(true);
 //                     p.set_TREND_MATRIX_BASIC_LINE_SEARCH(true);
@@ -92,9 +94,9 @@ public class JNomadClusteringMachining {
                        p.set_DISPLAY_STATS("bbe ( sol ) obj");
 //                     p.set_SGTELIB_MODEL_DISPLAY(new String("I"));
 
-                       Point x0 = new Point(this.k+1+metric.getSize());
-                       Point lowbound = new Point(this.k+1+metric.getSize());
-                       Point upbound = new Point(this.k+1+metric.getSize());
+                       Point x0 = new Point(this.k + 1 + metric.getSize());
+                       Point lowbound = new Point(this.k + 1 + metric.getSize());
+                       Point upbound = new Point(this.k + 1 + metric.getSize());
                        // good starting point
                        SurfaceMap map = new SurfaceMap(surface, tessU, tessV);
                        double omega[] = new double[metric.getSize()];
@@ -112,14 +114,14 @@ public class JNomadClusteringMachining {
                        SetInt grp2 = new SetInt();
                        for (int zj = 0; zj < this.k; zj++) {
                                grp1.insert(zj);
-                               x0.set_coord(zj,new Double(centroids[zj].getValue(3)));
+                               x0.set_coord(zj, new Double(centroids[zj].getValue(3)));
 //                             x0.set_coord(zj, new Double(1.0));
                                lowbound.set_coord(zj, new Double(-Math.PI));
                                upbound.set_coord(zj, new Double(Math.PI));
                                p.set_PERIODIC_VARIABLE(zj);
                        }
                        x0.set_coord(this.k, new Double(1.0));
-                       for (int i = this.k+1; i<this.k+1+metric.getSize(); i++) {
+                       for (int i = this.k + 1; i < this.k + 1 + metric.getSize(); i++) {
                                grp2.insert(i);
                                x0.set_coord(i, new Double(1.0));
                                lowbound.set_coord(i, new Double(0.001));
@@ -128,7 +130,7 @@ public class JNomadClusteringMachining {
                        p.set_X0(x0);
 //                     p.set_X0(new Point(this.k, new Double(1.0)));
                        p.set_LOWER_BOUND(lowbound);
-                       p.set_UPPER_BOUND(upbound); 
+                       p.set_UPPER_BOUND(upbound);
                        p.set_VARIABLE_GROUP(grp1);
                        p.set_VARIABLE_GROUP(grp2);
 
@@ -157,7 +159,6 @@ public class JNomadClusteringMachining {
                        }
                        double f = sol.get_f().value();
                        System.out.println("Objectif : " + f);
-                       
 
                } catch (RuntimeException e) {
                        System.err.println("\nNOMAD has been interrupted (" + e.toString() + ")\n\n");
@@ -183,17 +184,17 @@ public class JNomadClusteringMachining {
 
                public boolean eval_x(Eval_Point x, Double h_max, boolean[] count_eval) {
 
-                       SurfaceMap map; 
+                       SurfaceMap map;
                        ZoneMilling_PPV3A_Approx.APPROX_LEVEL apxl;
                        if (x.get_eval_type() == eval_type.SGTE) {
-                               apxl = ZoneMilling_PPV3A_Approx.APPROX_LEVEL.MEDIUM;
+                               apxl = ZoneMilling_PPV3A_Approx.APPROX_LEVEL.COARSE;
                                map = new SurfaceMap(surface, 40, 40);
                        } else {
-                               apxl = ZoneMilling_PPV3A_Approx.APPROX_LEVEL.ULTRA;
+                               apxl = ZoneMilling_PPV3A_Approx.APPROX_LEVEL.MEDIUM;
                                map = new SurfaceMap(surface, tessU, tessV);
                        }
                        double omega[] = new double[metric.getSize()];
-                       Arrays.setAll(omega, i -> x.value(i+k+1));
+                       Arrays.setAll(omega, i -> x.value(i + k + 1));
 //                     for (int i=0; i<metric.getSize()-1; i++) {
 //                             omega[i] = x.value(i+k+1);
 //                     }
@@ -203,8 +204,8 @@ public class JNomadClusteringMachining {
 //                     }
 //                     omega[metric.getSize()-1] = 1 - c1;
                        DataPoint.setOmega(omega);
-                       Clustering c = new Clustering(k, map, ALGO_TYPE.KMEANS,metric,true);
-                       c.run(); 
+                       Clustering c = new Clustering(k, map, ALGO_TYPE.KMEANS, metric, true);
+                       c.run();
 //                     System.out.println("after " + c.getComputationTime() + " ms ");
                        try {
                                map = c.call();
@@ -215,12 +216,13 @@ public class JNomadClusteringMachining {
 //                     ArrayList<ZoneMilling_PPV3A_Approx> zma = new ArrayList<ZoneMilling_PPV3A_Approx>(k);
                        double totalLength = 0.0;
                        double totalTime = 0.0;
-                       if (c.getCentroids().length>k+1) {
+                       if (c.getCentroids().length > k + 1) {
                                return false;
                        }
                        for (int zj = 0; zj < c.getCentroids().length; zj++) {
 //                             System.out.println("Milling zone " + zj);
-                               ZoneMilling_PPV3A_Approx zMilling = new ZoneMilling_PPV3A_Approx(map.getZone(zj), x.value(zj), true, apxl);
+                               ZoneMilling_PPV3A_Approx zMilling = new ZoneMilling_PPV3A_Approx(map.getZone(zj), x.value(zj), true,
+                                               apxl);
 //                             zma.add(zMilling);
                                zMilling.run();
                                totalLength = totalLength + zMilling.getToolPathApproxLength() + zMilling.getPenalty();
@@ -1,4 +1,4 @@
-package org.ica.cosmo.tests;
+package org.ica.cosmo.experiments;
 
 import java.util.Arrays;
 
@@ -1,4 +1,4 @@
-package org.ica.cosmo.tests;
+package org.ica.cosmo.experiments;
 
 import java.awt.BorderLayout;
 import java.awt.event.ActionEvent;
similarity index 99%
rename from src/org/ica/cosmo/tests/MTfullRunVTK.java
rename to src/org/ica/cosmo/experiments/MTfullRunVTK.java
index 32ba924..7462f0e 100644 (file)
@@ -1,4 +1,4 @@
-package org.ica.cosmo.tests;
+package org.ica.cosmo.experiments;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -1,4 +1,4 @@
-package org.ica.cosmo.tests;
+package org.ica.cosmo.experiments;
 
 import java.util.ArrayList;
 
@@ -62,7 +62,7 @@ public class MachiningSgteTest {
                super();
                MillingContext.getInstance().setCutter(new Cutter(5.0, 2.0, 100.0));
                MillingContext.getInstance().setScallopHeight(0.01);
-               this.surface = SurfaceBuilder.getTile();
+               this.surface = SurfaceBuilder.getChoi();
 
                SurfaceMap map = new SurfaceMap(surface, tessU, tessV);
                Clustering c = new Clustering(k, map, algo_type, metric, true);
@@ -1,4 +1,4 @@
-package org.ica.cosmo.tests;
+package org.ica.cosmo.experiments;
 
 import static java.lang.Math.PI;
 import static java.lang.Math.cos;
@@ -84,7 +84,7 @@
 //
 //}
 
-package org.ica.cosmo.tests;
+package org.ica.cosmo.experiments;
 
 import java.text.DecimalFormat;
 import java.text.NumberFormat;
@@ -1,4 +1,4 @@
-package org.ica.cosmo.tests;
+package org.ica.cosmo.experiments;
 
 import java.text.DecimalFormat;
 import java.text.NumberFormat;
@@ -1,4 +1,4 @@
-package org.ica.cosmo.tests;
+package org.ica.cosmo.experiments;
 
 import java.util.Arrays;
 
@@ -161,10 +161,10 @@ public class jNomadKmeansOpt {
                        SurfaceMap map; 
                        ZoneMilling_PPV3A_Approx.APPROX_LEVEL apxl;
                        if (x.get_eval_type() == eval_type.SGTE) {
-                               apxl = ZoneMilling_PPV3A_Approx.APPROX_LEVEL.MEDIUM;
+                               apxl = ZoneMilling_PPV3A_Approx.APPROX_LEVEL.COARSE;
                                map = new SurfaceMap(surface, 40, 40);
                        } else {
-                               apxl = ZoneMilling_PPV3A_Approx.APPROX_LEVEL.ULTRA;
+                               apxl = ZoneMilling_PPV3A_Approx.APPROX_LEVEL.MEDIUM;
                                map = new SurfaceMap(surface, tessU, tessV);
                        }
                        double omega[] = new double[metric.getSize()];
@@ -1,4 +1,4 @@
-package org.ica.cosmo.tests;
+package org.ica.cosmo.experiments;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -1,4 +1,4 @@
-package org.ica.cosmo.tests;
+package org.ica.cosmo.experiments;
 
 import jNomad.BBOTVector;
 import jNomad.Display;
@@ -1,4 +1,4 @@
-package org.ica.cosmo.tests;
+package org.ica.cosmo.experiments;
 
 import jNomad.BBOTVector;
 import jNomad.Display;
similarity index 98%
rename from src/org/ica/cosmo/tests/jNomadTest.java
rename to src/org/ica/cosmo/experiments/jNomadTest.java
index cb473f6..74bd2ac 100644 (file)
@@ -1,4 +1,4 @@
-package org.ica.cosmo.tests;
+package org.ica.cosmo.experiments;
 
 import jNomad.BBOTVector;
 import jNomad.Display;
diff --git a/src/org/ica/cosmo/experiments/package-info.java b/src/org/ica/cosmo/experiments/package-info.java
new file mode 100644 (file)
index 0000000..27e710b
--- /dev/null
@@ -0,0 +1,7 @@
+/**
+ * This package is intended to host various experiments.
+ * 
+ * Not necessary sync with git repository.
+ * 
+ */
+package org.ica.cosmo.experiments;
\ No newline at end of file
index ffd814d..03b3103 100644 (file)
@@ -5,6 +5,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import org.ica.cosmo.clustering.ALGO_TYPE;
 import org.ica.cosmo.clustering.Clustering;
 import org.ica.cosmo.clustering.METRIC;
+import org.ica.cosmo.experiments.SurfaceBuilder;
 import org.ica.cosmo.machining.MillingContext;
 import org.ica.cosmo.zoning.SurfaceMap;
 import org.junit.jupiter.api.Test;
@@ -125,4 +126,84 @@ class ClusteringUnitTest {
                assertEquals(4, k);
        }
 
+       @Test
+       void test5() throws Exception {
+               MillingContext.getInstance().setCutter(new Cutter(5.0, 2.0, 100.0));
+               MillingContext.getInstance().setScallopHeight(0.01);
+               algo_type = ALGO_TYPE.KMEANS;
+               metric = METRIC.SLOPE;
+               surface = SurfaceBuilder.getTile();
+               tessU = 40;
+               tessV = 40;
+               k = 3;
+               SurfaceMap map = new SurfaceMap(surface, tessU, tessV);
+               map.initNZone(k);
+               Clustering c = new Clustering(k, map, algo_type, metric, true);
+               c.run();
+               try {
+                       map = c.call();
+               } catch (Exception e) {
+                       e.printStackTrace();
+               }
+
+               k = c.getCentroids().length;
+
+               assertEquals(3, k);
+       }
+
+       @Test
+       void test6() throws Exception {
+               MillingContext.getInstance().setCutter(new Cutter(5.0, 2.0, 100.0));
+               MillingContext.getInstance().setScallopHeight(0.01);
+               algo_type = ALGO_TYPE.HIERARCHICAL;
+               metric = METRIC.SLOPE;
+               surface = SurfaceBuilder.getTile();
+               tessU = 40;
+               tessV = 40;
+               k = 3;
+               SurfaceMap map = new SurfaceMap(surface, tessU, tessV);
+               map.initNZone(k);
+               Clustering c = new Clustering(k, map, algo_type, metric, true);
+               c.run();
+               try {
+                       map = c.call();
+               } catch (Exception e) {
+                       e.printStackTrace();
+               }
+
+               k = c.getCentroids().length;
+
+               /*
+                * Because of the random into hierarchical algo final number of zones is
+                * difficult to predict.
+                * 
+                * Thus final assertion is committed to avoid possible erroneous test failure
+                */
+               // assertEquals(4, k);
+       }
+
+       @Test
+       void test7() throws Exception {
+               MillingContext.getInstance().setCutter(new Cutter(5.0, 2.0, 100.0));
+               MillingContext.getInstance().setScallopHeight(0.01);
+               algo_type = ALGO_TYPE.RPCL;
+               metric = METRIC.SLOPE;
+               surface = SurfaceBuilder.getTile();
+               tessU = 40;
+               tessV = 40;
+               k = 3;
+               SurfaceMap map = new SurfaceMap(surface, tessU, tessV);
+               map.initNZone(k);
+               Clustering c = new Clustering(k, map, algo_type, metric, true);
+               c.run();
+               try {
+                       map = c.call();
+               } catch (Exception e) {
+                       e.printStackTrace();
+               }
+
+               k = c.getCentroids().length;
+
+               assertEquals(3, k);
+       }
 }
diff --git a/src/org/ica/cosmo/tests/Support.java b/src/org/ica/cosmo/tests/Support.java
deleted file mode 100644 (file)
index f9e2319..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-package org.ica.cosmo.tests;
-
-import static java.lang.System.out;
-
-import org.lgmt.dgl.commons.Matrix2d;
-import org.lgmt.dgl.vecmath.Matrix3d;
-import org.lgmt.dgl.vecmath.Matrix4d;
-import org.lgmt.dgl.vecmath.Tuple2d;
-import org.lgmt.dgl.vecmath.Tuple3d;
-
-public class Support {
-       public static void printMatrix2d(String s, Matrix2d m) {
-               for (int i = 0; i < s.length() + 3; i++)
-                       out.printf(" ");
-               out.printf("(% .3f % .3f )\n", m.m00, m.m01);
-               out.printf("%s = (% .3f % .3f )\n", s, m.m10, m.m11);
-       }
-
-       public static void printMatrix3d(String s, Matrix3d m) {
-               for (int i = 0; i < s.length() + 3; i++)
-                       out.printf(" ");
-               out.printf("(% .3f % .3f % .3f )\n", m.m00, m.m01, m.m02);
-               out.printf("%s = (% .3f % .3f % .3f )\n", s, m.m10, m.m11, m.m12);
-               for (int i = 0; i < s.length() + 3; i++)
-                       out.printf(" ");
-               out.printf("(% .3f % .3f % .3f )\n", m.m20, m.m21, m.m22);
-       }
-
-       public static void printMatrix4d(String s, Matrix4d m) {
-               for (int i = 0; i < s.length() + 3; i++)
-                       out.printf(" ");
-               out.printf("(% .3f % .3f % .3f % .3f )\n", m.m00, m.m01, m.m02, m.m03);
-               out.printf("%s = (% .3f % .3f % .3f % .3f )\n", s, m.m10, m.m11, m.m12, m.m13);
-               for (int i = 0; i < s.length() + 3; i++)
-                       out.printf(" ");
-               out.printf("(% .3f % .3f % .3f % .3f )\n", m.m20, m.m21, m.m22, m.m23);
-               for (int i = 0; i < s.length() + 3; i++)
-                       out.printf(" ");
-               out.printf("(% .3f % .3f % .3f % .3f )\n", m.m30, m.m31, m.m32, m.m33);
-       }
-
-       public static void printTuple3d(String s, Tuple3d t) {
-               for (int i = 0; i < s.length() + 3; i++)
-                       out.printf(" ");
-               out.printf("(% .3f )\n", t.x);
-               out.printf("%s = (% .3f )\n", s, t.y);
-               for (int i = 0; i < s.length() + 3; i++)
-                       out.printf(" ");
-               out.printf("(% .3f )\n", t.z);
-       }
-
-       public static void printTuple2d(String s, Tuple2d t) {
-               out.printf("%s = (% .3f )\n", s, t.y);
-               for (int i = 0; i < s.length() + 3; i++)
-                       out.printf(" ");
-               out.printf("(% .3f )\n", t.x);
-       }
-
-}
diff --git a/src/org/ica/cosmo/tests/package-info.java b/src/org/ica/cosmo/tests/package-info.java
new file mode 100644 (file)
index 0000000..de3cd7d
--- /dev/null
@@ -0,0 +1,5 @@
+/**
+ * This package is intended to host JUnit tests 
+ */
+package org.ica.cosmo.tests;
+
diff --git a/src/org/ica/cosmo/tests/resources/Choi80x80KmeansSlope4.map b/src/org/ica/cosmo/tests/resources/Choi80x80KmeansSlope4.map
deleted file mode 100644 (file)
index 6a8919f..0000000
Binary files a/src/org/ica/cosmo/tests/resources/Choi80x80KmeansSlope4.map and /dev/null differ
index 2018e39..66863a4 100644 (file)
Binary files a/src/org/ica/cosmo/tests/resources/choi80x80KmeansSlope3.map and b/src/org/ica/cosmo/tests/resources/choi80x80KmeansSlope3.map differ
index 0ff141b..4deea93 100644 (file)
Binary files a/src/org/ica/cosmo/tests/resources/tile80x80KmeansSlope3.map and b/src/org/ica/cosmo/tests/resources/tile80x80KmeansSlope3.map differ