CouenneExprSignPow.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef COUENNE_EXPRSIGNPOW_HPP
00012 #define COUENNE_EXPRSIGNPOW_HPP
00013
00014 #include <math.h>
00015
00016 #include "CouenneExprPow.hpp"
00017
00018 namespace Couenne {
00019
00020 class funtriplet;
00021
00024
00025 class exprSignPow: public exprSignPow {
00026
00027 public:
00028
00030 exprSignPow (expression **al, int n = 2):
00031 exprPow (al, n) {}
00032
00034 exprSignPow (expression *arg0, expression *arg1):
00035 exprPow (arg0, arg1) {}
00036
00038 expression *clone (Domain *d = NULL) const
00039 {return new exprSignPow (clonearglist (d), nargs_);}
00040
00042 CouNumber operator () ();
00043
00045 void getBounds (expression *&, expression *&);
00046
00048 void getBounds (CouNumber &lb, CouNumber &ub);
00049
00052 exprAux *standardize (CouenneProblem *p, bool addAux = true);
00053
00055 void generateCuts (expression *w,
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 ()
00063 {return COU_EXPRSIGNPOW;}
00064
00066 bool impliedBound (int, CouNumber *, CouNumber *, t_chg_bounds *, enum auxSign = expression::AUX_EQ);
00067
00070 virtual CouNumber selectBranch (const CouenneObject *obj,
00071 const OsiBranchingInformation *info,
00072 expression * &var,
00073 double * &brpts,
00074 double * &brDist,
00075
00076 int &way);
00077
00080 virtual bool isCuttable (CouenneProblem *problem, int index) const;
00081 };
00082
00083
00085 inline CouNumber exprSignPow::operator () () {
00086
00087 return (safe_pow ((**arglist_) (), (*(arglist_ [1])) ()));
00088 }
00089 }
00090
00091 #endif