30 #ifndef GUM_COMPOSED_LEAF_H 31 #define GUM_COMPOSED_LEAF_H 33 #include <agrum/FMDP/learning/datastructure/leaves/abstractLeaf.h> 59 GUM_CONSTRUCTOR(ComposedLeaf);
66 GUM_DESTRUCTOR(ComposedLeaf);
73 void*
operator new(size_t s) {
return SmallObjectAllocator::instance().allocate(s); }
75 SmallObjectAllocator::instance().deallocate(p,
sizeof(ComposedLeaf));
83 double effectif(Idx moda)
const {
return _l1_->effectif(moda) + _l2_->effectif(moda); }
84 double total()
const {
return _l1_->total() + _l2_->total(); }
90 return AbstractLeaf::contains(testedId) || _l1_->contains(testedId)
91 || _l2_->contains(testedId);
double effectif(Idx moda) const
Gaves the leaf effectif for given modality.
void operator delete(void *p)
Default constructor.
INLINE void emplace(Args &&... args)
bool contains(NodeId testedId) const
Returns true if abstractleaf has leaf in it.
~ComposedLeaf()
Default destructor.
ComposedLeaf(NodeId leafId, AbstractLeaf *l1, AbstractLeaf *l2)
Default constructor.
void * operator new(size_t s)
Allocators and Deallocators redefinition.
<agrum/FMDP/learning/datastructure/leaves/composedLeaf.h>