choco.palm.dbt.integer
Interface PalmIntDomain

All Superinterfaces:
Entity, ExplainedDomain, ExplainedIntDomain, IntDomain
All Known Implementing Classes:
PalmBitSetIntDomain, PalmIntervalIntDomain

public interface PalmIntDomain
extends ExplainedIntDomain

Created by IntelliJ IDEA. User: grochart Date: 7 janv. 2004 Time: 13:50:57 To change this template use Options | File Templates.


Field Summary
static int DOM
           
static int INF
           
static int SUP
           
static int VAL
           
 
Method Summary
 Constraint getDecisionConstraint(int val)
          Returns the decision constraint assigning the domain to the specified value.
 Constraint getNegDecisionConstraint(int val)
          Returns the negated decision constraint.
 boolean removeVal(int value, int idx, Explanation e)
          Removes a value and posts the event.
 void resetExplanationOnInf()
          When a lower bound is restored, it deletes the explanation associated to the value removal.
 void resetExplanationOnSup()
          When an upper bound is restored, it deletes the explanation associated to the value removal.
 void resetExplanationOnVal(int val)
          When a value is restored, it deletes the explanation associated to the value removal.
 void restoreInf(int newValue)
          Restores a lower bound and posts the event.
 void restoreSup(int newValue)
          Restores an upper bound and posts the event.
 void restoreVal(int val)
          Restores a value and posts the event.
 void self_explain(int select, Explanation expl)
          Allows to get an explanation for the domain or a bound of the variable.
 void self_explain(int select, int x, Explanation expl)
          Allows to get an explanation for a value removal from the variable.
 boolean updateInf(int x, int idx, Explanation e)
          Updates the lower bound and posts the event.
 boolean updateSup(int x, int idx, Explanation e)
          Updates the upper bound and posts the event.
 
Methods inherited from interface choco.palm.integer.ExplainedIntDomain
getAllValues
 
Methods inherited from interface choco.palm.ExplainedDomain
getOriginalInf, getOriginalSup
 
Methods inherited from interface choco.integer.var.IntDomain
clearDeltaDomain, contains, freezeDeltaDomain, getDeltaIterator, getInf, getIterator, getNextValue, getPrevValue, getRandomValue, getReleasedDeltaDomain, getSize, getSup, hasNextValue, hasPrevValue, isEnumerated, releaseDeltaDomain, remove, restrict, updateInf, updateSup
 
Methods inherited from interface choco.Entity
getProblem, pretty
 

Field Detail

DOM

static final int DOM
See Also:
Constant Field Values

INF

static final int INF
See Also:
Constant Field Values

SUP

static final int SUP
See Also:
Constant Field Values

VAL

static final int VAL
See Also:
Constant Field Values
Method Detail

resetExplanationOnVal

void resetExplanationOnVal(int val)
When a value is restored, it deletes the explanation associated to the value removal.


resetExplanationOnInf

void resetExplanationOnInf()
When a lower bound is restored, it deletes the explanation associated to the value removal.


resetExplanationOnSup

void resetExplanationOnSup()
When an upper bound is restored, it deletes the explanation associated to the value removal.


self_explain

void self_explain(int select,
                  Explanation expl)
Allows to get an explanation for the domain or a bound of the variable. This explanation is merge to the explanation in parameter.

Specified by:
self_explain in interface ExplainedDomain
Parameters:
select - Should be PalmIntDomain.INF, PalmIntDomain.SUP, or PalmIntDomain.DOM

self_explain

void self_explain(int select,
                  int x,
                  Explanation expl)
Allows to get an explanation for a value removal from the variable. This explanation is merge to the explanation in parameter.

Specified by:
self_explain in interface ExplainedIntDomain
Parameters:
select - Should be PalmIntDomain.VAL

updateSup

boolean updateSup(int x,
                  int idx,
                  Explanation e)
                  throws ContradictionException
Updates the upper bound and posts the event.

Specified by:
updateSup in interface ExplainedIntDomain
Throws:
ContradictionException

updateInf

boolean updateInf(int x,
                  int idx,
                  Explanation e)
                  throws ContradictionException
Updates the lower bound and posts the event.

Specified by:
updateInf in interface ExplainedIntDomain
Throws:
ContradictionException

removeVal

boolean removeVal(int value,
                  int idx,
                  Explanation e)
                  throws ContradictionException
Removes a value and posts the event.

Specified by:
removeVal in interface ExplainedIntDomain
Throws:
ContradictionException

restoreInf

void restoreInf(int newValue)
Restores a lower bound and posts the event. Not supported for such a domain.


restoreSup

void restoreSup(int newValue)
Restores an upper bound and posts the event. Not supported for such a domain.


restoreVal

void restoreVal(int val)
Restores a value and posts the event.


getDecisionConstraint

Constraint getDecisionConstraint(int val)
Returns the decision constraint assigning the domain to the specified value. The constraint is created if it is not yet created.


getNegDecisionConstraint

Constraint getNegDecisionConstraint(int val)
Returns the negated decision constraint.