aGrUM 3.0.0
a C++ library for (probabilistic) graphical models
gum::prm::StructuredBayesBall< GUM_SCALAR > Class Template Reference

<agrum/PRM/structuredBayesBall.h> More...

#include <structuredBayesBall.h>

Collaboration diagram for gum::prm::StructuredBayesBall< GUM_SCALAR >:

Public Member Functions

void compute (const PRMInstance< GUM_SCALAR > *i, NodeId n)
 Compute the set or requisite nodes for each required instance given the current set of observations. Discard previous computations.
void compute (const PRMInstance< GUM_SCALAR > &i, NodeId n)
 Compute the set or requisite nodes for each required instance given the current set of observations. Discard previous computations.
bool _isHardEvidence_ (const PRMInstance< GUM_SCALAR > *i, NodeId n)
 Returns true if there is a hard evidence on i->get(n).
Constructors & destructor.
 StructuredBayesBall (const PRMInference< GUM_SCALAR > &inference)
 Default Constructor.
 ~StructuredBayesBall ()
 Destructor.
Getters and Setters.
const std::string & key (const PRMInstance< GUM_SCALAR > *i) const
 Returns a unique key w.r.t. d-separation for i.
const std::string & key (const PRMInstance< GUM_SCALAR > &i) const
 Returns a unique key w.r.t. d-separation for i.
const Set< NodeId > & requisiteNodes (const PRMInstance< GUM_SCALAR > *i) const
 Returns the set of requisite nodes w.r.t. d-separation for i.
const Set< NodeId > & requisiteNodes (const PRMInstance< GUM_SCALAR > &i) const
 Returns the set of requisite nodes w.r.t. d-separation for i.
Size occurrence (std::string_view key) const
 Returns the number of occurrence of the given key, which is the number of PRMInstance<GUM_SCALAR> sharing the same set of requisite nodes.
float liftRatio () const
 Returns the ratio between the total number of instances and the number of instances with the same configuration.
bool exists (const PRMInstance< GUM_SCALAR > *i) const
 Returns true if i has requisite nodes.
bool exists (const PRMInstance< GUM_SCALAR > &i) const
 Returns true if i has requisite nodes.

Private Types

using MarkMap = HashTable< NodeId, std::pair< bool, bool > >
 Code alias.
using InstanceMap = HashTable< const PRMInstance< GUM_SCALAR >*, MarkMap* >

Private Member Functions

 StructuredBayesBall (const StructuredBayesBall &source)
 Copy constructor.
StructuredBayesBalloperator= (const StructuredBayesBall &source)
 Copy operator.
std::pair< bool, bool > & _getMark_ (InstanceMap &marks, const PRMInstance< GUM_SCALAR > *i, NodeId n)
 Code alias.
const PRMSlotChain< GUM_SCALAR > & _getSC_ (const PRMInstance< GUM_SCALAR > *i, NodeId n)
 Code alias.
void _clean_ ()
 Cleans this before a new computation.
void _compute_ (const PRMInstance< GUM_SCALAR > *i, NodeId n)
 The real compute method.
void _fromChild_ (const PRMInstance< GUM_SCALAR > *i, NodeId n, InstanceMap &marks)
 When the ball is received on i->get(n) from a child.
void _fromParent_ (const PRMInstance< GUM_SCALAR > *i, NodeId n, InstanceMap &marks)
 When the ball is receive on i->get(n) from a parent.
void _fillMaps_ (InstanceMap &marks)
 Fill keyMap and reqMap.
std::string _buildHashKey_ (const PRMInstance< GUM_SCALAR > *i, Set< NodeId > &req_nodes)
 Builds the HashKey for the given instance and requisite nodes set.

Private Attributes

const PRMInference< GUM_SCALAR > * _inf_
 The PRM at which model belongs.
HashTable< const PRMInstance< GUM_SCALAR > *, std::pair< std::string, Set< NodeId > * > > _keyMap_
 Associate an PRMInstance<GUM_SCALAR> with a unique key w.r.t. d-separation and the set of requisite nodes deduced from d-separation analysis.
HashTable< std::string, std::pair< Set< NodeId > *, Size > > _reqMap_
 Associate a Key with the set of requisite nodes associated with it. The Size value is the number of instance with the same key.

Detailed Description

template<GUM_Numeric GUM_SCALAR>
class gum::prm::StructuredBayesBall< GUM_SCALAR >

<agrum/PRM/structuredBayesBall.h>

