Bayeux  3.4.1
Core Foundation library for SuperNEMO
best_value.h
Go to the documentation of this file.
1 
3 #ifndef MYGSL_BEST_VALUE_H
4 #define MYGSL_BEST_VALUE_H 1
5 
6 // Standard library:
7 #include <iostream>
8 
9 // Third party:
10 // - Bayeux/datatools:
12 
14 namespace mygsl {
15 
18  {
19  public:
20 
21  operator double () const;
22  void set_value (double value_);
23  void set_error_low (double error_low_);
24  void set_error_high (double error_lhigh_);
25  void set_confidence_level (double confidence_level_);
26 
27  bool has_errors () const;
28  bool is_symmetric_error () const;
29  bool has_value () const;
30  bool has_confidence_level () const;
31 
32  void reset ();
33  void unset_errors ();
34  void unset_value ();
35  void unset_confidence_level ();
36 
37  double get_value () const;
38  double get_min_value () const;
39  double get_max_value () const;
40  double get_error_low () const;
41  double get_error_high () const;
42  double get_confidence_level () const;
43 
44  best_value ();
45 
46  best_value (double value_);
47 
48  best_value (double value_,
49  double error_);
50 
51  best_value (double value_,
52  double error_,
53  double CL_);
54 
55  best_value (double value_,
56  double error_low_,
57  double error_high_,
58  double CL_);
59 
60  virtual ~best_value ();
61 
62  private:
63 
64  double _value_;
65  double _error_low_;
66  double _error_high_;
67  double _confidence_level_;
68 
70 
71  };
72 
73  std::ostream & operator<< (std::ostream & out_, const best_value & bv_);
74 
75 } // namespace mygsl
76 
77 #endif // MYGSL_BEST_VALUE_H
78 
79 // Local Variables:
80 // mode: c++
81 // coding: utf-8
82 // End:
double get_value() const
Base abstract class of all serializable (and possibly introspectable) classes.
Definition: i_serializable.h:51
void set_error_high(double error_lhigh_)
bool has_value() const
double get_error_low() const
std::ostream & operator<<(std::ostream &out_, const best_value &bv_)
void unset_confidence_level()
A data structure representing a numeric value and its associated error.
Definition: best_value.h:17
void set_confidence_level(double confidence_level_)
double get_max_value() const
#define DATATOOLS_SERIALIZATION_DECLARATION()
Definition: i_serializable.h:266
double get_error_high() const
virtual ~best_value()
void set_error_low(double error_low_)
double get_min_value() const
void set_value(double value_)
Top-level namespace of the Bayeux/mygsl module library.
Definition: base_decay_driver.h:47
double get_confidence_level() const
bool has_confidence_level() const
bool has_errors() const
bool is_symmetric_error() const