subsurface/stats/regressionitem.h
Berthold Stoeger 2008857660 statistics: render regression item using QSGNode
Render the confidence area and the regression line into a pixmap
and show that using a QSGNode.

It is unclear whether it is preferred to do it this way or to
triangulate the confidence area into triangles to be drawn by
the shader.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-01-20 08:47:18 +01:00

26 lines
483 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();
private:
StatsAxis *xAxis, *yAxis;
regression_data reg;
};
#endif