CouenneExprCeil.hpp

Go to the documentation of this file.
00001 /* $Id: CouenneExprCeil.hpp 720 2011-06-27 13:31:26Z pbelotti $
00002  *
00003  * Name:    exprCeil.hpp
00004  * Author:  Pietro Belotti
00005  * Purpose: definition of ceiling 
00006  *
00007  * (C) Pietro Belotti, 2011.
00008  * This file is licensed under the Eclipse Public License (EPL)
00009  */
00010 
00011 #ifndef COUENNE_EXPRCEIL_HPP
00012 #define COUENNE_EXPRCEIL_HPP
00013 
00014 #include "CouenneExpression.hpp"
00015 
00016 namespace Couenne {
00017 
00019 
00020 class exprCeil: public exprUnary {
00021 
00022  public:
00023 
00025   exprCeil (expression *arg):
00026     exprUnary (arg) {}
00027 
00029   expression *clone (Domain *d = NULL) const
00030   {return new exprCeil (argument_ -> clone (d));}
00031 
00033   inline unary_function F () 
00034   {return ceil;}
00035 
00037   std::string printOp () const
00038   {return "ceil";}
00039 
00041   inline CouNumber gradientNorm (const double *x) {
00042     return (argument_ -> Index () < 0) ? 
00043       0. : fabs (x [argument_ -> Index ()]);
00044   }
00045 
00047   expression *differentiate (int index); 
00048 
00050   void getBounds (expression *&, expression *&);
00051 
00053   void getBounds (CouNumber &lb, CouNumber &ub);
00054 
00056   void generateCuts (expression *w, //const OsiSolverInterface &si, 
00057                      OsiCuts &cs, const CouenneCutGenerator *cg, 
00058                      t_chg_bounds * = NULL, int = -1, 
00059                      CouNumber = -COUENNE_INFINITY, 
00060                      CouNumber =  COUENNE_INFINITY);
00061 
00063   virtual enum expr_type code ()
00064   {return COU_EXPRCEIL;}
00065 
00067   bool impliedBound (int index, CouNumber *l, CouNumber *u, t_chg_bounds *chg, enum auxSign = expression::AUX_EQ) {
00068 
00069     bool impl = true;
00070     return impl;
00071   }
00072 
00075   virtual CouNumber selectBranch (const CouenneObject *obj, 
00076                                   const OsiBranchingInformation *info,
00077                                   expression * &var, 
00078                                   double * &brpts, 
00079                                   double * &brDist, // distance of current LP
00080                                                     // point to new convexifications
00081                                   int &way)
00082   {return 0.;}
00083 
00085   virtual void closestFeasible (expression *varind, expression *vardep,
00086                                 CouNumber& left, CouNumber& right) const;
00087 
00090   virtual bool isCuttable (CouenneProblem *problem, int index) const
00091   {return false;}
00092 
00094   //virtual enum convexity convexity () const;
00095 };
00096 
00097 }
00098 
00099 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 17 Nov 2013 for Couenne by  doxygen 1.6.1