Example #1
0
 @Override
 public BindingMode getBinding(Atom atom) {
   if (referencedAtoms.contains(atom)) {
     if (setAtom.isActive()) return BindingMode.StrongRV;
     else return BindingMode.WeakRV;
   } else if (setAtom.equals(atom)) {
     if (definitionType.getAggregator().enoughSupport(set1, set2, referencedAtoms))
       return BindingMode.StrongRV;
     else return BindingMode.WeakRV;
   } else return BindingMode.NoBinding;
 }
Example #2
0
 @Override
 public String toString() {
   StringBuilder b = new StringBuilder();
   b.append(setAtom).append("=").append("{");
   for (Atom atom : referencedAtoms) {
     b.append(atom).append(" , ");
   }
   b.delete(b.length() - 3, b.length());
   b.append("}");
   b.append(" defined by ").append(definitionType.getAggregator());
   return b.toString();
 }
Example #3
0
 public double getAggregateValue() {
   return definitionType.getAggregator().aggregateValue(set1, set2, referencedAtoms);
 }
Example #4
0
 @Override
 public ConstraintTerm getConstraintDefinition() {
   return definitionType.getAggregator().defineConstraint(setAtom, set1, set2, referencedAtoms);
 }