22 #ifndef __MULTIPLE_INFERENCE_ENGINES__H__ 23 #define __MULTIPLE_INFERENCE_ENGINES__H__ 34 #include <agrum/BN/inference/lazyPropagation.h> 35 #include <agrum/CN/inference/inferenceEngine.h> 53 template <
typename GUM_SCALAR,
class BNInferenceEngine >
86 const std::vector< GUM_SCALAR >& vertex,
87 const bool& elimRedund);
136 const bool _storeVertices_,
137 const bool _storeBNOpt_);
156 const std::vector< GUM_SCALAR >& vertex,
157 const bool& elimRedund =
false);
229 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 238 #include <agrum/CN/inference/multipleInferenceEngine_tpl.h>
_credalSets_ l_marginalSets_
Threads vertices.
_margis_ l_marginalMin_
Threads lower marginals, one per thread.
_modals_ l_modal_
Threads modalities.
_clusters_ l_clusters_
Threads clusters.
INLINE void emplace(Args &&... args)
virtual void makeInference()=0
To be redefined by each credal net algorithm.
NodeProperty< GUM_SCALAR > _expe_
_margis_ l_evidence_
Threads evidence.
_expes_ l_expectationMax_
Threads upper expectations, one per thread.
std::vector< _credalSet_ > _credalSets_
MultipleInferenceEngine(const CredalNet< GUM_SCALAR > &credalNet)
Constructor.
virtual void eraseAllEvidence()
Erase all inference related data to perform another one.
_margis_ l_marginalMax_
Threads upper marginals, one per thread.
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...
_expes_ l_expectationMin_
Threads lower expectations, one per thread.
void expFusion_()
Fusion of threads expectations.
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.
std::vector< VarMod2BNsMap< GUM_SCALAR > *> l_optimalNet_
Threads optimal IBayesNet.
void updateMarginals_()
Fusion of threads marginals.
void optFusion_()
Fusion of threads optimal IBayesNet.
const GUM_SCALAR computeEpsilon_()
Compute epsilon and update old marginals.
IBayesNet< GUM_SCALAR > _bnet_
virtual ~MultipleInferenceEngine()
Destructor.
InferenceEngine< GUM_SCALAR > _infE_
To easily access InferenceEngine< GUM_SCALAR > methods.
void updateOldMarginals_()
Update old marginals (from current marginals).
std::vector< _margi_ > _margis_
void initThreadsData_(const Size &num_threads, const bool _storeVertices_, const bool _storeBNOpt_)
Initialize threads data.
std::vector< _expe_ > _expes_
namespace for all credal networks entities