00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef COUENNE_EXPRLOG_HPP
00012 #define COUENNE_EXPRLOG_HPP
00013
00014 #include "exprInv.hpp"
00015 #include "expression.hpp"
00016
00017
00019
00020 class exprLog: public exprUnary {
00021
00022 public:
00023
00025 exprLog (expression *al):
00026 exprUnary (al) {}
00027
00029 expression *clone (Domain *d = NULL) const
00030 {return new exprLog (argument_ -> clone (d));}
00031
00033 inline unary_function F () {return log;}
00034
00036 std::string printOp () const
00037 {return "log";}
00038
00040 CouNumber gradientNorm (const double *x);
00041
00043 expression *differentiate (int index);
00044
00046 void getBounds (expression *&, expression *&);
00047
00049 void getBounds (CouNumber &lb, CouNumber &ub);
00050
00052 void generateCuts (expression *w,
00053 OsiCuts &cs, const CouenneCutGenerator *cg,
00054 t_chg_bounds * = NULL, int = -1,
00055 CouNumber = -COUENNE_INFINITY,
00056 CouNumber = COUENNE_INFINITY);
00057
00059 virtual enum expr_type code ()
00060 {return COU_EXPRLOG;}
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 exp((*vardep)());
00082 }
00083
00086 virtual bool isCuttable (CouenneProblem *problem, int index) const;
00087 };
00088
00089 #endif