Solution histories. More...
#include <ogdf/lib/abacus/history.h>
Public Member Functions | |
History (Master *master) | |
Creates a history table with 100 possible entries. | |
virtual | ~History () |
void | update () |
Adds an additional line to the history table. | |
Public Member Functions inherited from abacus::AbacusRoot | |
virtual | ~AbacusRoot () |
The destructor. | |
Private Member Functions | |
void | realloc () |
The function realloc() enlarges the history table by 100 components. | |
int | size () const |
Returns the length of the history table. | |
Private Attributes | |
Array< double > | dualBound_ |
The array storing the value of the best dual solution. | |
Master * | master_ |
A pointer to corresponding master of the optimization. | |
int | n_ |
The number of entries in the history table. | |
Array< double > | primalBound_ |
The array storing the value of the best primal solution. | |
Array< int64_t > | time_ |
The CPU time in seconds, when the entry in the table was made. | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const History &rhs) |
The output operator. | |
Additional Inherited Members | |
Static Public Member Functions inherited from abacus::AbacusRoot | |
static bool | ascii2bool (const string &str) |
Converts the string str to a boolean value. | |
static bool | endsWith (const string &str, const string &end) |
Returns true if str ends with end, false otherwise. | |
static double | fracPart (double x) |
Returns the absolute value of the fractional part of x. | |
static const char * | onOff (bool value) |
Converts a boolean variable to the strings "on" and "off". | |
Solution histories.
This class implements the storage of the solution history. Each time when a better feasible solution or globally valid dual bound is found, it should be memorized in this class.
|
inline |
|
private |
The function realloc() enlarges the history table by 100 components.
|
inlineprivate |
void abacus::History::update | ( | ) |
Adds an additional line to the history table.
Primal bound, dual bound, and the time are taken from the corresponding master object. The history table is automatically reallocated if necessary.
Usually an explicit call to this function from an application class is not required since update() is automatically called if a new global primal or dual bound is found.
The output operator.
out | The output stream. |
rhs | The solution history being output. |
|
private |
|
private |