|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.AbstractEntity
choco.AbstractVar
choco.real.var.RealVarImpl
public class RealVarImpl
An implementation of real variables using RealDomain domains.
Field Summary | |
---|---|
protected RealDomain |
domain
|
Fields inherited from class choco.AbstractVar |
---|
constraints, event, indices, name |
Fields inherited from class choco.AbstractEntity |
---|
hook, problem |
Constructor Summary | |
---|---|
RealVarImpl(AbstractProblem pb,
java.lang.String name,
double a,
double b)
|
Method Summary | |
---|---|
java.util.Set |
collectVars(java.util.Set s)
Collects recursively all the variable this expression depends on. |
void |
fail()
a constraint may fail during propagation, raising a contradiction |
RealDomain |
getDomain()
|
double |
getInf()
|
double |
getSup()
|
RealInterval |
getValue()
|
void |
intersect(RealInterval interval)
Modifies the bounds for intersecting with the specified interval. |
void |
intersect(RealInterval interval,
int index)
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,
java.util.List wx,
java.util.List wox)
Isolates sub terms depending or not on a variable x. |
void |
project()
Projects computed bounds to the sub expressions. |
void |
silentlyAssign(RealInterval i)
Modifies bounds silently (does not propagate modifications). |
java.util.List |
subExps(java.util.List l)
Computes recursively the sub expressions (avoids to tighten and project recursively). |
void |
tighten()
Computes the narrowest bounds with respect to sub terms. |
java.lang.String |
toString()
Useful for debugging. |
Methods inherited from class choco.AbstractVar |
---|
addConstraint, eraseConstraint, getConstraint, getConstraintsIterator, getConstraintVector, getEvent, getIndexVector, getNbConstraints, getVarIndex |
Methods inherited from class choco.AbstractEntity |
---|
getProblem, pretty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface choco.Var |
---|
addConstraint, getConstraint, getConstraintsIterator, getConstraintVector, getEvent, getIndexVector, getNbConstraints, getVarIndex |
Methods inherited from interface choco.Entity |
---|
getProblem, pretty |
Field Detail |
---|
protected RealDomain domain
Constructor Detail |
---|
public RealVarImpl(AbstractProblem pb, java.lang.String name, double a, double b)
Method Detail |
---|
public java.lang.String toString()
AbstractVar
toString
in class AbstractVar
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 void intersect(RealInterval interval, int index) throws ContradictionException
RealInterval
intersect
in interface RealInterval
index
- of the constraint responsible to this withdraw
ContradictionException
public void fail() throws ContradictionException
Var
fail
in interface Var
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 java.util.List subExps(java.util.List l)
RealExp
subExps
in interface RealExp
public java.util.Set collectVars(java.util.Set s)
RealExp
collectVars
in interface RealExp
public boolean isolate(RealVar var, java.util.List wx, java.util.List wox)
RealExp
isolate
in interface RealExp
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |