Bayeux  3.4.1
Core Foundation library for SuperNEMO
rectangular_function.h
Go to the documentation of this file.
1 #ifndef MYGSL_RECTANGULAR_FUNCTION_H
2 #define MYGSL_RECTANGULAR_FUNCTION_H
3 
4 // Third party:
5 // - Bayeux/datatools :
7 
8 // This project:
10 
11 namespace mygsl {
12 
27  : public i_unary_function,
29  {
30  public:
31 
38  };
39 
42 
44  virtual ~rectangular_function();
45 
47  void set_convention(convention_type convention_);
48 
51 
53  virtual bool is_initialized() const;
54 
56  virtual void initialize(const datatools::properties & config_,
57  const unary_function_dict_type & functors_);
58 
60  virtual void reset();
61 
63  double get_non_zero_domain_min() const;
64 
66  double get_non_zero_domain_max() const;
67 
69  virtual void tree_dump(std::ostream & out_ = std::clog,
70  const std::string & title_ = "",
71  const std::string & indent_ = "",
72  bool inherit_ = false) const;
73 
74  protected:
75 
77  double _eval(double x_) const;
78 
80  void _set_defaults();
81 
82  private:
83 
85 
88 
89 
91 
92  };
93 
94 } // namespace mygsl
95 
96 #endif // MYGSL_RECTANGULAR_FUNCTION_H
97 
98 // Local Variables: --
99 // mode: c++ --
100 // c-file-style: "gnu" --
101 // tab-width: 2 --
102 // End: --
#define DATATOOLS_CLONEABLE_DECLARATION(Copyable)
Definition: i_cloneable.h:113
Rectangular function (unit pulse)
Definition: rectangular_function.h:26
convention_type get_convention() const
Return the convention.
convention_type
Definition: rectangular_function.h:32
Definition: rectangular_function.h:34
virtual void reset()
Reset the function.
virtual bool is_initialized() const
Check initialization status.
virtual void initialize(const datatools::properties &config_, const unary_function_dict_type &functors_)
Initialization from a container of parameters and a dictionary of functors.
double get_non_zero_domain_min() const
The minimum bound of the non-zero domain (default is plus infinity)
double get_non_zero_domain_max() const
The maximum bound of the non-zero domain (default is plus infinity)
double _eval(double x_) const
Evaluation.
Abstract interface for unary functions : R -> R.
Definition: i_unary_function.h:44
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart printing.
Top-level namespace of the Bayeux/mygsl module library.
Definition: base_decay_driver.h:47
A pure abstract class (interface) for inherited cloneable classes.
Definition: i_cloneable.h:75
void _set_defaults()
Set default attributes values.
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
Definition: rectangular_function.h:33
void set_convention(convention_type convention_)
Set the convention.
virtual ~rectangular_function()
Destructor.
rectangular_function(convention_type convention_=CONVENTION_INVALID)
Default constructor.
Definition: rectangular_function.h:37
A dictionary of arbitrary properties.
Definition: properties.h:125