X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Fqfat%2Fbind%2FHasBindingGroup.java;h=56b7d9bdacdb1412545c64f2b6ebf9ec448df0f9;hb=a8f2c5bca1b1d5ba07af65b07f7b09a59a8701c9;hp=b7c8db30fe716714856d7a9d8978602fb7eb0117;hpb=8084a784db5cd0f688d230ab9624ab6966265f39;p=anneal.git diff --git a/src/edu/berkeley/qfat/bind/HasBindingGroup.java b/src/edu/berkeley/qfat/bind/HasBindingGroup.java index b7c8db3..56b7d9b 100644 --- a/src/edu/berkeley/qfat/bind/HasBindingGroup.java +++ b/src/edu/berkeley/qfat/bind/HasBindingGroup.java @@ -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; + } }