choco.cp.solver.variables.set
Class SetDomainImpl
java.lang.Object
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
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)
|
_oiterator
protected SetDomainImpl.SetOpenDomainIterator _oiterator
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 setconstant
- if true, build a constant set varenvironment
- propagationEngine
-
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.