|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchoco.AbstractEntity
choco.integer.var.AbstractIntDomain
choco.integer.var.BitSetIntDomain
choco.palm.dbt.integer.PalmBitSetIntDomain
public class PalmBitSetIntDomain
| Nested Class Summary | |
|---|---|
protected class |
PalmBitSetIntDomain.RepairIntDomainIterator
|
| Nested classes/interfaces inherited from class choco.integer.var.BitSetIntDomain |
|---|
BitSetIntDomain.DeltaIntDomainIterator |
| Nested classes/interfaces inherited from class choco.integer.var.AbstractIntDomain |
|---|
AbstractIntDomain.IntDomainIterator |
| Field Summary | |
|---|---|
Constraint[] |
decisionConstraints
Decision constraints on the variable for branching purpose. |
IRemovalExplanation[] |
explanationOnVal
A list of explanations for value withdrawals. |
Constraint[] |
negDecisionConstraints
Negation of decision constraints on the variable for branching purpose. |
java.util.BitSet |
originalDomain
original domain of the variable |
| Fields inherited from class choco.integer.var.BitSetIntDomain |
|---|
capacity, chain, contents, firstIndexBeingPropagated, firstIndexToBePropagated, offset, random, size |
| Fields inherited from class choco.integer.var.AbstractIntDomain |
|---|
currentInfPropagated, currentSupPropagated, logger, variable |
| Fields inherited from class choco.AbstractEntity |
|---|
hook, problem |
| Fields inherited from interface choco.palm.dbt.integer.PalmIntDomain |
|---|
DOM, INF, SUP, VAL |
| Constructor Summary | |
|---|---|
PalmBitSetIntDomain(IntDomainVarImpl v,
int[] sortedValues)
constructor with a set of discrete values |
|
PalmBitSetIntDomain(IntDomainVarImpl v,
int a,
int b)
|
|
| Method Summary | |
|---|---|
void |
checkRemovalChain()
When restoration are raised, some value removal can be inappropiate. |
boolean |
contains(int val)
Checks if the value is in the domain. |
int[] |
getAllValues()
Returns all the value currently in the domain. |
Constraint |
getDecisionConstraint(int val)
Returns the decision constraint assigning the domain to the specified value. |
Constraint |
getNegDecisionConstraint(int val)
Returns the negated decision constraint. |
int |
getOriginalInf()
Returns the original lower bound. |
int |
getOriginalSup()
Returns the original upper bound. |
IntIterator |
getRepairIterator()
Returns an iterator on restored values. |
void |
releaseRepairDomain()
If restoration handling completes, the chain must reinitlized to null. |
protected boolean |
removeVal(int value,
Explanation e)
|
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 |
resetRemovalChain()
If a contradiction occure during restoration handling, the chain must be reinitialized in the previous state. |
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 class choco.integer.var.BitSetIntDomain |
|---|
clearDeltaDomain, freezeDeltaDomain, getDeltaIterator, getInf, getNextValue, getPrevValue, getRandomValue, getReleasedDeltaDomain, getSize, getSup, hasNextValue, hasPrevValue, isEnumerated, pretty, releaseDeltaDomain, remove, restrict, toString, updateInf, updateSup |
| Methods inherited from class choco.integer.var.AbstractIntDomain |
|---|
_instantiate, _removeVal, _updateInf, _updateSup, getIterator, instantiate, removeInterval, removeVal, updateInf, updateSup |
| Methods inherited from class choco.AbstractEntity |
|---|
getProblem |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface choco.integer.var.IntDomain |
|---|
clearDeltaDomain, 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 |
|---|
public IRemovalExplanation[] explanationOnVal
public Constraint[] decisionConstraints
public Constraint[] negDecisionConstraints
public java.util.BitSet originalDomain
| Constructor Detail |
|---|
public PalmBitSetIntDomain(IntDomainVarImpl v,
int a,
int b)
public PalmBitSetIntDomain(IntDomainVarImpl v,
int[] sortedValues)
v - sortedValues - | Method Detail |
|---|
public int getOriginalInf()
getOriginalInf in interface ExplainedDomainpublic int getOriginalSup()
getOriginalSup in interface ExplainedDomainpublic int[] getAllValues()
getAllValues in interface ExplainedIntDomainpublic Constraint getDecisionConstraint(int val)
getDecisionConstraint in interface PalmIntDomainpublic Constraint getNegDecisionConstraint(int val)
getNegDecisionConstraint in interface PalmIntDomain
public boolean updateInf(int x,
int idx,
Explanation e)
throws ContradictionException
updateInf in interface PalmIntDomainupdateInf in interface ExplainedIntDomainContradictionException
public boolean updateSup(int x,
int idx,
Explanation e)
throws ContradictionException
updateSup in interface PalmIntDomainupdateSup in interface ExplainedIntDomainContradictionException
public boolean removeVal(int value,
int idx,
Explanation e)
throws ContradictionException
removeVal in interface PalmIntDomainremoveVal in interface ExplainedIntDomainContradictionExceptionpublic void restoreInf(int newValue)
restoreInf in interface PalmIntDomainpublic void restoreSup(int newValue)
restoreSup in interface PalmIntDomainpublic void restoreVal(int val)
restoreVal in interface PalmIntDomain
public void self_explain(int select,
Explanation expl)
self_explain in interface PalmIntDomainself_explain in interface ExplainedDomainselect - Should be PalmIntDomain.INF, PalmIntDomain.SUP, or PalmIntDomain.DOM
public void self_explain(int select,
int x,
Explanation expl)
self_explain in interface PalmIntDomainself_explain in interface ExplainedIntDomainselect - Should be PalmIntDomain.VALpublic void resetExplanationOnVal(int val)
resetExplanationOnVal in interface PalmIntDomainpublic void resetExplanationOnInf()
resetExplanationOnInf in interface PalmIntDomainpublic void resetExplanationOnSup()
resetExplanationOnSup in interface PalmIntDomainpublic void checkRemovalChain()
public void resetRemovalChain()
public void releaseRepairDomain()
public IntIterator getRepairIterator()
public boolean contains(int val)
contains in interface IntDomaincontains in class BitSetIntDomainval - The value to check.
protected boolean removeVal(int value,
Explanation e)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||