|
|||||||||
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.AbstractLargeRealConstraint
public abstract class AbstractLargeRealConstraint
A real constraint with an undetermined number of variables.
Field Summary | |
---|---|
protected int[] |
cIndices
Indices associated with this contraint in each variable. |
protected RealVar[] |
vars
The variables involved in the constraint. |
Fields inherited from class choco.AbstractConstraint |
---|
active, constAwakeEvent, hook, priority |
Fields inherited from class choco.AbstractEntity |
---|
problem |
Constructor Summary | |
---|---|
AbstractLargeRealConstraint(RealVar[] vars)
Builds such a constraint with the specified variables. |
Method Summary | |
---|---|
int |
assignIndices(AbstractCompositeConstraint root,
int i,
boolean dynamicAddition)
Assigns indices according to a variable for boolean meta-constraints. |
java.lang.Object |
clone()
Makes a copy of this constraint. |
int |
getConstraintIdx(int i)
Returns this constraint index according to the variable i. |
int |
getNbVars()
Returns the number of variables. |
RealVar |
getRealVar(int i)
Returns the variable with the index i. |
int |
getRealVarNb()
Returns the number of real variables. |
int |
getSelfIndex()
Returns the index associated with this constraint by the problem. |
Var |
getVar(int i)
Returns the variable with the index i. |
boolean |
isCompletelyInstantiated()
Checks if the constrait is completely instantiated. |
void |
setConstraintIndex(int i,
int idx)
Sets this constraint index according to the variable i. |
void |
setVar(int i,
Var v)
Sets a variable involved by the constraint. |
Methods inherited from class choco.AbstractConstraint |
---|
addListener, awake, awakeOnVar, 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[] vars
protected int[] cIndices
Constructor Detail |
---|
public AbstractLargeRealConstraint(RealVar[] vars)
vars
- the variables involved by this constraintMethod Detail |
---|
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in interface Constraint
clone
in class AbstractConstraint
java.lang.CloneNotSupportedException
- thrown if this constraint cannot be
cloned.public void setConstraintIndex(int i, int idx)
setConstraintIndex
in interface Constraint
setConstraintIndex
in interface RealListener
i
- the variable indexidx
- this constraint index according to the variable ipublic int getConstraintIdx(int i)
getConstraintIdx
in interface Constraint
getConstraintIdx
in interface RealListener
i
- the variable index
public int getNbVars()
getNbVars
in interface Constraint
public Var getVar(int i)
getVar
in interface Constraint
i
- the requested index
public void setVar(int i, Var v)
setVar
in interface Constraint
i
- the index to setv
- the variablepublic RealVar getRealVar(int i)
getRealVar
in interface RealConstraint
i
- the requested index
public int getRealVarNb()
getRealVarNb
in interface RealConstraint
public int assignIndices(AbstractCompositeConstraint root, int i, boolean dynamicAddition)
assignIndices
in interface Propagator
root
- the over all constraint containing this onei
- the beginning index for the global boolean constraintdynamicAddition
- states if the addition is definitive or not
public boolean isCompletelyInstantiated()
isCompletelyInstantiated
in interface Propagator
public int getSelfIndex()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |