00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef COUENNE_EXPREXP_HPP
00012 #define COUENNE_EXPREXP_HPP
00013
00014 #include <math.h>
00015
00016 #include "exprUnary.hpp"
00017
00019
00020 class exprExp: public exprUnary {
00021
00022 public:
00023
00025 exprExp (expression *al):
00026 exprUnary (al) {}
00027
00029 expression *clone (Domain *d = NULL) const
00030 {return new exprExp (argument_ -> clone (d));}
00031
00033 inline unary_function F () {return exp;}
00034
00036 std::string printOp () const
00037 {return "exp";}
00038
00040 inline CouNumber gradientNorm (const double *x)
00041 {return (argument_ -> Index () < 0) ? 0. : exp (x [argument_ -> Index ()]);}
00042
00044 expression *differentiate (int index);
00045
00047 void getBounds (expression *&, expression *&);
00048
00050 virtual void getBounds (CouNumber &lb, CouNumber&ub);
00051
00053 void generateCuts (expression *w, const OsiSolverInterface &si,
00054 OsiCuts &cs, const CouenneCutGenerator *cg,
00055 t_chg_bounds * = NULL, int = -1,
00056 CouNumber = -COUENNE_INFINITY,
00057 CouNumber = COUENNE_INFINITY);
00058
00060 virtual enum expr_type code () {return COU_EXPREXP;}
00061
00063 bool impliedBound (int, CouNumber *, CouNumber *, t_chg_bounds *);
00064
00067 virtual CouNumber selectBranch (const CouenneObject *obj,
00068 const OsiBranchingInformation *info,
00069 expression * &var,
00070 double * &brpts,
00071 double * &brDist,
00072
00073 int &way);
00074
00076 virtual bool isBijective() const {return true;}
00077
00079 virtual CouNumber inverse(expression *vardep) const
00080 {
00081 return log((*vardep)());
00082 }
00083
00086 virtual bool isCuttable (CouenneProblem *problem, int index) const;
00087
00089
00090
00091 };
00092
00093 #endif