Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-02 08:48:24

0001 #ifndef ERRORS_H
0002 #define ERRORS_H
0003 
0004 /**
0005  * @file Errors.h
0006  * @author Bryan BERTHOU (SPhN / CEA Saclay)
0007  * @date 21 March 2016
0008  * @version 1.0
0009  */
0010 
0011 namespace NumA {
0012 
0013 /**
0014  * @class Errors
0015  *
0016  * @brief Class for defining estimations of absolute and relative errors.
0017  */
0018 class Errors {
0019 public:
0020     /**
0021      * Default constructor (errors equal to 0).
0022      */
0023     Errors();
0024     /**
0025      * Constructor.
0026      * @param absolute Absolute error.
0027      * @param relative Relative error.
0028      */
0029     Errors(const double absolute, const double relative);
0030     /**
0031      * Default destructor.
0032      */
0033     virtual ~Errors();
0034 
0035     // ##### GETTERS & SETTERS #####
0036 
0037     /**
0038      *
0039      * @return Absolute error.
0040      */
0041     double getAbsolute() const;
0042     /**
0043      *
0044      * @param absolute Absolute error.
0045      */
0046     void setAbsolute(double absolute);
0047     /**
0048      *
0049      * @return Relative error.
0050      */
0051     double getRelative() const;
0052     /**
0053      *
0054      * @param relative Relative error.
0055      */
0056     void setRelative(double relative);
0057 
0058 private:
0059     double m_absolute; ///< Absolute error.
0060     double m_relative; ///< Relative error.
0061 };
0062 
0063 } /* namespace NumA */
0064 
0065 #endif /* ERRORS_H */