Alps  1.5.7
Public Member Functions | List of all members
AlpsKnowledgePool Class Referenceabstract

#include <AlpsKnowledgePool.h>

+ Inheritance diagram for AlpsKnowledgePool:

Public Member Functions

 AlpsKnowledgePool ()
 
virtual ~AlpsKnowledgePool ()
 
virtual void addKnowledge (AlpsKnowledge *nk, double priority)=0
 Add a knowledge to pool. More...
 
virtual int getNumKnowledges () const =0
 Query how many knowledges are in the pool. More...
 
virtual std::pair< AlpsKnowledge *, double > getKnowledge () const =0
 Query a knowledge, but doesn't remove it from the pool. More...
 
virtual void popKnowledge ()
 Remove the queried knowledge from the pool. More...
 
virtual bool hasKnowledge () const
 Check whether the pool has knowledge. More...
 
virtual void setMaxNumKnowledges (int num)
 Set the quantity limit of knowledges that can be stored in the pool. More...
 
virtual int getMaxNumKnowledges () const
 Query the quantity limit of knowledges. More...
 
virtual std::pair< AlpsKnowledge *, double > getBestKnowledge () const
 Query the best knowledge in the pool. More...
 
virtual void getAllKnowledges (std::vector< std::pair< AlpsKnowledge *, double > > &kls) const
 Get a reference to all the knowledges in the pool. More...
 

Detailed Description

Definition at line 36 of file AlpsKnowledgePool.h.

Constructor & Destructor Documentation

◆ AlpsKnowledgePool()

AlpsKnowledgePool::AlpsKnowledgePool ( )
inline

Definition at line 42 of file AlpsKnowledgePool.h.

◆ ~AlpsKnowledgePool()

virtual AlpsKnowledgePool::~AlpsKnowledgePool ( )
inlinevirtual

Definition at line 43 of file AlpsKnowledgePool.h.

Member Function Documentation

◆ addKnowledge()

virtual void AlpsKnowledgePool::addKnowledge ( AlpsKnowledge nk,
double  priority 
)
pure virtual

Add a knowledge to pool.

Implemented in AlpsSubTreePool, AlpsSolutionPool, and AlpsNodePool.

◆ getNumKnowledges()

virtual int AlpsKnowledgePool::getNumKnowledges ( ) const
pure virtual

Query how many knowledges are in the pool.

Implemented in AlpsSubTreePool, AlpsSolutionPool, and AlpsNodePool.

◆ getKnowledge()

virtual std::pair<AlpsKnowledge*, double> AlpsKnowledgePool::getKnowledge ( ) const
pure virtual

Query a knowledge, but doesn't remove it from the pool.

Implemented in AlpsSubTreePool, AlpsSolutionPool, and AlpsNodePool.

◆ popKnowledge()

virtual void AlpsKnowledgePool::popKnowledge ( )
inlinevirtual

Remove the queried knowledge from the pool.

Reimplemented in AlpsSubTreePool, AlpsSolutionPool, and AlpsNodePool.

Definition at line 55 of file AlpsKnowledgePool.h.

◆ hasKnowledge()

virtual bool AlpsKnowledgePool::hasKnowledge ( ) const
inlinevirtual

Check whether the pool has knowledge.

Reimplemented in AlpsSubTreePool, AlpsSolutionPool, and AlpsNodePool.

Definition at line 61 of file AlpsKnowledgePool.h.

◆ setMaxNumKnowledges()

virtual void AlpsKnowledgePool::setMaxNumKnowledges ( int  num)
inlinevirtual

Set the quantity limit of knowledges that can be stored in the pool.

Reimplemented in AlpsSolutionPool.

Definition at line 67 of file AlpsKnowledgePool.h.

◆ getMaxNumKnowledges()

virtual int AlpsKnowledgePool::getMaxNumKnowledges ( ) const
inlinevirtual

Query the quantity limit of knowledges.

Reimplemented in AlpsSolutionPool.

Definition at line 75 of file AlpsKnowledgePool.h.

◆ getBestKnowledge()

virtual std::pair<AlpsKnowledge*, double> AlpsKnowledgePool::getBestKnowledge ( ) const
inlinevirtual

Query the best knowledge in the pool.

Reimplemented in AlpsSolutionPool.

Definition at line 83 of file AlpsKnowledgePool.h.

◆ getAllKnowledges()

virtual void AlpsKnowledgePool::getAllKnowledges ( std::vector< std::pair< AlpsKnowledge *, double > > &  kls) const
inlinevirtual

Get a reference to all the knowledges in the pool.

Reimplemented in AlpsSolutionPool.

Definition at line 89 of file AlpsKnowledgePool.h.


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