ibex::ArithConstraint Class Reference
[Constraints]

Arithmetical constraint. More...

#include <IbexConstraint.h>

Inheritance diagram for ibex::ArithConstraint:

ibex::Constraint ibex::Equality ibex::Inequality

List of all members.

Public Member Functions

INTERVAL eval (const Space &space) const
INTERVAL eval_mono1 (const Space &space) const
INTERVAL_MATRIX m_eval (const Space &space) const
INTERVAL eval_pt (const Space &space, const VECTOR &pt) const
virtual bool feasible (const Space &space) const =0
virtual void forward (const Space &space) const
virtual void backward (Space &space) const =0
virtual bool is_equality () const =0
void gradient (const Space &space, INTERVAL_VECTOR &G) const
void gradient (const Space &space) const
INTERVAL derivative (const Space &space, int var) const

Public Attributes

const Exprexpr

Protected Attributes

Evaluator evl


Detailed Description

Arithmetical constraint.

Represents a constraint built with the usual arithmetic operators (+,-,*,/) and elementary functions (exp,sin,log,etc.). Every arithmetical constraint is under the form "f(x) op 0" where "op" is a comparison operator (=,<,<=,>,>=) and some functions (such as ibex::ArithConstraint::eval(const Space&) const) allow to calculate with f.

Example : sin(x+y)^2 = z-1.

Author:
Gilles Chabert
Date:
March 2007

Member Function Documentation

INTERVAL ibex::ArithConstraint::eval ( const Space space  )  const

Every arithmetical constraint is under the form "f(x) op 0" where "op" is a comparison operator (=,<,<=,>,>=). This function "evaluates" f (i.e., return an interval evaluation of the function) on a given space.

Parameters:
space - the space representing current domains of entities.
Precondition:
The expression must return a scalar (not vector nor matrix,
See also:
m_eval(const Space&) const).
Warning:
It is not checked whether the expression is scalar or not.

INTERVAL ibex::ArithConstraint::eval_mono1 ( const Space space  )  const

Evaluate the function f (if this equation is "f(x) op 0") on a given space, using monotonicity.

Parameters:
space - the space representing current domains of entities.
Returns:
- the result of the evaluation.
See also:
eval(const Space&) const

INTERVAL_MATRIX ibex::ArithConstraint::m_eval ( const Space space  )  const

Vector or matrix-variant of eval(const Space&) const.

Parameters:
space - the space representing current domains of entities.
Precondition:
The expression must be a matrix expression.
Warning:
It is not checked whether the expression is scalar or not!.

INTERVAL ibex::ArithConstraint::eval_pt ( const Space space,
const VECTOR &  pt 
) const

Evaluate the vector-valued function f with a point argument pt.

The computation performed is "punctual" only for variables. The arguments that correspond to other entities (symbolic constants, etc.) have their domain in the space given in argument, as usual.

Parameters:
space - the space representing current domains of entities.
pt - the point argument.
See also:
eval(const Space&) const.

virtual bool ibex::ArithConstraint::feasible ( const Space space  )  const [pure virtual]

Check if the equation can be satisfied within the space using simple interval evaluation.

Returns:
false - if (it is proven that) the constraint is not satisfied,
true - otherwise.

Implemented in ibex::Equality, and ibex::Inequality.

virtual void ibex::ArithConstraint::forward ( const Space space  )  const [inline, virtual]

Forward evaluation.

Implements ibex::Constraint.

virtual void ibex::ArithConstraint::backward ( Space space  )  const [pure virtual]

Backward evaluation.

Implements ibex::Constraint.

Implemented in ibex::Equality, and ibex::Inequality.

virtual bool ibex::ArithConstraint::is_equality (  )  const [pure virtual]

Return true.

Implements ibex::Constraint.

Implemented in ibex::Equality, and ibex::Inequality.

void ibex::ArithConstraint::gradient ( const Space space,
INTERVAL_VECTOR G 
) const

Compute an interval enclosure of the gradient.

Parameters:
space - the space representing current domains of entities.
G - the vector that will contain the result on return.
Exceptions:
ibex::UnfeasibilityException if the box does not intersect the definition domain of the function.
ibex::NotDifferentiableException if the function is not differentiable.
ibex::UnboundedResultException if the gradient is unbounded. In this case the vector G contains an undefined (partial) result, it should be ignored.

void ibex::ArithConstraint::gradient ( const Space space  )  const [inline]

Compute an interval enclosure of the gradient.

Each partial derivative is stored in the ibex::Entity.deriv field of the corresponding entity in the space.

Parameters:
space - the space representing current domains of entities.
See also:
gradient(const Space&, INTERVAL_VECTOR&) const.

INTERVAL ibex::ArithConstraint::derivative ( const Space space,
int  var 
) const

Compute an interval enclosure of the partial derivative with respect to a variable.

Parameters:
space - the space representing current domains of entities.
var - the variable.
Exceptions:
ibex::UnfeasibilityException if the box does not intersect the definition domain of the function.
ibex::NotDifferentiableException if the function is not differentiable.
ibex::UnboundedResultException if the derivative is unbounded. In this case, the result is undefined.


Member Data Documentation

The expression f (f(x) {<,=,>,etc.} 0 being this constraint)

Evaluator ibex::ArithConstraint::evl [protected]

Evaluator.


The documentation for this class was generated from the following files:

Generated on Sun Jun 27 15:52:00 2010 for IBEX by  doxygen 1.5.5