choco.palm.real.exp
Class AbstractPalmRealUnTerm

java.lang.Object
  extended by choco.AbstractEntity
      extended by choco.real.exp.AbstractRealCompoundTerm
          extended by choco.real.exp.AbstractRealUnTerm
              extended by choco.palm.real.exp.AbstractPalmRealUnTerm
All Implemented Interfaces:
Entity, PalmRealInterval, RealExp, RealInterval

public abstract class AbstractPalmRealUnTerm
extends AbstractRealUnTerm
implements PalmRealInterval

Abstract implementation of a real binary term (like addition for instance).


Field Summary
protected  Explanation explanationOnInf
          PalmExplanation of the last lower bound affectation.
protected  Explanation explanationOnSup
          PalmExplanation of the last upper bound affectation.
 
Fields inherited from class choco.real.exp.AbstractRealUnTerm
exp1
 
Fields inherited from class choco.real.exp.AbstractRealCompoundTerm
inf, sup
 
Fields inherited from class choco.AbstractEntity
hook, problem
 
Fields inherited from interface choco.palm.real.PalmRealInterval
DOM, INF, SUP
 
Constructor Summary
AbstractPalmRealUnTerm(AbstractProblem pb, RealExp exp1)
          Creates an abstract binary term with the two sub-expressions.
 
Method Summary
 void intersect(RealInterval interval, int index)
          Updates the interval such that this interval is included in the interval parameter.
 void self_explain(int select, ConstraintCollection e)
          Explains the state of this expression (lower/upper bounds or all domain)
 
Methods inherited from class choco.real.exp.AbstractRealUnTerm
collectVars, isolate, subExps
 
Methods inherited from class choco.real.exp.AbstractRealCompoundTerm
getInf, getSup, intersect, toString
 
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.palm.real.PalmRealInterval
self_explain
 
Methods inherited from interface choco.real.RealInterval
getInf, getSup, intersect
 
Methods inherited from interface choco.real.RealExp
project, tighten
 

Field Detail

explanationOnInf

protected Explanation explanationOnInf
PalmExplanation of the last lower bound affectation.


explanationOnSup

protected Explanation explanationOnSup
PalmExplanation of the last upper bound affectation.

Constructor Detail

AbstractPalmRealUnTerm

public AbstractPalmRealUnTerm(AbstractProblem pb,
                              RealExp exp1)
Creates an abstract binary term with the two sub-expressions.

Method Detail

intersect

public void intersect(RealInterval interval,
                      int index)
               throws ContradictionException
Updates the interval such that this interval is included in the interval parameter.

Specified by:
intersect in interface RealInterval
Overrides:
intersect in class AbstractRealCompoundTerm
Parameters:
interval - The interval this expression should be included in.
index - The index of the constraint responsible of this reduction.
Throws:
ContradictionException

self_explain

public void self_explain(int select,
                         ConstraintCollection e)
Explains the state of this expression (lower/upper bounds or all domain)

Parameters:
select - Specifies which part of the domain should be explained.
e - Specifies the explanation in which these explaining constraints should be added.