Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

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 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 
92 protected:
93 
95  int number_;
96 };
97 
98 }
abacus::NumVar::number
int number() const
Returns the number of the variable.
Definition: numvar.h:90
abacus
Definition: ILPClusterPlanarity.h:50
abacus::NumVar::NumVar
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
abacus::NumVar::operator<<
friend std::ostream & operator<<(std::ostream &out, const NumVar &rhs)
Writes the number of the variable to an output stream.
Definition: numvar.h:85
backward::Color::type
type
Definition: backward.hpp:1716
abacus::NumVar::~NumVar
virtual ~NumVar()
The destructor.
Definition: numvar.h:76
abacus::Variable
Forms the virtual base class for all possible variables given in pool format.
Definition: variable.h:59
variable.h
variable.
abacus::NumVar
Variables identified by a number.
Definition: numvar.h:42
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
abacus::Sub
The subproblem.
Definition: sub.h:68
abacus::VarType::TYPE
TYPE
The enumeration with the different variable types.
Definition: vartype.h:47
abacus::NumVar::number_
int number_
The identification number of the variable.
Definition: numvar.h:95
abacus::Master
The master of the optimization.
Definition: master.h:69