This class represent the BayesBall algorithm applied on PRMs.

Definition at line 69 of file structuredBayesBall.h.

Member Typedef Documentation

◆ InstanceMap

template<GUM_Numeric GUM_SCALAR>
using gum::prm::StructuredBayesBall< GUM_SCALAR >::InstanceMap = HashTable< const PRMInstance< GUM_SCALAR >*, MarkMap* >
private

Definition at line 138 of file structuredBayesBall.h.

◆ MarkMap

template<GUM_Numeric GUM_SCALAR>
using gum::prm::StructuredBayesBall< GUM_SCALAR >::MarkMap = HashTable< NodeId, std::pair< bool, bool > >
private

Code alias.

Definition at line 137 of file structuredBayesBall.h.

Constructor & Destructor Documentation

◆ StructuredBayesBall() [1/2]

template<GUM_Numeric GUM_SCALAR>
gum::prm::StructuredBayesBall< GUM_SCALAR >::StructuredBayesBall ( const PRMInference< GUM_SCALAR > & inference)

Default Constructor.

Definition at line 267 of file structuredBayesBall_tpl.h.

268 : _inf_(&inference) {
270 }
<agrum/PRM/structuredBayesBall.h>
const PRMInference< GUM_SCALAR > * _inf_
The PRM at which model belongs.
StructuredBayesBall(const PRMInference< GUM_SCALAR > &inference)
Default Constructor.

References StructuredBayesBall(), and _inf_.

Referenced by StructuredBayesBall(), StructuredBayesBall(), and ~StructuredBayesBall().

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

◆ ~StructuredBayesBall()

template<GUM_Numeric GUM_SCALAR>
gum::prm::StructuredBayesBall< GUM_SCALAR >::~StructuredBayesBall ( )

Destructor.

Definition at line 57 of file structuredBayesBall_tpl.h.

57 {
59
60 for (const auto& elt: _reqMap_)
61 delete elt.second.first;
62 }
HashTable< std::string, std::pair< Set< NodeId > *, Size > > _reqMap_
Associate a Key with the set of requisite nodes associated with it. The Size value is the number of i...

References StructuredBayesBall(), and _reqMap_.

Here is the call graph for this function:

◆ StructuredBayesBall() [2/2]

template<GUM_Numeric GUM_SCALAR>
gum::prm::StructuredBayesBall< GUM_SCALAR >::StructuredBayesBall ( const StructuredBayesBall< GUM_SCALAR > & source)
private

Copy constructor.

References StructuredBayesBall().

Here is the call graph for this function:

Member Function Documentation

◆ _buildHashKey_()

template<GUM_Numeric GUM_SCALAR>
std::string gum::prm::StructuredBayesBall< GUM_SCALAR >::_buildHashKey_ ( const PRMInstance< GUM_SCALAR > * i,
Set< NodeId > & req_nodes )
private

Builds the HashKey for the given instance and requisite nodes set.

Definition at line 256 of file structuredBayesBall_tpl.h.

257 {
258 std::string result(i->type().name());
259
260 for (const auto node: i->type().containerDag().nodes())
261 if (req_nodes.exists(node)) result += std::format("-{}", node);
262
263 return result;
264 }
bool exists(const PRMInstance< GUM_SCALAR > *i) const
Returns true if i has requisite nodes.

References gum::Set< Key >::exists(), and gum::prm::PRMInstance< GUM_SCALAR >::type().

Referenced by _fillMaps_().

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

◆ _clean_()

template<GUM_Numeric GUM_SCALAR>
void gum::prm::StructuredBayesBall< GUM_SCALAR >::_clean_ ( )
private

Cleans this before a new computation.

Definition at line 65 of file structuredBayesBall_tpl.h.

65 {
66 for (const auto& elt: _reqMap_)
67 delete elt.second.first;
68
69 _keyMap_.clear();
70 _reqMap_.clear();
71 }
HashTable< const PRMInstance< GUM_SCALAR > *, std::pair< std::string, Set< NodeId > * > > _keyMap_
Associate an PRMInstance<GUM_SCALAR> with a unique key w.r.t. d-separation and the set of requisite n...

References _keyMap_, and _reqMap_.

Referenced by _compute_().

Here is the caller graph for this function:

◆ _compute_()

template<GUM_Numeric GUM_SCALAR>
void gum::prm::StructuredBayesBall< GUM_SCALAR >::_compute_ ( const PRMInstance< GUM_SCALAR > * i,
NodeId n )
private

