BestFit Class Reference

#include <BestFit.h>

Inheritance diagram for BestFit:

Inheritance graph
Collaboration diagram for BestFit:

Collaboration graph

List of all members.

Public Member Functions

 BestFit (Input &i)
 ~BestFit ()
void Evolve ()

Protected Member Functions

std::ostream & Write (std::ostream &) const

Detailed Description

Optimization via the Best Fit search.

Constructor & Destructor Documentation

BestFit::BestFit ( Input i  )  [inline]

Calls the base constructor and print some information if needed.

References SizeName::CmpSizeRev(), and Optimizer::m_files.

BestFit::~BestFit (  )  [inline]

References Optimizer::m_solution.

Member Function Documentation

void BestFit::Evolve (  )  [virtual]

Create a reasonable solution via "Best Fit Search", i.e., select files from bigger to smaller until no more space left (less than target size). This algorithm usually produces locally optimal solutions, however, it is very fast!

Implements Optimizer.

References BinSet::AddBin(), Bin::AddItem(), BinSet::Count(), Optimizer::m_files, Optimizer::m_params, Optimizer::m_solution, Params::m_target, and Params::m_verbose.

std::ostream& BestFit::Write ( std::ostream &   )  const [protected, virtual]

Writes some information (like algorithm name and parameters) in ostream object (usually cout).

Reimplemented from Optimizer.

The documentation for this class was generated from the following files: