summaryrefslogtreecommitdiffstats
path: root/stats/regressionitem.h
blob: 607317d08e61e85b597b02f6d4326a90e7714cdd (plain) (blame)
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
// A regression line and confidence area
#ifndef REGRESSION_H
#define REGRESSION_H

#include "chartitem.h"

class StatsAxis;
class StatsView;

struct regression_data {
	double a,b;
	double res2, r2, sx2, xavg;
	int n;
};

class RegressionItem : public ChartPixmapItem {
public:
	RegressionItem(StatsView &view, regression_data data, StatsAxis *xAxis, StatsAxis *yAxis);
	~RegressionItem();
	void updatePosition();
private:
	StatsAxis *xAxis, *yAxis;
	regression_data reg;
};

#endif