aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
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.
virtual double total () const =0
virtual bool contains (NodeId testedId) const
 Returns true if abstractleaf has leaf in it.
NodeId id ()
virtual Idx nbModa () const =0
virtual std::string toString ()=0
Constructor & destructor.
 AbstractLeaf (NodeId leafId)
 Default constructor.
virtual ~AbstractLeaf ()
 Default destructor.
void * operator new (size_t s)
 Allocators and Deallocators redefinition.
void operator delete (void *p)
 Default constructor.

Private Attributes

NodeId _leafId_

Detailed Description

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

Abstract Class implementing a Leaf

Definition at line 72 of file abstractLeaf.h.

Constructor & Destructor Documentation

◆ AbstractLeaf()

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

Default constructor.

Definition at line 82 of file abstractLeaf.h.

82: _leafId_(leafId) { GUM_CONSTRUCTOR(AbstractLeaf); }
AbstractLeaf(NodeId leafId)
Default constructor.

References AbstractLeaf(), and _leafId_.

Referenced by AbstractLeaf(), gum::ComposedLeaf::ComposedLeaf(), gum::ConcreteLeaf< AttributeSelection, isScalar >::ConcreteLeaf(), ~AbstractLeaf(), and operator delete().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~AbstractLeaf()

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

Default destructor.

Definition at line 87 of file abstractLeaf.h.

87 {
88 GUM_DESTRUCTOR(AbstractLeaf);
89 ;
90 }

References AbstractLeaf().

Here is the call graph for this function:

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 112 of file abstractLeaf.h.

112{ return _leafId_ == testedId; }

References _leafId_.

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

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::ComposedLeaf, and gum::ConcreteLeaf< AttributeSelection, isScalar >.

Referenced by gum::IMDDI< AttributeSelection, isScalar >::_insertLeafInFunctionGraph_(), and gum::IMDDI< AttributeSelection, isScalar >::_insertLeafInFunctionGraph_().

Here is the caller graph for this function:

◆ id()

NodeId gum::AbstractLeaf::id ( )
inline

Definition at line 114 of file abstractLeaf.h.

114{ return _leafId_; }

References _leafId_.

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

Here is the caller graph for this function:

◆ nbModa()

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

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

Referenced by gum::IMDDI< AttributeSelection, isScalar >::_insertLeafInFunctionGraph_().

Here is the caller graph for this function:

◆ operator delete()

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

Default constructor.

Definition at line 97 of file abstractLeaf.h.

97 {
99 }
static SmallObjectAllocator & instance()
void deallocate(void *pDeallocatedObject, const size_t &objectSize)
Deallocates an object.

References AbstractLeaf(), gum::SmallObjectAllocator::deallocate(), and gum::SmallObjectAllocator::instance().

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 95 of file abstractLeaf.h.

void * allocate(const size_t &objectSize)
Allocates a block.

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

Here is the call graph for this function:

◆ toString()

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

◆ total()

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

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

Referenced by gum::IMDDI< AttributeSelection, isScalar >::_insertLeafInFunctionGraph_(), and gum::IMDDI< AttributeSelection, isScalar >::_insertLeafInFunctionGraph_().

Here is the caller graph for this function:

Member Data Documentation

◆ _leafId_

NodeId gum::AbstractLeaf::_leafId_
private

Definition at line 121 of file abstractLeaf.h.

Referenced by AbstractLeaf(), contains(), and id().


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