My Project
twoDimensionalStatistics.h
Go to the documentation of this file.
1/* TwoDimensionalStatistics.h
2 */
3#ifndef _STAT_TWODIMENSIONALSTATISTICS_H
4#define _STAT_TWODIMENSIONALSTATISTICS_H
5
6#include <memory>
7#include <cstddef>
8
9namespace osl
10{
11 namespace stat
12 {
14 {
15 class Data;
16 std::unique_ptr<Data> m_data;
17 public:
18 // CREATORS
21 // MANIPULATORS
22 void add(const double& x, const double& y);
24 void clear();
25 // ACCESSORS
26 double averageX() const;
27 double averageY() const;
28 double averageX2() const;
29 double averageY2() const;
30 double averageXY() const;
31 double meanSquaredErrors() const;
33 size_t size() const;
34 double correlation() const;
36 void fitting(double& a, double& b, double& residual) const;
37 private:
38 // NoCopy
41 };
42
43 } // namespace stat
44} // namespace osl
45
46
47#endif /* _STAT_TWODIMENSIONALSTATISTICS_H */
48// ;;; Local Variables:
49// ;;; mode:c++
50// ;;; c-basic-offset:2
51// ;;; End:
TwoDimensionalStatistics & operator=(const TwoDimensionalStatistics &)
void fitting(double &a, double &b, double &residual) const
ax + b = y
void merge(const TwoDimensionalStatistics &)
void add(const double &x, const double &y)
TwoDimensionalStatistics(const TwoDimensionalStatistics &)