constraints.remove(0);
initConstraint = null;
}
+ }
+
+ private void applyExtensibleDefaults() {
for(CHRConstraint constraint : constraints) {
- constraint.plans.sort((PrioritizedPlan a, PrioritizedPlan b) -> {
- return Integer.compare(a.priority, b.priority);
- });
- /*System.out.println(constraint.name);
- for(PrioritizedPlan plan : constraint.plans) {
- System.out.println(" priority " + plan.priority);
- for(PlanOp op : plan.ops)
- System.out.println(" " + op);
- }*/
+ // FIXME Too much indexing!!!
+ int max = 1 << constraint.parameterTypes.length;
+ for(int i=0;i<max;++i)
+ constraint.getOrCreateIndex(cachedContext, i);
++ constraint.setMayBeRemoved();
+ /*
+ constraint.getOrCreateIndex(cachedContext, 0);
+ if(constraint.parameterTypes.length > 0)
+ constraint.getOrCreateIndex(cachedContext, 1);*/
}
}