00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef COUENNE_EXPRLOG_HPP
00012 #define COUENNE_EXPRLOG_HPP
00013
00014 #include "CouenneExprInv.hpp"
00015 #include "CouenneExpression.hpp"
00016
00017 namespace Couenne {
00018
00020
00021 class exprLog: public exprUnary {
00022
00023 public:
00024
00026 exprLog (expression *al):
00027 exprUnary (al) {}
00028
00030 expression *clone (Domain *d = NULL) const
00031 {return new exprLog (argument_ -> clone (d));}
00032
00034 inline unary_function F () {return log;}
00035
00037 std::string printOp () const
00038 {return "log";}
00039
00041 CouNumber gradientNorm (const double *x);
00042
00044 expression *differentiate (int index);
00045
00047 void getBounds (expression *&, expression *&);
00048
00050 void getBounds (CouNumber &lb, CouNumber &ub);
00051
00053 void generateCuts (expression *w,
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 ()
00061 {return COU_EXPRLOG;}
00062
00064 bool impliedBound (int, CouNumber *, CouNumber *, t_chg_bounds *, enum auxSign = expression::AUX_EQ);
00065
00068 virtual CouNumber selectBranch (const CouenneObject *obj,
00069 const OsiBranchingInformation *info,
00070 expression * &var,
00071 double * &brpts,
00072 double * &brDist,
00073
00074 int &way);
00075
00077 virtual bool isBijective() const {return true;}
00078
00080 virtual CouNumber inverse(expression *vardep) const
00081 {
00082 return exp((*vardep)());
00083 }
00084
00087 virtual bool isCuttable (CouenneProblem *problem, int index) const;
00088 };
00089
00090 }
00091
00092 #endif