Couenne 0.5.8
Loading...
Searching...
No Matches
CouenneTypes.hpp
Go to the documentation of this file.
1/* $Id: CouenneTypes.hpp 940 2013-01-13 19:49:02Z pbelotti $
2 *
3 * Name: CouenneTypes.hpp
4 * Author: Pietro Belotti
5 * Purpose: define number types used throughout the code
6 *
7 * (C) Carnegie-Mellon University, 2006-07
8 * This file is licensed under the Eclipse Public License (EPL)
9 */
10
11#ifndef COUENNE_TYPES_H
12#define COUENNE_TYPES_H
13
15#include "CoinPragma.hpp"
16
17namespace Couenne {
18
21
24
30enum pos {PRE=0, POST, INSIDE, NONE};
31
34
38
40enum expr_type {/*COU_EXPRAUX, COU_EXPRCLONE, COU_EXPRCOPY, */
41 COU_EXPRESSION, /***** variables, constants **************/
43 /*COU_EXPRIVAR, */
44 COU_EXPROP, /***** n-ary operators *******************/
47 /*COU_EXPRBDIV, COU_EXPRBMUL,*/
48 COU_EXPRUNARY, /***** unary operators *******************/
53 };
54
57
60
63
67{
68public:
72 EXACT=2
73 };
74
76 lower_(UNCHANGED),
77 upper_(UNCHANGED)
78 {}
80 lower_(src.lower_),
81 upper_(src.upper_)
82 {}
83 inline const char& lower() const {return lower_;}
84 inline const char& upper() const {return upper_;}
85 inline void setLower(ChangeStatus lower) {lower_ = lower;}
86 inline void setUpper(ChangeStatus upper) {upper_ = upper;}
87 inline void setLowerBits(char lower) {lower_ |= lower;}
88 inline void setUpperBits(char upper) {upper_ |= upper;}
90 lower_ = src.lower_;
91 upper_ = src.upper_;
92 return *this;
93 }
94private:
95 char lower_;
96 char upper_;
97};
98
100typedef double CouNumber;
101
104
105}
106
107#endif
status of lower/upper bound of a variable, to be checked/modified in bound tightening
const char & lower() const
void setLowerBits(char lower)
t_chg_bounds(const t_chg_bounds &src)
t_chg_bounds operator=(const t_chg_bounds &src)
const char & upper() const
void setUpper(ChangeStatus upper)
void setUpperBits(char upper)
void setLower(ChangeStatus lower)
general include file for different compilers
nodeType
type of a node in an expression tree
monotonicity
monotonicity type of an expression
pos
position where the operator should be printed when printing the expression
dig_type
type of digging when filling the dependence list
@ TAG_AND_RECURSIVE
linearity_type
linearity of an expression, as returned by the method Linearity()
double CouNumber
main number type in Couenne
con_sign
sign of constraint
CouNumber(* unary_function)(CouNumber)
unary function, used in all exprUnary
convexity
convexity type of an expression
conv_type
position and number of convexification cuts added for a lower convex (upper concave) envelope
@ AROUND_CURPOINT
expr_type
code returned by the method expression::code()
@ COU_EXPRUBOUND
@ MAX_COU_EXPR_CODE
@ COU_EXPRLBOUND
@ COU_EXPRSIGNPOW
@ COU_EXPRTRILINEAR
@ COU_EXPRESSION