ConfigParameter.h
Go to the documentation of this file.
1 #ifndef _utl_ConfigParameter_h_
2 #define _utl_ConfigParameter_h_
3 
4 #include <memory>
5 #include <string> // std::string cannot be fwd-declared.
6 
7 
8 namespace utl {
9 
10  class RandomEngine;
11  class VRandomSampler;
12  class Branch;
13 
14 
29  public:
36  typedef double Type;
37 
39  ConfigParameter(utl::RandomEngine& eng, const utl::Branch& configData);
40 
43 
48  Type operator()() const;
49 
51  enum FunctionType {
52  eFixed, //< Constant function.
53  ePDF, //< Probability density distribution.
54  eCDF, //< Cummulative density distribution.
55  eValueList //< The values are taken one-by-one from a list.
56  };
57 
59  static const char* const kFunctionTypeTags[];
60 
81  };
82 
84  static const char* const kParametrizationTags[];
85 
87  static const char* const kInterpolationTags[];
88 
89  private:
91  std::unique_ptr<utl::VRandomSampler> fSampler;
92  mutable Type fLastValue; // placeholder for the last previous value.
93  bool fDelta = false;
94  };
95 
96 }
97 
98 
99 #endif
FunctionType
Type of function to be used.
utl::RandomEngine & fEngine
std::unique_ptr< utl::VRandomSampler > fSampler
Type operator()() const
Class representing a document branch.
Definition: Branch.h:107
ConfigParameter(utl::RandomEngine &eng, const utl::Branch &configData)
Construction giving an engine and a branch from where to load configuration data. ...
Wraps the random number engine used to generate distributions.
Definition: RandomEngine.h:27
~ConfigParameter()
Explicit declaratio+defintion so as to have, when defined, also fully defined the pointed-to type of ...
static const char *const kParametrizationTags[]
Tags for the types of parametrization.
Helper class for configuration of parameters.
static const char *const kInterpolationTags[]
Tags for the types of interpolation.
static const char *const kFunctionTypeTags[]
Tags for the types of functions.

, generated on Tue Sep 26 2023.