# CouenneTypes.hpp

Go to the documentation of this file.

    00001 /* $Id: CouenneTypes.hpp 940 2013-01-13 19:49:02Z pbelotti $
    00002  *
    00003  * Name:    CouenneTypes.hpp
    00004  * Author:  Pietro Belotti
    00005  * Purpose: define number types used throughout the code
    00006  *
    00007  * (C) Carnegie-Mellon University, 2006-07
    00008  * This file is licensed under the Eclipse Public License (EPL)
    00009  */
    00010
    00011 #ifndef COUENNE_TYPES_H
    00012 #define COUENNE_TYPES_H
    00013
    00015 #include "CoinPragma.hpp"
    00016
    00017 namespace Couenne {
    00018
    00020 enum nodeType       {CONST=0, VAR, UNARY, N_ARY, COPY, AUX, EMPTY};
    00021
    00023 enum linearity_type {ZERO=0, CONSTANT, LINEAR, QUADRATIC, NONLINEAR};
    00024
    00030 enum pos            {PRE=0, POST, INSIDE, NONE};
    00031
    00033 enum con_sign       {COUENNE_EQ, COUENNE_LE, COUENNE_GE, COUENNE_RNG};
    00034
    00037 enum conv_type      {CURRENT_ONLY, UNIFORM_GRID, AROUND_CURPOINT};
    00038
    00040 enum expr_type {/*COU_EXPRAUX,  COU_EXPRCLONE, COU_EXPRCOPY, */
    00041                 COU_EXPRESSION, /***** variables, constants **************/
    00042                 COU_EXPRCONST, COU_EXPRVAR, COU_EXPRLBOUND, COU_EXPRUBOUND,
    00043                 /*COU_EXPRIVAR, */
    00044                 COU_EXPROP,     /***** n-ary operators *******************/
    00045                 COU_EXPRSUB,  COU_EXPRSUM, COU_EXPRGROUP, COU_EXPRQUAD,
    00046                 COU_EXPRMIN,  COU_EXPRMUL, COU_EXPRTRILINEAR, COU_EXPRPOW, COU_EXPRSIGNPOW, COU_EXPRMAX, COU_EXPRDIV,
    00047                 /*COU_EXPRBDIV,  COU_EXPRBMUL,*/
    00048                 COU_EXPRUNARY,  /***** unary operators *******************/
    00049                 COU_EXPRCOS,  COU_EXPRABS,
    00050                 COU_EXPREXP,  COU_EXPRINV,   COU_EXPRLOG,
    00051                 COU_EXPROPP,   COU_EXPRSIN, COU_EXPRFLOOR,
    00052                 COU_EXPRCEIL, MAX_COU_EXPR_CODE
    00053                 };
    00054
    00056 enum convexity {UNSET, NONCONVEX, CONVEX, CONCAVE, AFFINE, CONV_LINEAR, CONV_CONSTANT, CONV_ZERO};
    00057
    00059 enum monotonicity {MON_UNSET, NONMONOTONE, NDECREAS, NINCREAS, INCLIN, DECLIN, MON_CONST, MON_ZERO};
    00060
    00062 enum dig_type {ORIG_ONLY, STOP_AT_AUX, TAG_AND_RECURSIVE, COUNT};
    00063
    00066 class t_chg_bounds
    00067 {
    00068 public:
    00069   enum ChangeStatus {
    00070     UNCHANGED=0,
    00071     CHANGED=1,
    00072     EXACT=2
    00073   };
    00074
    00075   t_chg_bounds():
    00076     lower_(UNCHANGED),
    00077     upper_(UNCHANGED)
    00078   {}
    00079   t_chg_bounds(const t_chg_bounds& src):
    00080     lower_(src.lower_),
    00081     upper_(src.upper_)
    00082   {}
    00083   inline const char& lower() const {return lower_;}
    00084   inline const char& upper() const {return upper_;}
    00085   inline void setLower(ChangeStatus lower) {lower_ = lower;}
    00086   inline void setUpper(ChangeStatus upper) {upper_ = upper;}
    00087   inline void setLowerBits(char lower) {lower_ |= lower;}
    00088   inline void setUpperBits(char upper) {upper_ |= upper;}
    00089   t_chg_bounds operator=(const t_chg_bounds&src) {
    00090     lower_ = src.lower_;
    00091     upper_ = src.upper_;
    00092     return *this;
    00093   }
    00094 private:
    00095   char lower_;
    00096   char upper_;
    00097 };
    00098
    00100 typedef double CouNumber;
    00101
    00103 typedef CouNumber (*unary_function) (CouNumber);
    00104
    00105 }
    00106
    00107 #endif

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines