XX CMake Package
Loading...
Searching...
No Matches
XXPolynomialRegression.h
Go to the documentation of this file.
1#ifndef XXPolynomialRegressionH
2#define XXPolynomialRegressionH
3
4#include "XXMathExportDef.h"
5#include "XXPolynomial.h"
6
8
9namespace XX
10{
14
16 {
17 public:
19
20 public:
21 struct Section
22 {
23 size_t start = 0;
24 size_t end = 0;
25 bool steady = false; // no jump to next section
26
27 size_t length() const;
28
29 using List = QList<Section>;
30 };
31
32 public:
33 size_t size() const;
34 void setValue(const size_t index, const double& value);
35 void clear();
36
37 Segment::Bundle fit(size_t degree, double threshold, size_t overFit = 2, size_t maxSegmentLength = 50) const;
38 Section::List compileSections(double threshold, size_t maxSegmentLength = 50) const;
39 const QVector<double>& getValues() const;
40
41 private:
42 QVector<double> values;
43 };
44} // namespace XX
45
46#endif // NOT XXPolynomialRegressionH
#define XXMATH_DECLSPEC
Definition XXMathExportDef.h:17
const QVector< double > & getValues() const
Segment::Bundle fit(size_t degree, double threshold, size_t overFit=2, size_t maxSegmentLength=50) const
Section::List compileSections(double threshold, size_t maxSegmentLength=50) const
void setValue(const size_t index, const double &value)
a collection of polynomial segments
Definition XXPolynomialSegmentBundle.h:13
virtual double value(const double &x) const
Polynomial(size_t degree=0)
Definition XXPopulatedAbstract.h:11
Definition XXPolynomialRegression.h:22
bool steady
Definition XXPolynomialRegression.h:25
QList< Section > List
Definition XXPolynomialRegression.h:29
size_t end
Definition XXPolynomialRegression.h:24
size_t start
Definition XXPolynomialRegression.h:23