checkpoint
[anneal.git] / src / edu / berkeley / qfat / bind / HasBindingGroup.java
index b7c8db3..56b7d9b 100644 (file)
@@ -32,6 +32,13 @@ public abstract class HasBindingGroup {
         if (bindingGroup == null) bindingGroup = new BindingGroup(this);
         if (other.bindingGroup == null) other.bindingGroup = new BindingGroup(other);
 
+        //                            this  =                         bg.getMatrix(this)   * bg.master
+        //                            other =                         obg.getMatrix(other) * obg.master
+        //                            this  =                         bindingMatrix        * other
+        //                            this  =                         bindingMatrix        * obg.getMatrix(other) * obg.master
+        // bg.getMatrix(this)  * bg.master  =                         bindingMatrix        * obg.getMatrix(other) * obg.master
+        //                       bg.master  = bg.getMatrix(this)^-1 * bindingMatrix        * obg.getMatrix(other) * obg.master
+        // bg.master = XXX * obg.master
         Matrix bm = bindingGroup.getMatrix(this);
         Matrix obm = other.bindingGroup.getMatrix(other);
         bindingMatrix =
@@ -81,4 +88,10 @@ public abstract class HasBindingGroup {
     /** invoked after the binding group of this HBG has changed due to bindTo() or unbind() */
     public void bindingGroupChanged() {
     }
+
+    public boolean bindingGroupUnconstrained() {
+        if (bindingGroupSize() > 1) return false;
+        if (getBindingConstraint()!=AffineConstraint.ALL) return false;
+        return true;
+    }
 }