30 #ifndef GUM_LEAF_PAIR_H 31 #define GUM_LEAF_PAIR_H 33 #include <agrum/tools/graphs/graphElements.h> 35 #include <agrum/FMDP/learning/datastructure/leaves/abstractLeaf.h> 36 #include <agrum/FMDP/learning/datastructure/leaves/composedLeaf.h> 66 GUM_DESTRUCTOR(LeafPair);
73 void*
operator new(size_t s) {
return SmallObjectAllocator::instance().allocate(s); }
75 SmallObjectAllocator::instance().deallocate(p,
sizeof(LeafPair));
106 bool contains(NodeId testedId) {
return _l1_->contains(testedId) || _l2_->contains(testedId); }
AbstractLeaf * convert2Leaf(NodeId leafId) const
Returns a leaf matching data and having given id as id.
INLINE void emplace(Args &&... args)
~LeafPair()
Default destructor.
<agrum/FMDP/learning/datastructure/leaves/leafPair.h>
AbstractLeaf * otherLeaf(AbstractLeaf *l) const
AbstractLeaf * secondLeaf()
LeafPair(AbstractLeaf *l1, AbstractLeaf *l2)
Default constructor.
void * operator new(size_t s)
Allocators and Deallocators redefinition.
void operator delete(void *p)
Default constructor.
AbstractLeaf * firstLeaf()
double likelyhood()
Updates GStatistic.
bool contains(NodeId testedId)
Returns true if pair has leaf in it.
void updateLikelyhood()
Updates GStatistic.