subsurface/stats/regressionitem.h
Berthold Stoeger d060a3a3cb profile: rename stats/chartitem.* to stats/statsitem.*
Android uses qmake and apparently that doesn't support source files
with the same name. We already have chart/chartitem.*.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2024-09-12 15:17:15 +02:00

29 lines
653 B
C++

// A regression line and confidence area
#ifndef REGRESSION_H
#define REGRESSION_H
#include "statsitem.h"
class StatsAxis;
class StatsTheme;
struct regression_data {
double a,b;
double res2, r2, sx2, xavg;
int n;
};
class RegressionItem : public ChartPixmapItem {
public:
RegressionItem(ChartView &view, const StatsTheme &theme, regression_data data, StatsAxis *xAxis, StatsAxis *yAxis);
~RegressionItem();
void updatePosition();
void setFeatures(bool regression, bool confidence);
private:
const StatsTheme &theme; // Initialized once in constructor
StatsAxis *xAxis, *yAxis;
regression_data reg;
bool regression, confidence;
};
#endif