aGrUM  0.21.0
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. 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 52 of file abstractLeaf.h.

Constructor & Destructor Documentation

◆ AbstractLeaf()

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

Default constructor.

Definition at line 62 of file abstractLeaf.h.

62 : _leafId_(leafId) { GUM_CONSTRUCTOR(AbstractLeaf); }
AbstractLeaf(NodeId leafId)
Default constructor.
Definition: abstractLeaf.h:62

◆ ~AbstractLeaf()

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

Default destructor.

Definition at line 67 of file abstractLeaf.h.

67  {
68  GUM_DESTRUCTOR(AbstractLeaf);
69  ;
70  }
AbstractLeaf(NodeId leafId)
Default constructor.
Definition: abstractLeaf.h:62

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

91 { return _leafId_ == testedId; }

◆ 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.

◆ id()

NodeId gum::AbstractLeaf::id ( )
inline

Definition at line 93 of file abstractLeaf.h.

93 { return _leafId_; }

◆ nbModa()

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

◆ operator delete()

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

Default constructor.

Definition at line 76 of file abstractLeaf.h.

76  {
78  }
void deallocate(void *pDeallocatedObject, const size_t &objectSize)
Deallocates an object.
static SmallObjectAllocator & instance()
AbstractLeaf(NodeId leafId)
Default constructor.
Definition: abstractLeaf.h:62

◆ operator new()

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

Allocators and Deallocators redefinition.

Definition at line 75 of file abstractLeaf.h.

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

◆ toString()

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

◆ total()

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

Member Data Documentation

◆ _leafId_

NodeId gum::AbstractLeaf::_leafId_
private

Definition at line 100 of file abstractLeaf.h.


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