Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
numvar.h
Go to the documentation of this file.
1
30#pragma once
31
33
34namespace abacus {
35
36
38
42class OGDF_EXPORT NumVar : public Variable {
43public:
44
46
63 NumVar(Master *master,
64 const Sub *sub,
65 int number,
66 bool dynamic,
67 bool local,
68 double obj,
69 double lBound,
70 double uBound,
71 VarType::TYPE type)
72 : Variable(master, sub, dynamic, local, obj, lBound, uBound, type), number_(number)
73 { }
74
76 virtual ~NumVar() { }
77
79
85 friend std::ostream &operator<<(std::ostream &out, const NumVar &rhs) {
86 return out << '(' << rhs.number_ << ')' << std::endl;
87 }
88
90 int number() const { return number_; }
91
92protected:
93
96};
97
98}
The master of the optimization.
Definition master.h:69
Variables identified by a number.
Definition numvar.h:42
int number() const
Returns the number of the variable.
Definition numvar.h:90
int number_
The identification number of the variable.
Definition numvar.h:95
virtual ~NumVar()
The destructor.
Definition numvar.h:76
friend std::ostream & operator<<(std::ostream &out, const NumVar &rhs)
Writes the number of the variable to an output stream.
Definition numvar.h:85
NumVar(Master *master, const Sub *sub, int number, bool dynamic, bool local, double obj, double lBound, double uBound, VarType::TYPE type)
The constructor.
Definition numvar.h:63
The subproblem.
Definition sub.h:68
TYPE
The enumeration with the different variable types.
Definition vartype.h:47
Forms the virtual base class for all possible variables given in pool format.
Definition variable.h:59
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition config.h:101
variable.