aGrUM  0.13.2
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 50 of file abstractLeaf.h.

Constructor & Destructor Documentation

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

Default constructor.

Definition at line 60 of file abstractLeaf.h.

60  : __leafId(leafId) {
61  GUM_CONSTRUCTOR(AbstractLeaf)
62  }
AbstractLeaf(NodeId leafId)
Default constructor.
Definition: abstractLeaf.h:60
virtual gum::AbstractLeaf::~AbstractLeaf ( )
inlinevirtual

Default destructor.

Definition at line 67 of file abstractLeaf.h.

67 { GUM_DESTRUCTOR(AbstractLeaf) }
AbstractLeaf(NodeId leafId)
Default constructor.
Definition: abstractLeaf.h:60

Member Function Documentation

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

Returns true if abstractleaf has leaf in it.

Reimplemented in gum::ComposedLeaf.

Definition at line 90 of file abstractLeaf.h.

References __leafId.

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

90 { return __leafId == testedId; }

+ Here is the caller graph for this function:

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:

NodeId gum::AbstractLeaf::id ( )
inline

Definition at line 92 of file abstractLeaf.h.

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

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

92 { return __leafId; }

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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:

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

Default constructor.

Definition at line 75 of file abstractLeaf.h.

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

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

+ Here is the call graph for this function:

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

Allocators and Deallocators redefinition.

Definition at line 72 of file abstractLeaf.h.

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

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

+ Here is the call graph for this function:

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

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

Referenced by id(), gum::ComposedLeaf::toString(), gum::LeafPair::toString(), and gum::FusionContext< isInitial >::toString().

+ Here is the caller graph for this function:

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

NodeId gum::AbstractLeaf::__leafId
private

Definition at line 99 of file abstractLeaf.h.

Referenced by contains(), and id().


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