Generated on Thu Jan 16 2025 00:00:00 for Gecode by doxygen 1.14.0
Gecode::Search::Par::CollectBest Class Reference

Collect best solutions. More...

#include <pbs.hh>

Public Member Functions

 CollectBest (void)
 Initialize.
bool add (Space *s, Slave< CollectBest > *r)
 Add a solution s by r and return whether is was better.
bool constrain (const Space &b)
 Check whether b better and update accordingly.
bool empty (void) const
 Check whether there is any solution left.
Spaceget (Slave< CollectBest > *&r)
 Return solution reported by r (only if a better one was found)
 ~CollectBest (void)
 Destructor.

Static Public Attributes

static const bool best = true
 Whether it collects best solutions.

Protected Attributes

Spaceb
 Currently best solution.
Slave< CollectBest > * reporter
 Who has reported the best solution (NULL if solution has already been reported)

Detailed Description

Collect best solutions.

Definition at line 113 of file pbs.hh.

Constructor & Destructor Documentation

◆ CollectBest()

Gecode::Search::Par::CollectBest::CollectBest ( void )
inline

Initialize.

Definition at line 68 of file pbs.hpp.

◆ ~CollectBest()

Gecode::Search::Par::CollectBest::~CollectBest ( void )
inline

Destructor.

Definition at line 111 of file pbs.hpp.

Member Function Documentation

◆ add()

bool Gecode::Search::Par::CollectBest::add ( Space * s,
Slave< CollectBest > * r )
inline

Add a solution s by r and return whether is was better.

Definition at line 71 of file pbs.hpp.

◆ constrain()

bool Gecode::Search::Par::CollectBest::constrain ( const Space & b)
inline

Check whether b better and update accordingly.

Definition at line 86 of file pbs.hpp.

◆ empty()

bool Gecode::Search::Par::CollectBest::empty ( void ) const
inline

Check whether there is any solution left.

Definition at line 100 of file pbs.hpp.

◆ get()

Space * Gecode::Search::Par::CollectBest::get ( Slave< CollectBest > *& r)
inline

Return solution reported by r (only if a better one was found)

Definition at line 104 of file pbs.hpp.

Member Data Documentation

◆ b

Space* Gecode::Search::Par::CollectBest::b
protected

Currently best solution.

Definition at line 116 of file pbs.hh.

◆ reporter

Slave<CollectBest>* Gecode::Search::Par::CollectBest::reporter
protected

Who has reported the best solution (NULL if solution has already been reported)

Definition at line 118 of file pbs.hh.

◆ best

const bool Gecode::Search::Par::CollectBest::best = true
static

Whether it collects best solutions.

Definition at line 121 of file pbs.hh.


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