BinSet Class Reference

A set of bins. More...

#include <Optimizer.h>

Collaboration diagram for BinSet:

Collaboration graph
[legend]

List of all members.

Public Member Functions

Binoperator[] (int i)
 Returns the ith bin.
const Binoperator[] (int i) const
 Returns the ith bin; const version.
BinAddBin (Params::Size_t capacity)
 Add a bin of capacity capacity.
BinAddBin (const Bin &b)
 Add the bin b.
std::vector< Bin >::iterator begin ()
 Pointer (iterator) to the first bin of m_bins (begin()).
std::vector< Bin >::iterator end ()
 Pointer (iterator) to the last bin plus one of m_bins (end()).
void DelBin (int i)
 Remove the ith bin.
void DelAllBins ()
 Remove all bins (clear).
unsigned int Count () const
 Returns the number of bins.
bool operator!= (const BinSet &bs) const
 Verify if two bins are different.
bool operator== (const BinSet &bs) const
 Verify if two bins are equal.

Private Attributes

std::vector< Binm_bins


Detailed Description

A set of bins.

Member Function Documentation

Bin& BinSet::operator[] ( int  i  )  [inline]

Returns the ith bin.

References m_bins.

const Bin& BinSet::operator[] ( int  i  )  const [inline]

Returns the ith bin; const version.

References m_bins.

Bin& BinSet::AddBin ( Params::Size_t  capacity  )  [inline]

Add a bin of capacity capacity.

References m_bins.

Referenced by Split::Evolve(), and BestFit::Evolve().

Bin& BinSet::AddBin ( const Bin b  )  [inline]

Add the bin b.

References m_bins.

std::vector<Bin>::iterator BinSet::begin (  )  [inline]

Pointer (iterator) to the first bin of m_bins (begin()).

References m_bins.

Referenced by Optimizer::Output().

std::vector<Bin>::iterator BinSet::end (  )  [inline]

Pointer (iterator) to the last bin plus one of m_bins (end()).

References m_bins.

Referenced by Optimizer::Output().

void BinSet::DelBin ( int  i  )  [inline]

Remove the ith bin.

References m_bins.

void BinSet::DelAllBins (  )  [inline]

Remove all bins (clear).

References m_bins.

unsigned int BinSet::Count (  )  const [inline]

Returns the number of bins.

References m_bins.

Referenced by Optimizer::Evaluate(), GeneticAlgorithm::Evaluate(), BestFit::Evolve(), operator==(), and Optimizer::Output().

bool BinSet::operator!= ( const BinSet bs  )  const [inline]

Verify if two bins are different.

bool BinSet::operator== ( const BinSet bs  )  const [inline]

Verify if two bins are equal.

References Count(), and m_bins.


Member Data Documentation

std::vector<Bin> BinSet::m_bins [private]

Vector of bins.

Referenced by AddBin(), begin(), Count(), DelAllBins(), DelBin(), end(), operator==(), and operator[]().


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