twoDimensionalStatistics.h
Go to the documentation of this file.
00001 /* TwoDimensionalStatistics.h
00002  */
00003 #ifndef _STAT_TWODIMENSIONALSTATISTICS_H
00004 #define _STAT_TWODIMENSIONALSTATISTICS_H
00005 
00006 #include <boost/scoped_ptr.hpp>
00007 #include <cstddef>
00008 
00009 namespace osl
00010 {
00011   namespace stat
00012   {
00013     class TwoDimensionalStatistics
00014     {
00015       class Data;
00016       boost::scoped_ptr<Data> m_data;
00017     public:
00018       // CREATORS
00019       TwoDimensionalStatistics();
00020       ~TwoDimensionalStatistics();
00021       // MANIPULATORS
00022       void add(const double& x, const double& y);
00023       void merge(const TwoDimensionalStatistics&);
00024       void clear();
00025       // ACCESSORS
00026       double averageX() const;
00027       double averageY() const;
00028       double averageX2() const;
00029       double averageY2() const;
00030       double averageXY() const;
00031       double meanSquaredErrors() const;
00032       double meanSquaredErrorsAdjustConstant() const;
00033       size_t size() const;
00034       double correlation() const;
00036       void fitting(double& a, double& b, double& residual) const;
00037     private:
00038       // NoCopy
00039       TwoDimensionalStatistics(const TwoDimensionalStatistics&);
00040       TwoDimensionalStatistics& operator=(const TwoDimensionalStatistics&);
00041     };
00042 
00043   } // namespace stat
00044 } // namespace osl
00045 
00046 
00047 #endif /* _STAT_TWODIMENSIONALSTATISTICS_H */
00048 // ;;; Local Variables:
00049 // ;;; mode:c++
00050 // ;;; c-basic-offset:2
00051 // ;;; End:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines