choco
Interface ConstraintCollection

All Known Subinterfaces:
Explanation, IRemovalExplanation, PalmExplanation, RealBoundExplanation
All Known Implementing Classes:
AbstractBoundExplanation, AbstractRealBoundExplanation, BendersExplanation, DecSupExplanation, GenericExplanation, IncInfExplanation, JumpExplanation, RealDecSupExplanation, RealIncInfExplanation, RemovalExplanation

public interface ConstraintCollection

An interface for handling collections (sets/sequences) of constraints. This is useful for representing explanations, states, paths in a search tree, and so on.


Method Summary
 void add(Propagator constraint)
          Adds a new constraint in the explain.
 void addAll(java.util.Collection collection)
          Adds several constraints at a time
 void clear()
          Deletes all indirect constraints.
 boolean contains(Propagator ct)
          test if a constraint is in the collection
 boolean containsAll(ConstraintCollection collec)
          test inclusion
 ConstraintCollection copy()
          Clones the collection as a new one.
 void delete(Propagator constraint)
          Deletes a constraint from the explain.
 boolean isEmpty()
          Checks if the explain is empty (that is wether the size of the set is null).
 void merge(ConstraintCollection collection)
          Merges an explain with the current one.
 int size()
          return the size of the bitSet
 

Method Detail

merge

void merge(ConstraintCollection collection)
Merges an explain with the current one.

Parameters:
collection - The collection of constraints that must be added to this

copy

ConstraintCollection copy()
Clones the collection as a new one.


add

void add(Propagator constraint)
Adds a new constraint in the explain.

Parameters:
constraint - The constraint that should be added to the explain. It must be a PalmConstraint.

delete

void delete(Propagator constraint)
Deletes a constraint from the explain.

Parameters:
constraint - The constraint that must be removed.

addAll

void addAll(java.util.Collection collection)
Adds several constraints at a time

Parameters:
collection - The set of constraints

isEmpty

boolean isEmpty()
Checks if the explain is empty (that is wether the size of the set is null).


size

int size()
return the size of the bitSet


clear

void clear()
Deletes all indirect constraints.


contains

boolean contains(Propagator ct)
test if a constraint is in the collection


containsAll

boolean containsAll(ConstraintCollection collec)
test inclusion