checkpoint
[anneal.git] / src / edu / berkeley / qfat / geom / Matrix.java
index 372e6c2..33417da 100644 (file)
@@ -367,22 +367,22 @@ public class Matrix {
     }
 
     /** returns the constraint-conjunction "(forall v)Mv=v" */
-    public AffineConstraint getConstraint(float epsilon) {
-        AffineConstraint c1 = getConstraint(a-1, b,   c,   d  , epsilon);
-        AffineConstraint c2 = getConstraint(e,   f-1, g,   h  , epsilon);
-        AffineConstraint c3 = getConstraint(i,   j,   k-1, l  , epsilon);
+    public AffineConstraint getAffineConstraint(float epsilon) {
+        AffineConstraint c1 = getAffineConstraint(a-1, b,   c,   d  , epsilon);
+        AffineConstraint c2 = getAffineConstraint(e,   f-1, g,   h  , epsilon);
+        AffineConstraint c3 = getAffineConstraint(i,   j,   k-1, l  , epsilon);
         // FIXME: bottom row constraint?
         return c1.intersect(c2.intersect(c3, epsilon), epsilon);
     }
 
     /** the AffineConstraint representing ax+by+cz+d=0 */
-    private static AffineConstraint getConstraint(float a, float b, float c, float d, float epsilon) {
+    private static AffineConstraint getAffineConstraint(float a, float b, float c, float d, float epsilon) {
         a = Math.abs(a) <= epsilon ? 0 : a;
         b = Math.abs(b) <= epsilon ? 0 : b;
         c = Math.abs(c) <= epsilon ? 0 : c;
         d = Math.abs(d) <= epsilon ? 0 : d;
         if (a!=0 || b!=0 || c!=0) return new Plane(a, b, c, d);
-        if (d==0) return new AffineConstraint.All();
-        return new AffineConstraint.Nothing();
+        if (d==0) return AffineConstraint.ALL;
+        return AffineConstraint.NONE;
     }
 }