mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
ba259fb1d6
This is not perfect - the polygon of the confidence area is calculated even if it is not shown. Oh well. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
28 lines
566 B
C++
28 lines
566 B
C++
// 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();
|
|
void setFeatures(bool regression, bool confidence);
|
|
private:
|
|
StatsAxis *xAxis, *yAxis;
|
|
regression_data reg;
|
|
bool regression, confidence;
|
|
};
|
|
|
|
#endif
|