aGrUM  0.17.2
a C++ library for (probabilistic) graphical models
weightedSampling.h
Go to the documentation of this file.
1 
31 #ifndef GUM_WEIGHTED_INFERENCE_H
32 #define GUM_WEIGHTED_INFERENCE_H
33 
35 
36 namespace gum {
37 
50  template < typename GUM_SCALAR >
51  class WeightedSampling: public SamplingInference< GUM_SCALAR > {
52  public:
56  explicit WeightedSampling(const IBayesNet< GUM_SCALAR >* bn);
57 
61  ~WeightedSampling() override;
62 
63  protected:
65  Instantiation _burnIn() override;
66 
68 
79  Instantiation _draw(GUM_SCALAR* w, Instantiation prev) override;
80  };
81 
82 
83 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
84  extern template class WeightedSampling< double >;
85 #endif
86 } // namespace gum
87 
89 
90 #endif
WeightedSampling(const IBayesNet< GUM_SCALAR > *bn)
Default constructor.
~WeightedSampling() override
Destructor.
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
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
<agrum/BN/inference/samplingInference.h>
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
Class for assigning/browsing values to tuples of discrete variables.
Definition: instantiation.h:83
Instantiation _draw(GUM_SCALAR *w, Instantiation prev) override
draws a sample according to Weighted sampling
Instantiation _burnIn() override
draws a defined number of samples without updating the estimators