# CouExpr.hpp

Go to the documentation of this file.

    00001 /* $Id: CouExpr.hpp 490 2011-01-14 16:07:12Z pbelotti $
    00002  *
    00003  * Name:    CouExpr.hpp
    00004  * Author:  Pietro Belotti
    00005  * Purpose: Container class for expressions
    00006  *
    00007  * This file is licensed under the Eclipse Public License (EPL)
    00008  */
    00009
    00010 #ifndef CouExpr_hpp
    00011 #define CouExpr_hpp
    00012
    00013 #include "CouenneExpression.hpp"
    00014
    00015 namespace Couenne {
    00016
    00017 class CouExpr {
    00018
    00019 private:
    00020
    00021   expression *expr_;
    00022
    00023 public:
    00024
    00025   CouExpr (expression *e):
    00026     expr_ (e) {}
    00027
    00028   CouExpr (const CouExpr &e) {
    00029     expr_ = e.expr_ -> clone ();
    00030   }
    00031
    00032   CouExpr &operator=(CouExpr &e) {
    00033     expr_ = e.expr_ -> clone ();
    00034     return *this;
    00035   }
    00036
    00037   expression *Expression () const
    00038   {return expr_;}
    00039 };
    00040
    00041
    00042 CouExpr operator+(CouExpr &e1, CouExpr &e2);
    00043 CouExpr &operator/(CouExpr &e1, CouExpr &e2);
    00044 CouExpr &operator%(CouExpr &e1, CouExpr &e2);
    00045 CouExpr &operator-(CouExpr &e1, CouExpr &e2);
    00046 CouExpr &operator*(CouExpr &e1, CouExpr &e2);
    00047 CouExpr &operator^(CouExpr &e1, CouExpr &e2);
    00048
    00049 CouExpr &sin(CouExpr &e);
    00050 CouExpr &cos(CouExpr &e);
    00051 CouExpr &log(CouExpr &e);
    00052 CouExpr &exp(CouExpr &e);
    00053
    00054 CouExpr &operator+(CouNumber &e1, CouExpr &e2);
    00055 CouExpr &operator/(CouNumber &e1, CouExpr &e2);
    00056 CouExpr &operator%(CouNumber &e1, CouExpr &e2);
    00057 CouExpr &operator-(CouNumber &e1, CouExpr &e2);
    00058 CouExpr &operator*(CouNumber &e1, CouExpr &e2);
    00059 CouExpr &operator^(CouNumber &e1, CouExpr &e2);
    00060
    00061 CouExpr &sin(CouNumber &e);
    00062 CouExpr &cos(CouNumber &e);
    00063 CouExpr &log(CouNumber &e);
    00064 CouExpr &exp(CouNumber &e);
    00065
    00066 CouExpr &operator+(CouExpr &e1, CouNumber &e2);
    00067 CouExpr &operator/(CouExpr &e1, CouNumber &e2);
    00068 CouExpr &operator%(CouExpr &e1, CouNumber &e2);
    00069 CouExpr &operator-(CouExpr &e1, CouNumber &e2);
    00070 CouExpr &operator*(CouExpr &e1, CouNumber &e2);
    00071 CouExpr &operator^(CouExpr &e1, CouNumber &e2);
    00072
    00073 }
    00074
    00075 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines