23 #ifndef AlpsKnowledgePool_h
24 #define AlpsKnowledgePool_h
52 virtual std::pair<AlpsKnowledge*, double>
getKnowledge()
const = 0;
56 throw CoinError(
"Can not call popKnowledge()",
57 "popKnowledge()",
"AlpsKnowledgePool");
62 throw CoinError(
"Can not call hasKnowledge()",
63 "hasKnowledge()",
"AlpsKnowledgePool");
68 std::cout <<
"Can not call setMaxNumKnowledges without overriding"
70 throw CoinError(
"Can not call setMaxNumKnowledges()",
71 "setMaxNumKnowledges()",
"AlpsKnowledgePool");
82 virtual std::pair<AlpsKnowledge*, double>
84 throw CoinError(
"Can not call getBestKnowledge()",
85 "getBestKnowledge()",
"AlpsKnowledgePool");
90 double> >& kls)
const {
91 std::cout <<
"Can not call getAllKnowledge() without overriding"
93 throw CoinError(
"Can not call getAllKnowledge()",
94 "getAllKnowledge()",
"AlpsKnowledgePool");
virtual std::pair< AlpsKnowledge *, double > getBestKnowledge() const
Query the best knowledge in the pool.
virtual void setMaxNumKnowledges(int num)
Set the quantity limit of knowledges that can be stored in the pool.
virtual void addKnowledge(AlpsKnowledge *nk, double priority)=0
Add a knowledge to pool.
virtual void getAllKnowledges(std::vector< std::pair< AlpsKnowledge *, double > > &kls) const
Get a reference to all the knowledges in the pool.
virtual void popKnowledge()
Remove the queried knowledge from the pool.
virtual bool hasKnowledge() const
Check whether the pool has knowledge.
virtual ~AlpsKnowledgePool()
virtual int getMaxNumKnowledges() const
Query the quantity limit of knowledges.
virtual std::pair< AlpsKnowledge *, double > getKnowledge() const =0
Query a knowledge, but doesn't remove it from the pool.
virtual int getNumKnowledges() const =0
Query how many knowledges are in the pool.
The abstract base class of any user-defined class that Alps has to know about in order to encode/deco...