Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

history.h
Go to the documentation of this file.
1 
30 #pragma once
31 
32 #include <ogdf/lib/abacus/master.h>
33 
34 namespace abacus {
35 
36 
38 
43 class OGDF_EXPORT History : public AbacusRoot {
44 public:
45 
47 
52  History(Master *master) :
53  master_(master),
54  primalBound_(100),
55  dualBound_(100),
56  time_(100),
57  n_(0)
58  { }
59 
60  virtual ~History() { }
61 
63 
69  friend OGDF_EXPORT std::ostream& operator<<(std::ostream& out, const History &rhs);
70 
72 
81  void update();
82 
83 private:
84 
86  int size() const { return primalBound_.size(); }
87 
89  void realloc();
90 
91 
94 
97 
100 
103 
105  int n_;
106 };
107 
108 }
Solution histories.
Definition: history.h:43
The parameterized class Array implements dynamic arrays of type E.
Definition: Array.h:200
Base class of all other classes of ABACUS.
Definition: abacusroot.h:68
The master of the optimization.
Definition: master.h:69
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
Master * master_
A pointer to corresponding master of the optimization.
Definition: history.h:93
int size() const
Returns the length of the history table.
Definition: history.h:86
History(Master *master)
Creates a history table with 100 possible entries.
Definition: history.h:52
virtual ~History()
Definition: history.h:60
the master of the optimization.
Array< int64_t > time_
The CPU time in seconds, when the entry in the table was made.
Definition: history.h:102
int n_
The number of entries in the history table.
Definition: history.h:105
Array< double > dualBound_
The array storing the value of the best dual solution.
Definition: history.h:99
Array< double > primalBound_
The array storing the value of the best primal solution.
Definition: history.h:96
std::ostream & operator<<(std::ostream &out, const Active< BaseType, CoType > &rhs)