/home/coin/SVN-release/OS-2.0.0/Couenne/src/expression/operators/exprExp.hpp

Go to the documentation of this file.
00001 /* $Id: exprExp.hpp 154 2009-06-16 18:52:53Z 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. 
00008  * This file is licensed under the Common Public License (CPL)
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) {} //< non-leaf expression, with argument list
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, // 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 log((*vardep)());
00082   }
00083 
00086   virtual bool isCuttable (CouenneProblem *problem, int index) const;
00087 
00089   //virtual enum convexity convexity () 
00090   //{return CONVEX;}
00091 };
00092 
00093 #endif

Generated on Mon Aug 3 03:02:20 2009 by  doxygen 1.4.7