23 #ifndef __MULTIPLE_INFERENCE_ENGINES__H__ 24 #define __MULTIPLE_INFERENCE_ENGINES__H__ 54 template <
typename GUM_SCALAR,
class BNInferenceEngine >
69 typedef std::vector< std::vector< __cluster > >
__clusters;
71 typedef typename std::vector<
89 const std::vector< GUM_SCALAR >& vertex,
90 const bool& elimRedund);
113 typename std::vector< List< const Potential< GUM_SCALAR >* >* >
_workingSetE;
139 const bool __storeVertices,
140 const bool __storeBNOpt);
159 const std::vector< GUM_SCALAR >& vertex,
160 const bool& elimRedund =
false);
232 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS std::vector< __credalSet > __credalSets
std::vector< BNInferenceEngine *> _l_inferenceEngine
Threads BNInferenceEngine.
NodeProperty< std::vector< std::vector< GUM_SCALAR > > > __credalSet
void _initThreadsData(const Size &num_threads, const bool __storeVertices, const bool __storeBNOpt)
Initialize threads data.
__expes _l_expectationMin
Threads lower expectations, one per thread.
NodeProperty< std::vector< NodeId > > __cluster
std::vector< __margi > __margis
virtual void makeInference()=0
To be redefined by each credal net algorithm.
void _optFusion()
Fusion of threads optimal IBayesNet.
__margis _l_marginalMin
Threads lower marginals, one per thread.
void _expFusion()
Fusion of threads expectations.
Class representing the minimal interface for Bayesian Network.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
IBayesNet< GUM_SCALAR > __bnet
std::vector< List< const Potential< GUM_SCALAR > *> *> _workingSetE
Threads evidence.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
MultipleInferenceEngine(const CredalNet< GUM_SCALAR > &credalNet)
Constructor.
virtual void eraseAllEvidence()
Erase all inference related data to perform another one.
The class for generic Hash Tables.
std::vector< VarMod2BNsMap< GUM_SCALAR > *> _l_optimalNet
Threads optimal IBayesNet.
std::vector< __bnet *> _workingSet
Threads IBayesNet.
Class template representing a Credal Network.
__margis _l_evidence
Threads evidence.
void _updateMarginals()
Fusion of threads marginals.
NodeProperty< GUM_SCALAR > __expe
std::vector< __expe > __expes
void _updateOldMarginals()
Update old marginals (from current marginals).
__expes _l_expectationMax
Threads upper expectations, one per thread.
__clusters _l_clusters
Threads clusters.
Abstract class template representing a CredalNet inference engine.
std::vector< std::vector< __cluster > > __clusters
const CredalNet< GUM_SCALAR > & credalNet()
Get this creadal network.
std::vector< HashTable< std::string, std::vector< GUM_SCALAR > > > __modals
bool _updateThread(const NodeId &id, const std::vector< GUM_SCALAR > &vertex, const bool &elimRedund=false)
Update thread information (marginals, expectations, IBayesNet, vertices) for a given node id...
virtual ~MultipleInferenceEngine()
Destructor.
<agrum/BN/inference/lazyPropagation.h>
__modals _l_modal
Threads modalities.
NodeProperty< std::vector< GUM_SCALAR > > __margi
Class template representing a CredalNet inference engine using one or more IBayesNet inference engine...
__margis _l_marginalMax
Threads upper marginals, one per thread.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
InferenceEngine< GUM_SCALAR > __infE
To easily access InferenceEngine< GUM_SCALAR > methods.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
__credalSets _l_marginalSets
Threads vertices.
void __updateThreadCredalSets(const NodeId &id, const std::vector< GUM_SCALAR > &vertex, const bool &elimRedund)
Ask for redundancy elimination of a node credal set of a calling thread.
Size NodeId
Type for node ids.
const GUM_SCALAR _computeEpsilon()
Compute epsilon and update old marginals.