21 #ifndef MYGSL_I_UNARY_FUNCTION_WITH_PARAMETERS_H 22 #define MYGSL_I_UNARY_FUNCTION_WITH_PARAMETERS_H 95 virtual void tree_dump(std::ostream & out_ = std::clog,
96 const std::string & title_ =
"",
97 const std::string & indent_ =
"",
98 bool inherit_ =
false)
const;
106 double _eval(
double x_)
const;
117 std::map<std::string, datatools::basic_type> _requested_parameters_;
123 #endif // MYGSL_I_UNARY_FUNCTION_WITH_PARAMETERS_H void register_requested_parameter(const std::string ¶meter_name_, datatools::basic_type parameter_type_)
Register requested parameter.
bool has_parameter_store() const
Check if an external parameter store is set.
virtual void initialize(const datatools::properties &config_, const unary_function_dict_type &functors_)
Initialization from a container of parameters and a dictionary of functors.
virtual ~i_unary_function_with_parameters()
Destructor.
virtual double _eval_from_parameters(double x_) const =0
Evaluation from parameters of the store.
double _eval(double x_) const
Evaluation.
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart printing.
Subscriber.
Definition: parameter_store.h:137
void fetch_parameter(int param_index_, bool &value_) const
Fetch a boolean parameter at given index.
int get_parameter_index(const std::string ¶meter_name_) const
Return the registration index of a parameter given its name.
void set_parameter_store(const parameter_store &store_)
Set an external parameter store.
virtual void reset()
Reset the functor.
Abstract interface for unary functions : R -> R.
Definition: i_unary_function.h:44
Abstract interface for unary functions with derivative.
Definition: i_unary_function_with_parameters.h:39
virtual void _at_parameters_change()=0
Action to perform when some parameters of the store have changed.
Top-level namespace of the Bayeux/mygsl module library.
Definition: base_decay_driver.h:47
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
virtual bool is_initialized() const
Check initialization status.
i_unary_function_with_parameters()
Default constructor.
void reset_parameter_store()
Reset an external parameter store.
void update_parameters()
Update parameter.
Store of parameters.
Definition: parameter_store.h:40
bool is_parameter_set(int param_index_) const
Check if a parameter at given index is set.