mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-02 23:20:20 +00:00
2008857660
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>
26 lines
483 B
C++
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
|