The real compute method.

Definition at line 96 of file structuredBayesBall_tpl.h.

97 {
98 _clean_();
102 _fromChild_(i, n, marks);
104
105 for (const auto& elt: marks)
106 delete elt.second;
107 }
void _clean_()
Cleans this before a new computation.
void _fillMaps_(InstanceMap &marks)
Fill keyMap and reqMap.
void _fromChild_(const PRMInstance< GUM_SCALAR > *i, NodeId n, InstanceMap &marks)
When the ball is received on i->get(n) from a child.

References _clean_(), _fillMaps_(), and _fromChild_().

Referenced by compute(), and compute().

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

◆ _fillMaps_()

template<GUM_Numeric GUM_SCALAR>
void gum::prm::StructuredBayesBall< GUM_SCALAR >::_fillMaps_ ( InstanceMap & marks)
private

Fill keyMap and reqMap.

Definition at line 214 of file structuredBayesBall_tpl.h.

214 {
215 // First find for each instance it's requisite nodes
217
218 for (const auto& elt: marks) {
220
221 for (const auto& elt2: *elt.second)
222 if (elt2.second.first) req_set->insert(elt2.first);
223
224 req_map.insert(elt.first, req_set);
225 }
226
227 // Remove all instances with 0 requisite nodes
229
230 for (const auto& elt: req_map)
231 if (elt.second->size() == 0) to_remove.insert(elt.first);
232
233 for (const auto remo: to_remove) {
234 delete req_map[remo];
235 req_map.erase(remo);
236 }
237
238 // Fill _reqMap_ and _keyMap_
239 for (const auto& elt: req_map) {
240 std::string key = _buildHashKey_(elt.first, *elt.second);
241
242 if (auto p_req = _reqMap_.tryGet(key)) {
243 _keyMap_.insert(elt.first, std::pair< std::string, Set< NodeId >* >(key, p_req->first));
244 p_req->second += 1;
245 delete elt.second;
246 req_map[elt.first] = 0;
247 } else {
248 _reqMap_.insert(key, std::pair< Set< NodeId >*, Size >(elt.second, 1));
249 _keyMap_.insert(elt.first, std::pair< std::string, Set< NodeId >* >(key, elt.second));
250 }
251 }
252 }
std::string _buildHashKey_(const PRMInstance< GUM_SCALAR > *i, Set< NodeId > &req_nodes)
Builds the HashKey for the given instance and requisite nodes set.
const std::string & key(const PRMInstance< GUM_SCALAR > *i) const
Returns a unique key w.r.t. d-separation for i.

References _buildHashKey_(), _keyMap_, _reqMap_, gum::HashTable< Key, Val >::erase(), gum::HashTable< Key, Val >::insert(), gum::Set< Key >::insert(), and key().

Referenced by _compute_().

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

◆ _fromChild_()

template<GUM_Numeric GUM_SCALAR>
void gum::prm::StructuredBayesBall< GUM_SCALAR >::_fromChild_ ( const PRMInstance< GUM_SCALAR > * i,
NodeId n,
InstanceMap & marks )
private

When the ball is received on i->get(n) from a child.

Definition at line 110 of file structuredBayesBall_tpl.h.

