choco.cp.solver.variables.set
Class SetDomainImpl

java.lang.Object
  extended by choco.cp.solver.variables.set.SetDomainImpl
All Implemented Interfaces:
IPretty, Domain, SetDomain

public final class SetDomainImpl
extends Object
implements SetDomain

Created by IntelliJ IDEA. User: Hadrien Date: 6 juin 2004 Time: 14:20:54


Nested Class Summary
protected static class SetDomainImpl.SetOpenDomainIterator
           
 
Field Summary
protected  SetDomainImpl.SetOpenDomainIterator _oiterator
           
 
Constructor Summary
SetDomainImpl(SetVar v, int[] sortedValues, boolean constant, IEnvironment environment, PropagationEngine propagationEngine)
          Constructor of set var, allow creation of constant set var and empty set var.
SetDomainImpl(SetVar v, int[] sortedValues, IEnvironment environment, PropagationEngine propagationEngine)
           
SetDomainImpl(SetVar v, int a, int b, IEnvironment environment, PropagationEngine propagationEngine)
           
 
Method Summary
 boolean addToKernel(int x)
           
 boolean addToKernel(int x, SConstraint cause, boolean forceAwake)
           
 SetSubDomain getEnveloppeDomain()
           
 DisposableIntIterator getEnveloppeIterator()
           
 SetSubDomain getKernelDomain()
           
 DisposableIntIterator getKernelIterator()
           
 DisposableIntIterator getOpenDomainIterator()
           
 boolean instantiate(int[] x, SConstraint cause, boolean forceAwake)
           
 boolean isInstantiated()
           
 String pretty()
          pretty printing of the object.
 boolean remFromEnveloppe(int x, SConstraint cause, boolean forceAwake)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_oiterator

protected SetDomainImpl.SetOpenDomainIterator _oiterator
Constructor Detail

SetDomainImpl

public SetDomainImpl(SetVar v,
                     int a,
                     int b,
                     IEnvironment environment,
                     PropagationEngine propagationEngine)

SetDomainImpl

public SetDomainImpl(SetVar v,
                     int[] sortedValues,
                     IEnvironment environment,
                     PropagationEngine propagationEngine)

SetDomainImpl

public SetDomainImpl(SetVar v,
                     int[] sortedValues,
                     boolean constant,
                     IEnvironment environment,
                     PropagationEngine propagationEngine)
Constructor of set var, allow creation of constant set var and empty set var.

Parameters:
v -
sortedValues - values of the set var. If null or lenght=0 => empty set
constant - if true, build a constant set var
environment -
propagationEngine -
Method Detail

getKernelDomain

public SetSubDomain getKernelDomain()
Specified by:
getKernelDomain in interface SetDomain

getEnveloppeDomain

public SetSubDomain getEnveloppeDomain()
Specified by:
getEnveloppeDomain in interface SetDomain

addToKernel

public boolean addToKernel(int x)

isInstantiated

public boolean isInstantiated()
Specified by:
isInstantiated in interface SetDomain

toString

public String toString()
Overrides:
toString in class Object

pretty

public String pretty()
Description copied from interface: IPretty
pretty printing of the object. This String is not constant and may depend on the context.

Specified by:
pretty in interface IPretty
Returns:
a readable string representation of the object

remFromEnveloppe

public boolean remFromEnveloppe(int x,
                                SConstraint cause,
                                boolean forceAwake)
                         throws ContradictionException
Specified by:
remFromEnveloppe in interface SetDomain
Throws:
ContradictionException

addToKernel

public boolean addToKernel(int x,
                           SConstraint cause,
                           boolean forceAwake)
                    throws ContradictionException
Specified by:
addToKernel in interface SetDomain
Throws:
ContradictionException

instantiate

public boolean instantiate(int[] x,
                           SConstraint cause,
                           boolean forceAwake)
                    throws ContradictionException
Specified by:
instantiate in interface SetDomain
Throws:
ContradictionException

getKernelIterator

public DisposableIntIterator getKernelIterator()
Specified by:
getKernelIterator in interface SetDomain

getEnveloppeIterator

public DisposableIntIterator getEnveloppeIterator()
Specified by:
getEnveloppeIterator in interface SetDomain

getOpenDomainIterator

public DisposableIntIterator getOpenDomainIterator()
Specified by:
getOpenDomainIterator in interface SetDomain


Copyright © 2012. All Rights Reserved.