-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapproximator.h
29 lines (27 loc) · 1.16 KB
/
approximator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//---------------------------------------------------------------------------
#ifndef ApproximatorH
#define ApproximatorH
//---------------------------------------------------------------------------
#include <string>
#include <vector>
#include <boost/multi_array.hpp>
#include "common.h"
using namespace std;
using namespace boost;
class Approximator
{
public:
static double GetA(const vector<point> &data);
static double GetB(const vector<point> &data);
static double Delta(const vector<point> &data1, const vector<point> &data2);
static double Sigma(const vector<point> &data);
static double Correlation(const vector<point> &data);
static bool GetPolynom(const vector<point> &data, vector<double> &mbx, signed char n);
static double PolynomSigma(const vector<point> &data, const vector<double> &mbx, signed char n0);
static double CorrelationRatio(const vector<point> &linear_data, const vector<point> &dst_data);
protected:
static double GetParameter(const vector<point> &data, const string &operation);
private:
static bool Zeidel(const multi_array<double, 2> &a, const vector<double> &b, vector<double> &x, unsigned char n);
};
#endif