Alps  2.0.2
Private Attributes | List of all members
AlpsKnowledgePool Class Referenceabstract

This is an abstract base class, fixing an API for pool types of Alps, AlpsNodePool, AlpsSolutionPool, AlpsSubTreePool. More...

#include <AlpsKnowledgePool.h>

+ Inheritance diagram for AlpsKnowledgePool:

Public Member Functions

Constructor and Destructor.
 AlpsKnowledgePool (AlpsKnowledgePoolType type)
 Default constructor. More...
 
virtual ~AlpsKnowledgePool ()
 Destructor. More...
 
Querry methods
virtual int getNumKnowledges () const =0
 Return size of the pool. More...
 
virtual std::pair< AlpsKnowledge *, double > getKnowledge () const =0
 Check the first item in the pool. More...
 
virtual bool hasKnowledge () const =0
 Check whether the pool is empty. More...
 
virtual int getMaxNumKnowledges () const =0
 Query the quantity limit of knowledges. More...
 
virtual std::pair< AlpsKnowledge *, double > getBestKnowledge () const =0
 Query the best knowledge in the pool. More...
 
virtual void getAllKnowledges (std::vector< std::pair< AlpsKnowledge *, double > > &kls) const =0
 Get a reference to all the knowledges in the pool.*‍/. More...
 
Knowledge manipulation
virtual void addKnowledge (AlpsKnowledge *nk, double priority)=0
 Add a knowledge to pool. More...
 
virtual void popKnowledge ()=0
 Pop the first knowledge from the pool. More...
 

Private Attributes

AlpsKnowledgePoolType type_
 

Other functions

virtual void setMaxNumKnowledges (int num)=0
 Set the quantity limit of knowledges that can be stored in the pool. More...
 
 AlpsKnowledgePool (AlpsKnowledgePool const &)
 Disable copy constructor. More...
 
AlpsKnowledgePooloperator= (AlpsKnowledgePool const &)
 Disable copy assignment operator. More...
 

Detailed Description

This is an abstract base class, fixing an API for pool types of Alps, AlpsNodePool, AlpsSolutionPool, AlpsSubTreePool.

Definition at line 47 of file AlpsKnowledgePool.h.

Constructor & Destructor Documentation

◆ AlpsKnowledgePool() [1/2]

AlpsKnowledgePool::AlpsKnowledgePool ( AlpsKnowledgePoolType  type)
inline

Default constructor.

Definition at line 54 of file AlpsKnowledgePool.h.

◆ ~AlpsKnowledgePool()

virtual AlpsKnowledgePool::~AlpsKnowledgePool ( )
inlinevirtual

Destructor.

Definition at line 56 of file AlpsKnowledgePool.h.

◆ AlpsKnowledgePool() [2/2]

AlpsKnowledgePool::AlpsKnowledgePool ( AlpsKnowledgePool const &  )
private

Disable copy constructor.

Member Function Documentation

◆ getNumKnowledges()

virtual int AlpsKnowledgePool::getNumKnowledges ( ) const
pure virtual

Return size of the pool.

Implemented in AlpsNodePool, AlpsSolutionPool, and AlpsSubTreePool.

◆ getKnowledge()

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

Check the first item in the pool.

Implemented in AlpsNodePool, AlpsSolutionPool, and AlpsSubTreePool.

◆ hasKnowledge()

virtual bool AlpsKnowledgePool::hasKnowledge ( ) const
pure virtual

Check whether the pool is empty.

Implemented in AlpsNodePool, AlpsSolutionPool, and AlpsSubTreePool.

◆ getMaxNumKnowledges()

virtual int AlpsKnowledgePool::getMaxNumKnowledges ( ) const
pure virtual

Query the quantity limit of knowledges.

Implemented in AlpsNodePool, AlpsSolutionPool, and AlpsSubTreePool.

◆ getBestKnowledge()

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

Query the best knowledge in the pool.

Implemented in AlpsNodePool, AlpsSolutionPool, and AlpsSubTreePool.

◆ getAllKnowledges()

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

Get a reference to all the knowledges in the pool.*‍/.

Implemented in AlpsSolutionPool, AlpsNodePool, and AlpsSubTreePool.

◆ addKnowledge()

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

Add a knowledge to pool.

Implemented in AlpsSubTreePool, AlpsSolutionPool, and AlpsNodePool.

◆ popKnowledge()

virtual void AlpsKnowledgePool::popKnowledge ( )
pure virtual

Pop the first knowledge from the pool.

Implemented in AlpsNodePool, AlpsSolutionPool, and AlpsSubTreePool.

◆ setMaxNumKnowledges()

virtual void AlpsKnowledgePool::setMaxNumKnowledges ( int  num)
pure virtual

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

Implemented in AlpsNodePool, AlpsSubTreePool, and AlpsSolutionPool.

◆ operator=()

AlpsKnowledgePool& AlpsKnowledgePool::operator= ( AlpsKnowledgePool const &  )
private

Disable copy assignment operator.

Member Data Documentation

◆ type_

AlpsKnowledgePoolType AlpsKnowledgePool::type_
private

Definition at line 48 of file AlpsKnowledgePool.h.


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