Alps
2.0.2
|
This class is a comtainer for the solutions found during the search. More...
#include <AlpsSolutionPool.h>
Public Member Functions | |
Constructor and Destructor. | |
AlpsSolutionPool (int maxsols=1) | |
virtual | ~AlpsSolutionPool () |
Querry methods | |
virtual int | getNumKnowledges () const |
Query the current number of solutions. More... | |
virtual std::pair< AlpsKnowledge *, double > | getKnowledge () const |
Check the first item in the pool. More... | |
virtual bool | hasKnowledge () const |
Return true if there are any solution stored in the solution pool. More... | |
virtual int | getMaxNumKnowledges () const |
query the maximum number of solutions. More... | |
virtual std::pair< AlpsKnowledge *, double > | getBestKnowledge () const |
Return the best solution. More... | |
virtual void | getAllKnowledges (std::vector< std::pair< AlpsKnowledge *, double > > &sols) const |
Return all the solutions of the solution pool in the provided argument vector. More... | |
Knowledge manipulation | |
virtual void | addKnowledge (AlpsKnowledge *sol, double priority) |
Add a knowledge to pool. More... | |
virtual void | popKnowledge () |
Remove a solution from the pool. More... | |
Public Member Functions inherited from AlpsKnowledgePool | |
AlpsKnowledgePool (AlpsKnowledgePoolType type) | |
Default constructor. More... | |
virtual | ~AlpsKnowledgePool () |
Destructor. More... | |
Private Attributes | |
std::multimap< double, AlpsSolution * > | solutions_ |
int | maxNumSolutions_ |
Other functions | |
virtual void | setMaxNumKnowledges (int maxsols) |
Set maximum number of solutions. More... | |
void | clean () |
Delete all the solutions in pool. More... | |
AlpsSolutionPool (const AlpsSolutionPool &) | |
Disable copy constructor. More... | |
AlpsSolutionPool & | operator= (const AlpsSolutionPool &) |
Disable copy assignment operator. More... | |
This class is a comtainer for the solutions found during the search.
In the solution pool we assume that the lower the priority value the more desirable the solution is.
Definition at line 43 of file AlpsSolutionPool.h.
AlpsSolutionPool::AlpsSolutionPool | ( | int | maxsols = 1 | ) |
|
virtual |
|
private |
Disable copy constructor.
|
virtual |
Query the current number of solutions.
Implements AlpsKnowledgePool.
|
virtual |
Check the first item in the pool.
Implements AlpsKnowledgePool.
|
virtual |
Return true if there are any solution stored in the solution pool.
Implements AlpsKnowledgePool.
|
inlinevirtual |
query the maximum number of solutions.
Implements AlpsKnowledgePool.
Definition at line 62 of file AlpsSolutionPool.h.
|
virtual |
Return the best solution.
The callee must not delete the returned pointer!
Implements AlpsKnowledgePool.
|
virtual |
Return all the solutions of the solution pool in the provided argument vector.
The callee must not delete the returned pointers!
Implements AlpsKnowledgePool.
|
virtual |
Add a knowledge to pool.
Implements AlpsKnowledgePool.
|
virtual |
Remove a solution from the pool.
Implements AlpsKnowledgePool.
|
virtual |
Set maximum number of solutions.
Implements AlpsKnowledgePool.
void AlpsSolutionPool::clean | ( | ) |
Delete all the solutions in pool.
|
private |
Disable copy assignment operator.
|
private |
Definition at line 44 of file AlpsSolutionPool.h.
|
private |
Definition at line 45 of file AlpsSolutionPool.h.