choco.real.constraint
Class AbstractBinRealIntConstraint
java.lang.Object
choco.AbstractEntity
choco.AbstractConstraint
choco.real.constraint.AbstractBinRealIntConstraint
- All Implemented Interfaces:
- Constraint, Entity, VarEventListener, Propagator, java.lang.Cloneable, java.util.EventListener
- Direct Known Subclasses:
- MixedCstElt, MixedEqXY
public abstract class AbstractBinRealIntConstraint
- extends AbstractConstraint
Created by IntelliJ IDEA.
User: FLABURTHE
Date: 19 août 2005
Time: 10:35:17
To change this template use File | Settings | File Templates.
Method Summary |
java.lang.Object |
clone()
returns a copy of the constraint. |
int |
getConstraintIdx(int idx)
Network management:
Among all listeners linked to the idx-th variable of c,
find the index of constraint c. |
IntDomainVar |
getIntVar(int i)
|
int |
getIntVarNb()
|
int |
getNbVars()
Network management:
Get the number of variables involved in the constraint. |
RealVar |
getRealVar(int i)
|
int |
getRealVarNb()
|
Var |
getVar(int i)
Network management:
Accessing the ith variable of a constraint. |
boolean |
isCompletelyInstantiated()
Utility:
Testing if all variables involved in the constraint are instantiated. |
void |
setConstraintIndex(int i,
int idx)
Network management:
Storing that among all listeners linked to the i-th variable of c,
this (the current constraint) is found at index idx. |
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, connectVar, constAwake, delete, fail, getEvent, getPlugIn, getPriority, getProblem, getVarIdxInOpposite, isActive, isEntailed, isEquivalentTo, opposite, setActive, setEntailed, setPassive, setPlugIn, substituteVar |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
v0
protected RealVar v0
cIdx0
protected int cIdx0
v1
protected IntDomainVar v1
cIdx1
protected int cIdx1
AbstractBinRealIntConstraint
public AbstractBinRealIntConstraint(RealVar v0,
IntDomainVar v1)
clone
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
- Description copied from interface:
Constraint
- returns a copy of the constraint. This copy is a new object, may be a recursive copy in case
of composite constraints. The original and the copy share the same variables & plugins
- Specified by:
clone
in interface Constraint
- Overrides:
clone
in class AbstractConstraint
- Returns:
-
- Throws:
java.lang.CloneNotSupportedException
getRealVar
public RealVar getRealVar(int i)
getRealVarNb
public int getRealVarNb()
getIntVar
public IntDomainVar getIntVar(int i)
getIntVarNb
public int getIntVarNb()
getNbVars
public int getNbVars()
- Description copied from interface:
Constraint
- Network management:
Get the number of variables involved in the constraint.
getVar
public Var getVar(int i)
- Description copied from interface:
Constraint
- Network management:
Accessing the ith variable of a constraint.
- Parameters:
i
- index of the variable in the constraint
setVar
public void setVar(int i,
Var v)
- Description copied from interface:
Constraint
- Network management:
Setting (or overwriting) the ith variable of a constraint.
- Parameters:
i
- index of the variable in the constraintv
- the variable (may be an IntDomainVar, SetVar, RealVar, ...
setConstraintIndex
public void setConstraintIndex(int i,
int idx)
- Description copied from interface:
Constraint
- Network management:
Storing that among all listeners linked to the i-th variable of c,
this (the current constraint) is found at index idx.
- Parameters:
i
- index of the variable in the constraintidx
- index of the constraint in the among all listeners linked to that variable
getConstraintIdx
public int getConstraintIdx(int idx)
- Description copied from interface:
Constraint
- Network management:
Among all listeners linked to the idx-th variable of c,
find the index of constraint c.
- Parameters:
idx
- index of the variable in the constraint
isCompletelyInstantiated
public boolean isCompletelyInstantiated()
- Description copied from interface:
Propagator
- Utility:
Testing if all variables involved in the constraint are instantiated.