Bayeux  3.4.1
Core Foundation library for SuperNEMO
gompertz_function.h
Go to the documentation of this file.
1 #ifndef MYGSL_GOMPERTZ_FUNCTION_H
2 #define MYGSL_GOMPERTZ_FUNCTION_H
3 
4 // Third party:
5 // - Bayeux/datatools :
7 
8 // This project:
10 
11 namespace mygsl {
12 
15  : public i_unary_function,
17  {
18  public:
19 
22 
24  gompertz_function(double asymptote_,
25  double displacement_,
26  double growth_rate_);
27 
29  virtual ~gompertz_function();
30 
32  void set_asymptote(double asymptote_);
33 
35  double get_asymptote() const;
36 
38  void set_displacement(double displacement_);
39 
41  double get_displacement() const;
42 
44  void set_growth_rate(double growth_rate_);
45 
47  double get_growth_rate() const;
48 
50  virtual bool is_initialized() const;
51 
53  virtual void initialize(const datatools::properties & config_,
54  const unary_function_dict_type & functors_);
55 
57  virtual void reset();
58 
60  virtual void tree_dump(std::ostream & out_ = std::clog,
61  const std::string & title_ = "",
62  const std::string & indent_ = "",
63  bool inherit_ = false) const;
64 
65  protected:
66 
68  double _eval(double x_) const;
69 
71  void _set_defaults();
72 
73  private:
74 
75  double _asymptote_;
76  double _displacement_;
77  double _growth_rate_;
78 
81 
82 
84 
85  };
86 
87 } // namespace mygsl
88 
89 #endif // MYGSL_GOMPERTZ_FUNCTION_H
90 
91 // Local Variables: --
92 // mode: c++ --
93 // c-file-style: "gnu" --
94 // tab-width: 2 --
95 // End: --
#define DATATOOLS_CLONEABLE_DECLARATION(Copyable)
Definition: i_cloneable.h:113
double get_displacement() const
Return displacement.
virtual ~gompertz_function()
Destructor.
void _set_defaults()
Set default attributes values.
virtual void initialize(const datatools::properties &config_, const unary_function_dict_type &functors_)
Initialization from a container of parameters and a dictionary of functors.
Gompertz function.
Definition: gompertz_function.h:14
void set_growth_rate(double growth_rate_)
Set growth rate.
virtual void reset()
Reset the function.
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart printing.
void set_asymptote(double asymptote_)
Set asymptote.
Abstract interface for unary functions : R -> R.
Definition: i_unary_function.h:44
double get_growth_rate() const
Return growth rate.
Top-level namespace of the Bayeux/mygsl module library.
Definition: base_decay_driver.h:47
gompertz_function()
Default constructor.
A pure abstract class (interface) for inherited cloneable classes.
Definition: i_cloneable.h:75
double get_asymptote() const
Return asymptote.
std::map< std::string, unary_function_handle_type > unary_function_dict_type
Alias for dictionary of handles to unary function objects.
Definition: unary_function_utils.h:30
#define MYGSL_UNARY_FUNCTOR_REGISTRATION_INTERFACE(UnaryFunctorClass)
Definition: i_unary_function.h:206
double _eval(double x_) const
Evaluation.
void set_displacement(double displacement_)
Set displacement.
virtual bool is_initialized() const
Check initialization status.
A dictionary of arbitrary properties.
Definition: properties.h:125