112 {
113 auto p_marks = marks.tryGet(i);
114 if (!p_marks) {
116 p_marks = marks.tryGet(i);
117 }
118
119 if (!(*p_marks)->exists(n)) { (*p_marks)->insert(n, std::pair< bool, bool >(false, false)); }
120
121 // Sending message to parents
122 switch (i->type().get(n).elt_type()) {
124 if (!_getMark_(marks, i, n).first) {
125 _getMark_(marks, i, n).first = true;
126
127 for (const auto inst: i->getInstances(n))
128 _fromChild_(inst, inst->get(_getSC_(i, n).lastElt().safeName()).id(), marks);
129 }
130
131 if (!_getMark_(marks, i, n).second) {
132 _getMark_(marks, i, n).second = true;
133
134 for (const auto chi: i->type().containerDag().children(n))
136 }
137
138 break;
139 }
140
143 if (!_getMark_(marks, i, n).first) {
144 _getMark_(marks, i, n).first = true;
145
146 if (!_isHardEvidence_(i, n))
147 for (const auto par: i->type().containerDag().parents(n))
149 }
150
151 if (!_getMark_(marks, i, n).second) {
152 _getMark_(marks, i, n).second = true;
153
154 // In i.
155 for (const auto chi: i->type().containerDag().children(n))
157
158 // Out of i.
159 if (i->hasRefAttr(n)) {
160 const auto& refs = i->getRefAttr(n);
161
162 for (auto iter = refs.begin(); iter != refs.end(); ++iter)
163 _fromParent_(iter->first, iter->first->type().get(iter->second).id(), marks);
164 }
165 }
166
167 break;
168 }
169
170 default : {
171 // We shouldn't reach any other PRMClassElement<GUM_DATA> than
172 // PRMAttribute
173 // or
174 // PRMSlotChain<GUM_SCALAR>.
175 GUM_ERROR(FatalError, "This case is impossible.")
176 }
177 }
178 }
std::pair< bool, bool > & _getMark_(InstanceMap &marks, const PRMInstance< GUM_SCALAR > *i, NodeId n)
Code alias.
const PRMSlotChain< GUM_SCALAR > & _getSC_(const PRMInstance< GUM_SCALAR > *i, NodeId n)
Code alias.
void _fromParent_(const PRMInstance< GUM_SCALAR > *i, NodeId n, InstanceMap &marks)
When the ball is receive on i->get(n) from a parent.
bool _isHardEvidence_(const PRMInstance< GUM_SCALAR > *i, NodeId n)
Returns true if there is a hard evidence on i->get(n).
#define GUM_ERROR(type, msg)
Definition exceptions.h:76

References _fromChild_(), _fromParent_(), _getMark_(), _getSC_(), _isHardEvidence_(), gum::prm::PRMInstance< GUM_SCALAR >::getInstances(), gum::prm::PRMInstance< GUM_SCALAR >::getRefAttr(), GUM_ERROR, gum::prm::PRMInstance< GUM_SCALAR >::hasRefAttr(), gum::HashTable< Key, Val >::insert(), gum::prm::PRMClassElement< GUM_SCALAR >::prm_aggregate, gum::prm::PRMClassElement< GUM_SCALAR >::prm_attribute, gum::prm::PRMClassElement< GUM_SCALAR >::prm_slotchain, gum::HashTable< Key, Val >::tryGet(), and gum::prm::PRMInstance< GUM_SCALAR >::type().

Referenced by _compute_(), _fromChild_(), and _fromParent_().

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

◆ _fromParent_()

template<GUM_Numeric GUM_SCALAR>
void gum::prm::StructuredBayesBall< GUM_SCALAR >::_fromParent_ ( const PRMInstance< GUM_SCALAR > * i,
NodeId n,
InstanceMap & marks )
private

When the ball is receive on i->get(n) from a parent.

Definition at line 181 of file structuredBayesBall_tpl.h.

183 {
184 auto p_marks = marks.tryGet(i);
185 if (!p_marks) {
187 p_marks = marks.tryGet(i);
188 }
189
190 if (!(*p_marks)->exists(n)) { (*p_marks)->insert(n, std::pair< bool, bool >(false, false)); }
191
192 // Concerns only PRMAttribute (because of the hard evidence)
193 if ((_isHardEvidence_(i, n)) && (!_getMark_(marks, i, n).first)) {
194 _getMark_(marks, i, n).first = true;
195
196 for (const auto par: i->type().containerDag().parents(n))
198 } else if (!_getMark_(marks, i, n).second) {
199 _getMark_(marks, i, n).second = true;
200
201 // In i.
202 for (const auto chi: i->type().containerDag().children(n))
204
205 // Out of i.
206 if (i->hasRefAttr(n)) {
207 for (auto iter = i->getRefAttr(n).begin(); iter != i->getRefAttr(n).end(); ++iter)
208 _fromParent_(iter->first, iter->first->type().get(iter->second).id(), marks);
209 }
210 }
211 }

References _fromChild_(), _fromParent_(), _getMark_(), _isHardEvidence_(), gum::prm::PRMInstance< GUM_SCALAR >::getRefAttr(), gum::prm::PRMInstance< GUM_SCALAR >::hasRefAttr(), gum::HashTable< Key, Val >::insert(), gum::HashTable< Key, Val >::tryGet(), and gum::prm::PRMInstance< GUM_SCALAR >::type().

Referenced by _fromChild_(), and _fromParent_().

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

◆ _getMark_()

template<GUM_Numeric GUM_SCALAR>
std::pair< bool, bool > & gum::prm::StructuredBayesBall< GUM_SCALAR >::_getMark_ ( InstanceMap & marks,
const PRMInstance< GUM_SCALAR > * i,
NodeId n )
private

