ABA_HISTORY Class Reference

class implements the storage of the solution history. More...

#include <history.h>

Inheritance diagram for ABA_HISTORY:

ABA_ABACUSROOT List of all members.

Public Member Functions

 ABA_HISTORY (ABA_MASTER *master)
virtual ~ABA_HISTORY ()
 The destructor.
void 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.

Private Member Functions

int size () const
void realloc ()
 The function realloc() enlarges the history table by 100 components.

Private Attributes

ABA_MASTERmaster_
ABA_ARRAY< double > primalBound_
ABA_ARRAY< double > dualBound_
ABA_ARRAY< long > time_
int n_

Friends

ostream & operator<< (ostream &out, const ABA_HISTORY &rhs)

Detailed Description

class implements the storage of the solution history.

Definition at line 43 of file history.h.


Constructor & Destructor Documentation

ABA_HISTORY::ABA_HISTORY ( ABA_MASTER master  ) 

The constructor initializes a history table with 100 possible entries.

If this number is exceeded an automatic reallocation is performed.

Parameters:
master A pointer to the corresponding master of the optimization.

virtual ABA_HISTORY::~ABA_HISTORY (  )  [virtual]

The destructor.


Member Function Documentation

void ABA_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.

int ABA_HISTORY::size (  )  const [inline, private]

Returns the length of the history table.

Definition at line 107 of file history.h.

void ABA_HISTORY::realloc (  )  [private]

The function realloc() enlarges the history table by 100 components.


Friends And Related Function Documentation

ostream& operator<< ( ostream &  out,
const ABA_HISTORY rhs 
) [friend]

The output operator.

Returns:
A reference to the output stream.
Parameters:
out The output stream.
rhs The solution history being output.


Member Data Documentation

ABA_MASTER* ABA_HISTORY::master_ [private]

A pointer to corresponding master of the optimization.

Definition at line 87 of file history.h.

ABA_ARRAY<double> ABA_HISTORY::primalBound_ [private]

The array storing the value of the best primal solution.

Definition at line 91 of file history.h.

ABA_ARRAY<double> ABA_HISTORY::dualBound_ [private]

The array storing the value of the best dual solution.

Definition at line 95 of file history.h.

ABA_ARRAY<long> ABA_HISTORY::time_ [private]

The CPU time in seconds, when the entry in the table was made.

Definition at line 99 of file history.h.

int ABA_HISTORY::n_ [private]

The number of entries in the history table.

Definition at line 103 of file history.h.


The documentation for this class was generated from the following file:
Generated on Tue Aug 14 18:09:57 2007 for ABACUS by  doxygen 1.5.1