|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.solver.variables.AbstractVar
choco.cp.solver.variables.real.RealVarImpl<C>
public final class RealVarImpl<C extends AbstractSConstraint & RealPropagator>
An implementation of real variables using RealDomain domains.
Field Summary | |
---|---|
protected RealDomain |
domain
|
Fields inherited from class choco.kernel.solver.variables.AbstractVar |
---|
constraints, event, extensions, name, propagationEngine |
Fields inherited from interface choco.kernel.solver.variables.real.RealVar |
---|
BOUNDS |
Fields inherited from interface choco.kernel.solver.variables.Var |
---|
LOGGER |
Constructor Summary | |
---|---|
RealVarImpl(Solver solver,
String name,
double a,
double b,
int domaintype)
|
Method Summary | |
---|---|
Set<RealVar> |
collectVars(Set<RealVar> s)
Collects recursively all the variable this expression depends on. |
DisposableIterator<Couple<C>> |
getActiveConstraints(C cstrCause)
|
RealDomain |
getDomain()
|
double |
getInf()
|
double |
getSup()
|
RealInterval |
getValue()
|
void |
intersect(RealInterval interval)
Modifies the bounds for intersecting with the specified interval. |
boolean |
isInstantiated()
Public user API: Domains : testing whether a variable is instantiated or not. |
boolean |
isolate(RealVar var,
List<RealExp> wx,
List<RealExp> wox)
Isolates sub terms depending or not on a variable x. |
String |
pretty()
pretty printing of the object. |
void |
project()
Projects computed bounds to the sub expressions. |
void |
silentlyAssign(RealInterval i)
Modifies bounds silently (does not propagate modifications). |
List<RealExp> |
subExps(List<RealExp> l)
Computes recursively the sub expressions (avoids to tighten and project recursively). |
void |
tighten()
Computes the narrowest bounds with respect to sub terms. |
String |
toString()
Useful for debugging. |
Methods inherited from class choco.kernel.solver.variables.AbstractVar |
---|
addConstraint, addExtension, eraseConstraint, getAbstractVarExtensionNumber, getConstraint, getConstraintsIterator, getConstraintVector, getEvent, getExtension, getIndex, getIndexVector, getName, getNbConstraints, getPriority, getVarIndex, hashCode |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface choco.kernel.solver.variables.Var |
---|
addConstraint, getConstraint, getConstraintsIterator, getConstraintVector, getEvent, getIndexVector, getName, getNbConstraints, getPriority, getVarIndex |
Methods inherited from interface choco.kernel.common.IIndex |
---|
getIndex |
Methods inherited from interface choco.IExtensionnable |
---|
addExtension, getExtension |
Field Detail |
---|
protected RealDomain domain
Constructor Detail |
---|
public RealVarImpl(Solver solver, String name, double a, double b, int domaintype)
Method Detail |
---|
public final DisposableIterator<Couple<C>> getActiveConstraints(C cstrCause)
public String toString()
AbstractVar
toString
in class AbstractVar
public String pretty()
IPretty
pretty
in interface IPretty
public RealInterval getValue()
getValue
in interface RealVar
public RealDomain getDomain()
getDomain
in interface RealVar
public void silentlyAssign(RealInterval i)
RealVar
silentlyAssign
in interface RealVar
public double getInf()
getInf
in interface RealInterval
public double getSup()
getSup
in interface RealInterval
public void intersect(RealInterval interval) throws ContradictionException
RealInterval
intersect
in interface RealInterval
ContradictionException
public boolean isInstantiated()
Var
isInstantiated
in interface Var
public void tighten()
RealExp
tighten
in interface RealExp
public void project()
RealExp
project
in interface RealExp
public List<RealExp> subExps(List<RealExp> l)
RealExp
subExps
in interface RealExp
public Set<RealVar> collectVars(Set<RealVar> s)
RealExp
collectVars
in interface RealExp
public boolean isolate(RealVar var, List<RealExp> wx, List<RealExp> wox)
RealExp
isolate
in interface RealExp
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |