| 
 | |||||||||
| 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[] | cIndicesIndices associated with this contraint in each variable. | 
| protected  RealVar[] | varsThe 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 constraint| Method Detail | 
|---|
public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
clone in interface Constraintclone in class AbstractConstraintjava.lang.CloneNotSupportedException - thrown if this constraint cannot be
 cloned.
public void setConstraintIndex(int i,
                               int idx)
setConstraintIndex in interface ConstraintsetConstraintIndex in interface RealListeneri - the variable indexidx - this constraint index according to the variable ipublic int getConstraintIdx(int i)
getConstraintIdx in interface ConstraintgetConstraintIdx in interface RealListeneri - the variable index
public int getNbVars()
getNbVars in interface Constraintpublic Var getVar(int i)
getVar in interface Constrainti - the requested index
public void setVar(int i,
                   Var v)
setVar in interface Constrainti - the index to setv - the variablepublic RealVar getRealVar(int i)
getRealVar in interface RealConstrainti - the requested index
public int getRealVarNb()
getRealVarNb in interface RealConstraint
public int assignIndices(AbstractCompositeConstraint root,
                         int i,
                         boolean dynamicAddition)
assignIndices in interface Propagatorroot - 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 Propagatorpublic int getSelfIndex()
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||