Code alias.

Definition at line 347 of file structuredBayesBall_tpl.h.

349 {
350 return (*(marks[i]))[n];
351 }

Referenced by _fromChild_(), and _fromParent_().

Here is the caller graph for this function:

◆ _getSC_()

template<GUM_Numeric GUM_SCALAR>
const PRMSlotChain< GUM_SCALAR > & gum::prm::StructuredBayesBall< GUM_SCALAR >::_getSC_ ( const PRMInstance< GUM_SCALAR > * i,
NodeId n )
private

Code alias.

Definition at line 341 of file structuredBayesBall_tpl.h.

341 {
342 return static_cast< const PRMSlotChain< GUM_SCALAR >& >(i->type().get(n));
343 }

References gum::prm::PRMInstance< GUM_SCALAR >::type().

Referenced by _fromChild_().

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

◆ _isHardEvidence_()

template<GUM_Numeric GUM_SCALAR>
bool gum::prm::StructuredBayesBall< GUM_SCALAR >::_isHardEvidence_ ( const PRMInstance< GUM_SCALAR > * i,
NodeId n )

Returns true if there is a hard evidence on i->get(n).

Definition at line 74 of file structuredBayesBall_tpl.h.

75 {
76 if (!i->exists(n)) return false;
78
79 if (_inf_->hasEvidence(chain)) {
80 const Tensor< GUM_SCALAR >* e = _inf_->evidence(i)[n];
82 Size count = 0;
83
84 for (inst.setFirst(); !inst.end(); inst.inc()) {
85 if ((e->get(inst) == (GUM_SCALAR)1.0)) ++count;
86 else if (e->get(inst) != (GUM_SCALAR)0.0) return false;
87 }
88
89 return (count == 1);
90 }
91
92 return false;
93 }

References _inf_, gum::Instantiation::end(), gum::prm::PRMInstance< GUM_SCALAR >::exists(), gum::prm::PRMInstance< GUM_SCALAR >::get(), gum::Instantiation::inc(), and gum::Instantiation::setFirst().

Referenced by _fromChild_(), and _fromParent_().

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

◆ compute() [1/2]

template<GUM_Numeric GUM_SCALAR>
void gum::prm::StructuredBayesBall< GUM_SCALAR >::compute ( const PRMInstance< GUM_SCALAR > & i,
NodeId n )

Compute the set or requisite nodes for each required instance given the current set of observations. Discard previous computations.

Definition at line 335 of file structuredBayesBall_tpl.h.

335 {
336 _compute_(&i, n);
337 }
void _compute_(const PRMInstance< GUM_SCALAR > *i, NodeId n)
The real compute method.

References _compute_().

Here is the call graph for this function:

◆ compute() [2/2]

template<GUM_Numeric GUM_SCALAR>
void gum::prm::StructuredBayesBall< GUM_SCALAR >::compute ( const PRMInstance< GUM_SCALAR > * i,
NodeId n )

Compute the set or requisite nodes for each required instance given the current set of observations. Discard previous computations.

Definition at line 330 of file structuredBayesBall_tpl.h.

330 {
331 _compute_(i, n);
332 }

References _compute_().

Here is the call graph for this function:

◆ exists() [1/2]

template<GUM_Numeric GUM_SCALAR>
bool gum::prm::StructuredBayesBall< GUM_SCALAR >::exists ( const PRMInstance< GUM_SCALAR > & i) const

Returns true if i has requisite nodes.

Definition at line 325 of file structuredBayesBall_tpl.h.

325 {
326 return _keyMap_.exists(&i);
327 }

References _keyMap_.

◆ exists() [2/2]

template<GUM_Numeric GUM_SCALAR>
bool gum::prm::StructuredBayesBall< GUM_SCALAR >::exists ( const PRMInstance< GUM_SCALAR > * i) const

Returns true if i has requisite nodes.

Definition at line 320 of file structuredBayesBall_tpl.h.

320 {
321 return _keyMap_.exists(i);
322 }

References _keyMap_.

◆ key() [1/2]

template<GUM_Numeric GUM_SCALAR>
const std::string & gum::prm::StructuredBayesBall< GUM_SCALAR >::key ( const PRMInstance< GUM_SCALAR > & i) const

Returns a unique key w.r.t. d-separation for i.

Definition at line 293 of file structuredBayesBall_tpl.h.

293 {
294 return _keyMap_[&i].first;
295 }

References _keyMap_.

