/home/coin/SVN-release/OS-2.0.1/Couenne/src/expression/operators/exprLog.hpp

Go to the documentation of this file.
00001 /* $Id: exprLog.hpp 154 2009-06-16 18:52:53Z pbelotti $ */
00002 /*
00003  * Name:    exprLog.hpp
00004  * Author:  Pietro Belotti
00005  * Purpose: definition of logarithm
00006  *
00007  * (C) Carnegie-Mellon University, 2006. 
00008  * This file is licensed under the Common Public License (CPL)
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) {} // non-leaf expression, with argument list
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, const OsiSolverInterface &si, 
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, // distance of current LP
00072                                                     // point to new convexifications
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

Generated on Thu Oct 8 03:02:56 2009 by  doxygen 1.4.7