30 #ifndef GUM_ABSTRACT_LEAF_H 31 #define GUM_ABSTRACT_LEAF_H 33 #include <agrum/tools/core/hashTable.h> 34 #include <agrum/tools/core/multiPriorityQueue.h> 35 #include <agrum/tools/core/sequence.h> 36 #include <agrum/tools/core/smallobjectallocator/smallObjectAllocator.h> 38 #include <agrum/tools/graphs/graphElements.h> 68 GUM_DESTRUCTOR(AbstractLeaf);
75 void*
operator new(size_t s) {
return SmallObjectAllocator::instance().allocate(s); }
77 SmallObjectAllocator::instance().deallocate(p,
sizeof(AbstractLeaf));
86 virtual double total()
const = 0;
91 virtual bool contains(NodeId testedId)
const {
return _leafId_ == testedId; }
virtual bool contains(NodeId testedId) const
Returns true if abstractleaf has leaf in it.
virtual double effectif(Idx) const =0
Gaves the leaf effectif for given modality.
INLINE void emplace(Args &&... args)
void operator delete(void *p)
Default constructor.
<agrum/FMDP/learning/datastructure/leaves/abstractLeaf.h>
virtual std::string toString()=0
virtual Idx nbModa() const =0
void * operator new(size_t s)
Allocators and Deallocators redefinition.
virtual double total() const =0
virtual ~AbstractLeaf()
Default destructor.
AbstractLeaf(NodeId leafId)
Default constructor.