CouenneExprExp.hpp

Go to the documentation of this file.
00001 /* $Id: CouenneExprExp.hpp 615 2011-06-08 20:36:24Z pbelotti $
00002  *
00003  * Name:    exprExp.hpp
00004  * Author:  Pietro Belotti
00005  * Purpose: definition of the exponential of a function
00006  *
00007  * (C) Carnegie-Mellon University, 2006-10.
00008  * This file is licensed under the Eclipse Public License (EPL)
00009  */
00010 
00011 #ifndef COUENNE_EXPREXP_HPP
00012 #define COUENNE_EXPREXP_HPP
00013 
00014 #include <math.h>
00015 
00016 #include "CouenneExprUnary.hpp"
00017 
00018 namespace Couenne {
00019 
00021 
00022 class exprExp: public exprUnary {
00023 
00024  public:
00025 
00027   exprExp (expression *al): 
00028     exprUnary (al) {} //< non-leaf expression, with argument list
00029 
00031   expression *clone (Domain *d = NULL) const
00032     {return new exprExp (argument_ -> clone (d));}
00033 
00035   inline unary_function F () {return exp;}
00036 
00038   std::string printOp () const
00039   {return "exp";}
00040 
00042   inline CouNumber gradientNorm (const double *x)
00043   {return (argument_ -> Index () < 0) ? 0. : exp (x [argument_ -> Index ()]);}
00044 
00046   expression *differentiate (int index); 
00047 
00049   void getBounds (expression *&, expression *&);
00050 
00052   virtual void getBounds (CouNumber &lb, CouNumber&ub);
00053 
00055   void generateCuts (expression *w, //const OsiSolverInterface &si, 
00056                      OsiCuts &cs, const CouenneCutGenerator *cg, 
00057                      t_chg_bounds * = NULL, int = -1, 
00058                      CouNumber = -COUENNE_INFINITY, 
00059                      CouNumber =  COUENNE_INFINITY);
00060 
00062   virtual enum expr_type code () {return COU_EXPREXP;}
00063 
00065   bool impliedBound (int, CouNumber *, CouNumber *, t_chg_bounds *, enum auxSign = expression::AUX_EQ);
00066 
00069   virtual CouNumber selectBranch (const CouenneObject *obj, 
00070                                   const OsiBranchingInformation *info,
00071                                   expression * &var, 
00072                                   double * &brpts, 
00073                                   double * &brDist, // distance of current LP
00074                                                     // point to new convexifications
00075                                   int &way);
00076 
00078   virtual bool isBijective() const {return true;}
00079 
00081   virtual CouNumber inverse(expression *vardep) const
00082   {
00083     return log((*vardep)());
00084   }
00085 
00088   virtual bool isCuttable (CouenneProblem *problem, int index) const;
00089 
00091   //virtual enum convexity convexity () 
00092   //{return CONVEX;}
00093 };
00094 
00095 }
00096 
00097 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 6 Apr 2015 for Couenne by  doxygen 1.6.1