aGrUM  0.16.0
gum::AbstractLeaf Class Referenceabstract

<agrum/FMDP/learning/datastructure/leaves/abstractLeaf.h> More...

#include <abstractLeaf.h>

+ Inheritance diagram for gum::AbstractLeaf:

Public Member Functions

virtual double effectif (Idx) const =0
 Gaves the leaf effectif for given modality. More...
 
virtual double total () const =0
 
virtual bool contains (NodeId testedId) const
 Returns true if abstractleaf has leaf in it. More...
 
NodeId id ()
 
virtual Idx nbModa () const =0
 
virtual std::string toString ()=0
 
Constructor & destructor.
 AbstractLeaf (NodeId leafId)
 Default constructor. More...
 
virtual ~AbstractLeaf ()
 Default destructor. More...
 
void * operator new (size_t s)
 Allocators and Deallocators redefinition. More...
 
void operator delete (void *p)
 Default constructor. More...
 

Detailed Description

<agrum/FMDP/learning/datastructure/leaves/abstractLeaf.h>

Abstract Class implementing a Leaf

Definition at line 53 of file abstractLeaf.h.

Constructor & Destructor Documentation

◆ AbstractLeaf()

gum::AbstractLeaf::AbstractLeaf ( NodeId  leafId)
inline

Default constructor.

Definition at line 63 of file abstractLeaf.h.

63  : __leafId(leafId) {
64  GUM_CONSTRUCTOR(AbstractLeaf);
65  }
AbstractLeaf(NodeId leafId)
Default constructor.
Definition: abstractLeaf.h:63

◆ ~AbstractLeaf()

virtual gum::AbstractLeaf::~AbstractLeaf ( )
inlinevirtual

Default destructor.

Definition at line 70 of file abstractLeaf.h.

70 { GUM_DESTRUCTOR(AbstractLeaf); }
AbstractLeaf(NodeId leafId)
Default constructor.
Definition: abstractLeaf.h:63

Member Function Documentation

◆ contains()

virtual bool gum::AbstractLeaf::contains ( NodeId  testedId) const
inlinevirtual

Returns true if abstractleaf has leaf in it.

Reimplemented in gum::ComposedLeaf.

Definition at line 93 of file abstractLeaf.h.

References __leafId.

Referenced by gum::ComposedLeaf::contains(), gum::LeafPair::contains(), and gum::LeafAggregator::update().

93 { return __leafId == testedId; }
+ Here is the caller graph for this function:

◆ effectif()

virtual double gum::AbstractLeaf::effectif ( Idx  ) const
pure virtual

Gaves the leaf effectif for given modality.

Implemented in gum::ConcreteLeaf< AttributeSelection, isScalar >, and gum::ComposedLeaf.

Referenced by gum::IMDDI< AttributeSelection, isScalar >::__insertLeafInFunctionGraph(), gum::ComposedLeaf::effectif(), operator delete(), and gum::LeafPair::updateLikelyhood().

+ Here is the caller graph for this function:

◆ id()

NodeId gum::AbstractLeaf::id ( )
inline

Definition at line 95 of file abstractLeaf.h.

References __leafId, nbModa(), and toString().

Referenced by gum::ComposedLeaf::toString(), gum::ConcreteLeaf< AttributeSelection, isScalar >::toString(), and gum::LeafAggregator::updateLeaf().

95 { return __leafId; }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nbModa()

virtual Idx gum::AbstractLeaf::nbModa ( ) const
pure virtual

Implemented in gum::ConcreteLeaf< AttributeSelection, isScalar >, and gum::ComposedLeaf.

Referenced by gum::IMDDI< AttributeSelection, isScalar >::__insertLeafInFunctionGraph(), id(), gum::LeafPair::likelyhood(), gum::ComposedLeaf::nbModa(), and gum::LeafPair::updateLikelyhood().

+ Here is the caller graph for this function:

◆ operator delete()

void gum::AbstractLeaf::operator delete ( void *  p)
inline

Default constructor.

Definition at line 78 of file abstractLeaf.h.

References gum::SmallObjectAllocator::deallocate(), effectif(), gum::SmallObjectAllocator::instance(), and total().

78  {
80  }
void deallocate(void *pDeallocatedObject, const size_t &objectSize)
Deallocates an object.
static SmallObjectAllocator & instance()
AbstractLeaf(NodeId leafId)
Default constructor.
Definition: abstractLeaf.h:63
+ Here is the call graph for this function:

◆ operator new()

void* gum::AbstractLeaf::operator new ( size_t  s)
inline

Allocators and Deallocators redefinition.

Definition at line 75 of file abstractLeaf.h.

References gum::SmallObjectAllocator::allocate(), and gum::SmallObjectAllocator::instance().

75  {
77  }
void * allocate(const size_t &objectSize)
Allocates a block.
static SmallObjectAllocator & instance()
+ Here is the call graph for this function:

◆ toString()

virtual std::string gum::AbstractLeaf::toString ( )
pure virtual

Implemented in gum::ConcreteLeaf< AttributeSelection, isScalar >, and gum::ComposedLeaf.

Referenced by id(), gum::ComposedLeaf::toString(), and gum::LeafPair::toString().

+ Here is the caller graph for this function:

◆ total()

virtual double gum::AbstractLeaf::total ( ) const
pure virtual

Implemented in gum::ConcreteLeaf< AttributeSelection, isScalar >, and gum::ComposedLeaf.

Referenced by gum::IMDDI< AttributeSelection, isScalar >::__insertLeafInFunctionGraph(), operator delete(), gum::ComposedLeaf::total(), and gum::LeafPair::updateLikelyhood().

+ Here is the caller graph for this function:

Member Data Documentation

◆ __leafId

NodeId gum::AbstractLeaf::__leafId
private

Definition at line 102 of file abstractLeaf.h.

Referenced by contains(), and id().


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