Parasol Planning Library (PPL)
GaussianSampler.h
Go to the documentation of this file.
1 #ifndef GAUSSIAN_SAMPLER_H_
2 #define GAUSSIAN_SAMPLER_H_
3 
4 #include "SamplerMethod.h"
5 
18 
19  public:
20 
21  GaussianSampler(string _vcLabel = "", string _dmLabel = "",
22  double _d = 0.5, bool _useBoundary = false);
23 
24  GaussianSampler(XMLNode& _node);
25 
26  void ParseXML(XMLNode& _node);
27 
28  virtual void Print(ostream& _os) const;
29 
30  virtual bool Sampler(Cfg& _cfg, const Boundary* const _boundary,
31  vector<Cfg>& _result, vector<Cfg>& _collision);
32 
33  // Functions to change parameters that can't be controlled on XML.
34  void ChangeGaussianParams(double newMean, double newStd);
35  void ReturnNewSamplesOnly(bool setting);
36 
37  private:
38  // from XML.
39  double m_d; //Gaussian d-value obtained from distribution
40  bool m_useBoundary; //Use Bbox as an obstacle?
41  string m_vcLabel, m_dmLabel;
42 
43  // Non-XML: For if we wish to internally override mean and standard deviation:
44  double mean;
45  double std;
46  // if we want only the new samples generated by the normal distribution. no means.
47  bool newSamplesOnly{false};
48 };
49 
50 #endif
Definition: Boundary.h:30
Definition: Cfg.h:38
Gaussian-distribution based sampling.
Definition: GaussianSampler.h:17
void ChangeGaussianParams(double newMean, double newStd)
Definition: GaussianSampler.cpp:156
void ParseXML(XMLNode &_node)
Definition: GaussianSampler.cpp:25
GaussianSampler(string _vcLabel="", string _dmLabel="", double _d=0.5, bool _useBoundary=false)
Definition: GaussianSampler.cpp:7
virtual bool Sampler(Cfg &_cfg, const Boundary *const _boundary, vector< Cfg > &_result, vector< Cfg > &_collision)
Definition: GaussianSampler.cpp:54
void ReturnNewSamplesOnly(bool setting)
Definition: GaussianSampler.cpp:169
virtual void Print(ostream &_os) const
Definition: GaussianSampler.cpp:41
Definition: SamplerMethod.h:70
Definition: XMLNode.h:27