48#ifndef GUM_CLASS_BAYESNET_H
49#define GUM_CLASS_BAYESNET_H
78 template < GUM_Numeric GUM_SCALAR >
119 const Tensor< GUM_SCALAR >&
cpt(
NodeId varId)
const override;
145 std::string
toDot()
const override;
172#ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
Inline implementation of ClassBayesNet.
Base class for discrete random variable.
The class for generic Hash Tables.
IBayesNet()
Default constructor.
Container used to map discrete variables with nodes.
This class decorates a gum::prm::Class<GUM_SCALAR> has an IBaseBayesNet.
~ClassBayesNet() override
Destructor.
ClassBayesNet(const PRMClass< GUM_SCALAR > &c)
Default constructor.
const DiscreteVariable & variableFromName(std::string_view name) const override
See gum::IBaseBayesNet::variableFromName().
std::string toDot() const override
NodeId nodeId(const DiscreteVariable &var) const override
See gum::IBaseBayesNet::nodeId().
NodeProperty< Size > _modalities_
NodeId idFromName(std::string_view name) const override
See gum::IBaseBayesNet::idFromName().
const VariableNodeMap & variableNodeMap() const override
See gum::IBaseBayesNet::variableNodeMap().
HashTable< const DiscreteVariable *, const PRMClassElement< GUM_SCALAR > * > _varNodeMap_
Mapping between DiscreteVariable and their NodeId.
const NodeProperty< Size > & modalities() const
See gum::IBaseBayesNet::modalities().
const Tensor< GUM_SCALAR > & cpt(NodeId varId) const override
Returns the CPT of a node in this ClassBayesNet<GUM_SCALAR>.
const PRMClassElement< GUM_SCALAR > & _get_(NodeId id) const
Private getter with type checking in case the id is not a formal PRMAttribute.
void _init_(const PRMClass< GUM_SCALAR > &c)
const PRMClass< GUM_SCALAR > * _class_
The PRMClassElementContainer decorated by this.
const DiscreteVariable & variable(NodeId id) const override
See gum::IBaseBayesNet::variable().
ClassBayesNet< GUM_SCALAR > & operator=(const ClassBayesNet< GUM_SCALAR > &from)
Copy operator.
Abstract class representing an element of PRM class.
A PRMClass is an object of a PRM representing a fragment of a Bayesian network which can be instantia...
Size NodeId
Type for node ids.
HashTable< NodeId, VAL > NodeProperty
Property on graph elements.
namespace for all probabilistic relational models entities
gum is the global namespace for all aGrUM entities