choco.kernel.solver.variables.set
Interface SetVar

All Superinterfaces:
IExtensionnable, IIndex, IPretty, Var
All Known Implementing Classes:
SetVarImpl

public interface SetVar
extends Var


Field Summary
static int BOUNDSET_BOUNDCARD
          Public user API: static constants associated to the encoding of the variable domain these constants are passed as parameters to the constructor of Set Vars
static int BOUNDSET_CONSTANT
          Public user API: static constants associated to the encoding of the variable domain these constants are passed as parameters to the constructor of Set Vars
static int BOUNDSET_ENUMCARD
          Public user API: static constants associated to the encoding of the variable domain these constants are passed as parameters to the constructor of Set Vars
 
Fields inherited from interface choco.kernel.solver.variables.Var
LOGGER
 
Method Summary
 boolean addToKernel(int x, int idx)
          Deprecated. 
 boolean addToKernel(int x, SConstraint cause, boolean forceAwake)
          Propagation events updating the kernel of a variable (i.e adding a value)
 boolean canBeEqualTo(SetVar x)
          Public user API: Domains : testing whether two variables have intersecting domains.
 IntDomainVar getCard()
           
 SetDomain getDomain()
          Public user API: Domains : returns the object responsible for storing the enumeration of values in the domain
 int getEnveloppeDomainSize()
          Public user API: Domains : retrieves the number of values in the enveloppe domain.
 int getEnveloppeInf()
          Returns the lower bound of the enveloppe variable domain.
 int getEnveloppeSup()
           
 int getKernelDomainSize()
          Public user API: Domains : retrieves the number of values in the kernel domain.
 int getKernelInf()
           
 int getKernelSup()
           
 int[] getValue()
          Returns the value of the variable if instantiated.
 boolean instantiate(int[] x, int idx)
          Deprecated. 
 boolean instantiate(int[] x, SConstraint cause, boolean forceAwake)
          Propagation events instantiated a set var to a specific set of values
 boolean isInDomainEnveloppe(int x)
          Public user API: Domains : testing whether a value is in the enveloppe domain.
 boolean isInDomainKernel(int x)
          Public user API: Domains : testing whether a value is in the kernel domain
 boolean remFromEnveloppe(int x, int idx)
          Deprecated. 
 boolean remFromEnveloppe(int x, SConstraint cause, boolean forceAwake)
          Propagation events updating the enveloppe of a variable (i.e removing a value)
 void setVal(int[] val)
          set the value of the variable to the set val.
 void setValIn(int x)
          Public user API: setting a value to the kernel of a set variable
 void setValOut(int x)
          Public user API: removing a value from the Enveloppe of a set variable.
 
Methods inherited from interface choco.kernel.solver.variables.Var
addConstraint, getConstraint, getConstraintsIterator, getConstraintVector, getEvent, getIndexVector, getName, getNbConstraints, getPriority, getVarIndex, isInstantiated
 
Methods inherited from interface choco.IPretty
pretty
 
Methods inherited from interface choco.kernel.common.IIndex
getIndex
 
Methods inherited from interface choco.IExtensionnable
addExtension, getExtension
 

Field Detail

BOUNDSET_BOUNDCARD

static final int BOUNDSET_BOUNDCARD
Public user API: static constants associated to the encoding of the variable domain these constants are passed as parameters to the constructor of Set Vars

See Also:
Constant Field Values

BOUNDSET_ENUMCARD

static final int BOUNDSET_ENUMCARD
Public user API: static constants associated to the encoding of the variable domain these constants are passed as parameters to the constructor of Set Vars

See Also:
Constant Field Values

BOUNDSET_CONSTANT

static final int BOUNDSET_CONSTANT
Public user API: static constants associated to the encoding of the variable domain these constants are passed as parameters to the constructor of Set Vars

See Also:
Constant Field Values
Method Detail

getCard

IntDomainVar getCard()
Returns:
the IntDomainVar representing the cardinality of this set

setValIn

void setValIn(int x)
              throws ContradictionException
Public user API: setting a value to the kernel of a set variable

Parameters:
x - the value that is set to the variable
Throws:
ContradictionException

setValOut

void setValOut(int x)
               throws ContradictionException
Public user API: removing a value from the Enveloppe of a set variable.

Parameters:
x - the removed value
Throws:
ContradictionException

getDomain

SetDomain getDomain()
Public user API: Domains : returns the object responsible for storing the enumeration of values in the domain


isInDomainKernel

boolean isInDomainKernel(int x)
Public user API: Domains : testing whether a value is in the kernel domain

Parameters:
x - the tested value

isInDomainEnveloppe

boolean isInDomainEnveloppe(int x)
Public user API: Domains : testing whether a value is in the enveloppe domain.

Parameters:
x - the tested value

canBeEqualTo

boolean canBeEqualTo(SetVar x)
Public user API: Domains : testing whether two variables have intersecting domains.

Parameters:
x - the other variable

getKernelDomainSize

int getKernelDomainSize()
Public user API: Domains : retrieves the number of values in the kernel domain.


getEnveloppeDomainSize

int getEnveloppeDomainSize()
Public user API: Domains : retrieves the number of values in the enveloppe domain.


getEnveloppeInf

int getEnveloppeInf()
Returns the lower bound of the enveloppe variable domain. (i.e the smallest value contained in the enveloppe)

Returns:
the enveloppe domain lower bound

getEnveloppeSup

int getEnveloppeSup()

getKernelInf

int getKernelInf()

getKernelSup

int getKernelSup()

getValue

int[] getValue()
Returns the value of the variable if instantiated.

Returns:
the value of the variable

setVal

void setVal(int[] val)
            throws ContradictionException
set the value of the variable to the set val.

Parameters:
val - the value to be set
Throws:
ContradictionException

addToKernel

boolean addToKernel(int x,
                    SConstraint cause,
                    boolean forceAwake)
                    throws ContradictionException
Propagation events updating the kernel of a variable (i.e adding a value)

Parameters:
x - a value of the enveloppe domain to be added to the kernel
cause -
forceAwake -
Returns:
a boolean indicating whether this method call added new information or not
Throws:
ContradictionException

addToKernel

@Deprecated
boolean addToKernel(int x,
                               int idx)
                    throws ContradictionException
Deprecated. 

Throws:
ContradictionException

remFromEnveloppe

boolean remFromEnveloppe(int x,
                         SConstraint cause,
                         boolean forceAwake)
                         throws ContradictionException
Propagation events updating the enveloppe of a variable (i.e removing a value)

Parameters:
x - a value of the enveloppe domain to be removed
cause -
forceAwake -
Returns:
a boolean indicating whether this method call added new information or not
Throws:
ContradictionException

remFromEnveloppe

@Deprecated
boolean remFromEnveloppe(int x,
                                    int idx)
                         throws ContradictionException
Deprecated. 

Throws:
ContradictionException

instantiate

boolean instantiate(int[] x,
                    SConstraint cause,
                    boolean forceAwake)
                    throws ContradictionException
Propagation events instantiated a set var to a specific set of values

Parameters:
x - a set of values describing the final instantiated kernel
cause -
forceAwake -
Returns:
a boolean indicating whether this method call added new information or not
Throws:
ContradictionException

instantiate

@Deprecated
boolean instantiate(int[] x,
                               int idx)
                    throws ContradictionException
Deprecated. 

Throws:
ContradictionException


Copyright © 2012. All Rights Reserved.