aGrUM  0.17.2
a C++ library for (probabilistic) graphical models
MonteCarloSampling.h
Go to the documentation of this file.
1 
31 #ifndef GUM_MONTE_CARLO_INFERENCE_H
32 #define GUM_MONTE_CARLO_INFERENCE_H
33 
35 
36 namespace gum {
37 
52  template < typename GUM_SCALAR >
53  class MonteCarloSampling: public SamplingInference< GUM_SCALAR > {
54  public:
58  explicit MonteCarloSampling(const IBayesNet< GUM_SCALAR >* bn);
59 
63  ~MonteCarloSampling() override;
64 
65  protected:
67  Instantiation _burnIn() override;
68 
70 
81  Instantiation _draw(GUM_SCALAR* w, Instantiation prev) override;
82  };
83 
84 
85 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
86  extern template class MonteCarloSampling< double >;
87 #endif
88 } // namespace gum
89 
91 
92 #endif
Class representing the minimal interface for Bayesian Network.
Definition: IBayesNet.h:62
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
Definition: agrum.h:25
Instantiation _burnIn() override
draws a defined number of samples without updating the estimators
<agrum/BN/inference/samplingInference.h>
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
~MonteCarloSampling() override
Destructor.
Class for assigning/browsing values to tuples of discrete variables.
Definition: instantiation.h:83
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
Instantiation _draw(GUM_SCALAR *w, Instantiation prev) override
draws a sample according to classic Monte Carlo sampling
MonteCarloSampling(const IBayesNet< GUM_SCALAR > *bn)
Default constructor.