|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.solver.variables.real.RealIntervalConstant
public class RealIntervalConstant
A constant real interval.
Field Summary | |
---|---|
protected double |
inf
|
protected double |
sup
|
Fields inherited from interface choco.kernel.solver.variables.real.RealVar |
---|
BOUNDS |
Fields inherited from interface choco.kernel.solver.variables.Var |
---|
LOGGER |
Constructor Summary | |
---|---|
RealIntervalConstant(double inf,
double sup)
|
|
RealIntervalConstant(RealInterval interval)
|
Method Summary | |
---|---|
int |
addConstraint(SConstraint c,
int varIdx,
boolean dynamicAddition)
Adds a new listener for the variable, that is a constraint which should be informed as soon as the variable domain is modified. |
void |
addExtension(int extensionNumber)
Adds a new extension. |
Set<RealVar> |
collectVars(Set<RealVar> s)
Collects recursively all the variable this expression depends on. |
SConstraint |
getConstraint(int i)
Returns the i th constraint. |
DisposableIterator<SConstraint> |
getConstraintsIterator()
This methods should be used if one want to access the different constraints currently posted on this variable. |
PartiallyStoredVector<SConstraint> |
getConstraintVector()
access the data structure storing constraints involving a given variable |
RealDomain |
getDomain()
|
VarEvent |
getEvent()
returns the object used by the propagation engine to model a propagation event associated to the variable (an update to its domain) |
Extension |
getExtension(int extensionNumber)
Returns the queried extension |
long |
getIndex()
Unique index (Different from hashCode, can change from one execution to another one) |
PartiallyStoredIntVector |
getIndexVector()
access the data structure storing indices associated to constraints involving a given variable |
double |
getInf()
|
String |
getName()
|
int |
getNbConstraints()
Returns the number of listeners involving the variable. |
int |
getPriority()
Return the priority of this according to the related constraints (minimum over all constraints priority) |
Solver |
getSolver()
Retrieves the solver of the entity |
double |
getSup()
|
RealInterval |
getValue()
|
int |
getVarIndex(int constraintIndex)
returns the index of the variable in it i-th constraint |
int |
hashCode()
|
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 |
setSolver(Solver solver)
|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final double inf
protected final double sup
Constructor Detail |
---|
public RealIntervalConstant(RealInterval interval)
public RealIntervalConstant(double inf, double sup)
Method Detail |
---|
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public long getIndex()
getIndex
in interface IIndex
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 tighten()
RealExp
tighten
in interface RealExp
public void project()
RealExp
project
in interface RealExp
public String pretty()
IPretty
pretty
in interface IPretty
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
public Solver getSolver()
public void setSolver(Solver solver)
public int getNbConstraints()
getNbConstraints
in interface Var
public SConstraint getConstraint(int i)
i
th constraint. i
should be more than or equal to 0, and less or equal to
the number of constraint minus 1.
getConstraint
in interface Var
i
- number of constraint to be returned
public int getVarIndex(int constraintIndex)
getVarIndex
in interface Var
constraintIndex
- the index of the constraint (among all constraints linked to the variable)
public PartiallyStoredVector<SConstraint> getConstraintVector()
getConstraintVector
in interface Var
public PartiallyStoredIntVector getIndexVector()
getIndexVector
in interface Var
public boolean isInstantiated()
isInstantiated
in interface Var
public int addConstraint(SConstraint c, int varIdx, boolean dynamicAddition)
addConstraint
in interface Var
c
- the constraint to addvarIdx
- index of the variabledynamicAddition
- dynamical addition or not
public VarEvent getEvent()
getEvent
in interface Var
public DisposableIterator<SConstraint> getConstraintsIterator()
getConstraintsIterator
in interface Var
public int getPriority()
Var
this
according to the related constraints (minimum over all constraints priority)
getPriority
in interface Var
public String getName()
getName
in interface Var
public RealDomain getDomain()
getDomain
in interface RealVar
public void silentlyAssign(RealInterval i)
silentlyAssign
in interface RealVar
i
- public RealInterval getValue()
getValue
in interface RealVar
public Extension getExtension(int extensionNumber)
IExtensionnable
getExtension
in interface IExtensionnable
extensionNumber
- should use the number returned by getAbstractSConstraintExtensionNumber
public void addExtension(int extensionNumber)
IExtensionnable
addExtension
in interface IExtensionnable
extensionNumber
- should use the number returned by getAbstractSConstraintExtensionNumber
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |