aGrUM  0.20.3
a C++ library for (probabilistic) graphical models
gum::SimpleCPTGenerator< GUM_SCALAR > Class Template Reference

<agrum/BN/generator/simpleCPTGenerator.h> More...

#include <simpleCPTGenerator.h>

Inherits gum::ICPTGenerator< GUM_SCALAR >.

Public Member Functions

Constructors / Destructor
 SimpleCPTGenerator ()
 Default constructor. More...
 
 ~SimpleCPTGenerator () override
 Destructor. More...
 
CPT generation methods
void generateCPT (const Idx &varId, const Potential< GUM_SCALAR > &cpt) override
 Generates a CPT using floats. More...
 

Detailed Description

template<typename GUM_SCALAR>
class gum::SimpleCPTGenerator< GUM_SCALAR >

<agrum/BN/generator/simpleCPTGenerator.h>

Class for generating Conditional Probability Tables.

This class implements a CPTGenerator CPT generation algorithm.

Definition at line 45 of file simpleCPTGenerator.h.

Constructor & Destructor Documentation

◆ SimpleCPTGenerator()

template<typename GUM_SCALAR >
INLINE gum::SimpleCPTGenerator< GUM_SCALAR >::SimpleCPTGenerator ( )

Default constructor.

Definition at line 36 of file simpleCPTGenerator_tpl.h.

References gum::Set< Key, Alloc >::emplace().

36  : ICPTGenerator< GUM_SCALAR >() {
37  GUM_CONSTRUCTOR(SimpleCPTGenerator);
38  }
SimpleCPTGenerator()
Default constructor.
+ Here is the call graph for this function:

◆ ~SimpleCPTGenerator()

template<typename GUM_SCALAR >
INLINE gum::SimpleCPTGenerator< GUM_SCALAR >::~SimpleCPTGenerator ( )
override

Destructor.

Definition at line 42 of file simpleCPTGenerator_tpl.h.

References gum::Set< Key, Alloc >::emplace().

42  {
43  GUM_DESTRUCTOR(SimpleCPTGenerator);
44  }
SimpleCPTGenerator()
Default constructor.
+ Here is the call graph for this function:

Member Function Documentation

◆ generateCPT()

template<typename GUM_SCALAR >
void gum::SimpleCPTGenerator< GUM_SCALAR >::generateCPT ( const Idx varId,
const Potential< GUM_SCALAR > &  cpt 
)
override

Generates a CPT using floats.

Parameters
varIdThe variable id of the CPT owner.
cptA reference on the CPT to fill.

Definition at line 51 of file simpleCPTGenerator_tpl.h.

References gum::Set< Key, Alloc >::emplace().

52  {
53  cpt.random().normalizeAsCPT(varId);
54  }
+ Here is the call graph for this function:

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