Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

numvar.h
Go to the documentation of this file.
1 
30 #pragma once
31 
33 
34 namespace abacus {
35 
36 
38 
42 class OGDF_EXPORT NumVar : public Variable {
43 public:
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,
72  : Variable(master, sub, dynamic, local, obj, lBound, uBound, type), number_(number)
73  { }
74 
76  virtual ~NumVar() { }
77 
79 
85  friend ostream &operator<<(ostream &out, const NumVar &rhs) {
86  return out << '(' << rhs.number_ << ')' << endl;
87  }
88 
90  int number() const { return number_; }
91 
92 protected:
93 
95  int number_;
96 };
97 
98 } //namespace abacus
The master of the optimization.
Definition: master.h:69
friend ostream & operator<<(ostream &out, const NumVar &rhs)
Writes the number of the variable to an output stream.
Definition: numvar.h:85
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
Variables identified by a number.
Definition: numvar.h:42
The subproblem.
Definition: sub.h:68
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
Forms the virtual base class for all possible variables given in pool format.
Definition: variable.h:59
variable.
virtual ~NumVar()
The destructor.
Definition: numvar.h:76
TYPE
The enumeration with the different variable types.
Definition: vartype.h:47
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