choco.kernel.solver.constraints
Interface SConstraintCollection


public interface SConstraintCollection

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(Collection collection)
          Adds several constraints at a time
 void clear()
          Deletes all indirect constraints.
 boolean contains(Propagator ct)
          currentElement if a constraint is in the collection
 boolean containsAll(SConstraintCollection collec)
          currentElement inclusion
 SConstraintCollection 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).
 Iterator<Propagator> iterator()
          get an iterator over the collection of constraint.
 void merge(SConstraintCollection collection)
          Merges an explain with the current one.
 int size()
          return the size of the bitSet
 

Method Detail

merge

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

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

copy

SConstraintCollection 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(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)
currentElement if a constraint is in the collection


containsAll

boolean containsAll(SConstraintCollection collec)
currentElement inclusion


iterator

Iterator<Propagator> iterator()
get an iterator over the collection of constraint.



Copyright © 2012. All Rights Reserved.