◆ key() [2/2]

template<GUM_Numeric GUM_SCALAR>
const std::string & gum::prm::StructuredBayesBall< GUM_SCALAR >::key ( const PRMInstance< GUM_SCALAR > * i) const

Returns a unique key w.r.t. d-separation for i.

Definition at line 287 of file structuredBayesBall_tpl.h.

287 {
288 return _keyMap_[i].first;
289 }

References _keyMap_.

Referenced by _fillMaps_(), and occurrence().

Here is the caller graph for this function:

◆ liftRatio()

template<GUM_Numeric GUM_SCALAR>
float gum::prm::StructuredBayesBall< GUM_SCALAR >::liftRatio ( ) const

Returns the ratio between the total number of instances and the number of instances with the same configuration.

Definition at line 315 of file structuredBayesBall_tpl.h.

315 {
316 return ((float)_reqMap_.size()) / ((float)_keyMap_.size());
317 }

References _keyMap_, and _reqMap_.

◆ occurrence()

template<GUM_Numeric GUM_SCALAR>
Size gum::prm::StructuredBayesBall< GUM_SCALAR >::occurrence ( std::string_view key) const

Returns the number of occurrence of the given key, which is the number of PRMInstance<GUM_SCALAR> sharing the same set of requisite nodes.

Definition at line 310 of file structuredBayesBall_tpl.h.

310 {
311 return _reqMap_[std::string{key}].second;
312 }

References _reqMap_, and key().

Here is the call graph for this function:

◆ operator=()

template<GUM_Numeric GUM_SCALAR>
StructuredBayesBall< GUM_SCALAR > & gum::prm::StructuredBayesBall< GUM_SCALAR >::operator= ( const StructuredBayesBall< GUM_SCALAR > & source)
private

Copy operator.

Definition at line 280 of file structuredBayesBall_tpl.h.

281 {
282 GUM_ERROR(FatalError, "Not allowed.")
283 }

References GUM_ERROR.

◆ requisiteNodes() [1/2]

template<GUM_Numeric GUM_SCALAR>
const Set< NodeId > & gum::prm::StructuredBayesBall< GUM_SCALAR >::requisiteNodes ( const PRMInstance< GUM_SCALAR > & i) const

Returns the set of requisite nodes w.r.t. d-separation for i.

Definition at line 304 of file structuredBayesBall_tpl.h.

305 {
306 return *(_keyMap_[&i].second);
307 }

References _keyMap_.

◆ requisiteNodes() [2/2]

template<GUM_Numeric GUM_SCALAR>
const Set< NodeId > & gum::prm::StructuredBayesBall< GUM_SCALAR >::requisiteNodes ( const PRMInstance< GUM_SCALAR > * i) const

Returns the set of requisite nodes w.r.t. d-separation for i.

Definition at line 298 of file structuredBayesBall_tpl.h.

299 {
300 return *(_keyMap_[i].second);
301 }

References _keyMap_.

Member Data Documentation

◆ _inf_

template<GUM_Numeric GUM_SCALAR>
const PRMInference< GUM_SCALAR >* gum::prm::StructuredBayesBall< GUM_SCALAR >::_inf_
private

The PRM at which model belongs.

Definition at line 165 of file structuredBayesBall.h.

Referenced by StructuredBayesBall(), and _isHardEvidence_().

◆ _keyMap_

template<GUM_Numeric GUM_SCALAR>
HashTable< const PRMInstance< GUM_SCALAR >*, std::pair< std::string, Set< NodeId >* > > gum::prm::StructuredBayesBall< GUM_SCALAR >::_keyMap_
private

Associate an PRMInstance<GUM_SCALAR> with a unique key w.r.t. d-separation and the set of requisite nodes deduced from d-separation analysis.

Definition at line 172 of file structuredBayesBall.h.

Referenced by _clean_(), _fillMaps_(), exists(), exists(), key(), key(), liftRatio(), requisiteNodes(), and requisiteNodes().

◆ _reqMap_

template<GUM_Numeric GUM_SCALAR>
HashTable< std::string, std::pair< Set< NodeId >*, Size > > gum::prm::StructuredBayesBall< GUM_SCALAR >::_reqMap_
private

Associate a Key with the set of requisite nodes associated with it. The Size value is the number of instance with the same key.

Definition at line 176 of file structuredBayesBall.h.

Referenced by ~StructuredBayesBall(), _clean_(), _fillMaps_(), liftRatio(), and occurrence().


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