|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.AbstractEntity
choco.AbstractConstraint
choco.real.constraint.AbstractUnRealConstraint
public abstract class AbstractUnRealConstraint
Field Summary | |
---|---|
protected int |
cIdx0
The index of this constraints w.r.t. the variable v0. |
protected RealVar |
v0
The unique variable of the constraint. |
Fields inherited from class choco.AbstractConstraint |
---|
active, constAwakeEvent, hook, priority |
Fields inherited from class choco.AbstractEntity |
---|
problem |
Constructor Summary | |
---|---|
AbstractUnRealConstraint()
|
Method Summary | |
---|---|
int |
assignIndices(AbstractCompositeConstraint root,
int i,
boolean dynamicAddition)
performs the global numbering (wrt root) of the variables contained in the subtree this, starting from i |
int |
getConstraintIdx(int idx)
Returns the index of this constraints in all constraints involving v0. |
int |
getNbVars()
Returns the number of variables. |
RealVar |
getRealVar(int i)
Returns the only one variable if i=0, null otherwise. |
int |
getRealVarNb()
Returns the number of real variables. |
Var |
getVar(int i)
Returns the only one variable v0 if i==0, null otherwise. |
boolean |
isCompletelyInstantiated()
Checks if the only one variable of the constraint is instantiated. |
void |
setConstraintIndex(int i,
int idx)
Let v0 be the i-th var of c, records that c is the idx-th constraint involving v0. |
void |
setVar(int i,
Var v)
Network management: Setting (or overwriting) the ith variable of a constraint. |
Methods inherited from class choco.AbstractConstraint |
---|
addListener, awake, awakeOnVar, clone, connectVar, constAwake, delete, fail, getEvent, getPlugIn, getPriority, getProblem, getVarIdxInOpposite, isActive, isEntailed, isEquivalentTo, opposite, setActive, setEntailed, setPassive, setPlugIn, substituteVar |
Methods inherited from class choco.AbstractEntity |
---|
pretty |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface choco.Propagator |
---|
awake, awakeOnVar, constAwake, delete, getEvent, getPlugIn, getPriority, isConsistent, isEntailed, propagate |
Methods inherited from interface choco.prop.VarEventListener |
---|
addListener, isActive, setActive, setPassive |
Methods inherited from interface choco.real.constraint.RealListener |
---|
awakeOnInf, awakeOnSup |
Methods inherited from interface choco.prop.VarEventListener |
---|
addListener, isActive, setActive, setPassive |
Field Detail |
---|
protected RealVar v0
protected int cIdx0
Constructor Detail |
---|
public AbstractUnRealConstraint()
Method Detail |
---|
public RealVar getRealVar(int i)
getRealVar
in interface RealConstraint
public int getRealVarNb()
getRealVarNb
in interface RealConstraint
public void setConstraintIndex(int i, int idx)
setConstraintIndex
in interface Constraint
setConstraintIndex
in interface RealListener
i
- index of the variable in the constraintidx
- index of the constraint in the among all listeners linked to that variablepublic int getConstraintIdx(int idx)
getConstraintIdx
in interface Constraint
getConstraintIdx
in interface RealListener
idx
- index of the variable in the constraintpublic int getNbVars()
getNbVars
in interface Constraint
public Var getVar(int i)
getVar
in interface Constraint
i
- index of the variable in the constraintpublic void setVar(int i, Var v)
Constraint
setVar
in interface Constraint
i
- index of the variable in the constraintv
- the variable (may be an IntDomainVar, SetVar, RealVar, ...public boolean isCompletelyInstantiated()
isCompletelyInstantiated
in interface Propagator
public int assignIndices(AbstractCompositeConstraint root, int i, boolean dynamicAddition)
Propagator
assignIndices
in interface Propagator
root
- the overall root constraint, for which the variables are numberedi
- the index that will assigned to the first variable in the subtree this (originally 0)dynamicAddition
- whether the addition is undone automatically on backtracking
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |