XX CMake Package
Loading...
Searching...
No Matches
XXPolynomialSegment.h
Go to the documentation of this file.
1#ifndef XXPolynomialSegmentH
2#define XXPolynomialSegmentH
3
4#include "XXMathExportDef.h"
5#include "XXPolynomial.h"
6
7#include <QDebug>
8#include <QJsonObject>
9#include <QList>
10
11namespace XX
12{
15
17 {
18 public:
19 using List = QList<Segment>;
20 class Bundle;
21
22 public:
23 Segment(size_t degree = 0);
24 Segment(QVector<double> coefficents);
25
26 public:
27 const double& getStart() const;
28 const double& getEnd() const;
29
30 double getLength() const;
31
32 void setStart(const double& value);
33 void setEnd(const double& value);
34
35 double value(const double& x) const override;
36 void load(const QJsonObject& data) override;
37 QJsonObject save() const override;
38
39 private:
40 friend XXMATH_DECLSPEC QDebug operator<<(QDebug stream, const Segment& segment);
41
42 private:
43 double start;
44 double end;
45 };
46
52
53 XXMATH_DECLSPEC QDebug operator<<(QDebug stream, const Polynomial::Segment& segment);
54
56
57} // namespace XX
58
59#endif // NOT XXPolynomialSegmentH
#define XXMATH_DECLSPEC
Definition XXMathExportDef.h:17
a collection of polynomial segments
Definition XXPolynomialSegmentBundle.h:13
a polynomial segment
Definition XXPolynomialSegment.h:17
QList< Segment > List
Definition XXPolynomialSegment.h:19
friend QDebug operator<<(QDebug stream, const Segment &segment)
void setEnd(const double &value)
void load(const QJsonObject &data) override
const double & getEnd() const
double value(const double &x) const override
QJsonObject save() const override
Segment(size_t degree=0)
Segment(QVector< double > coefficents)
void setStart(const double &value)
const double & getStart() const
double getLength() const
Polynomial(size_t degree=0)
Definition XXPopulatedAbstract.h:11
std::ostream & operator<<(std::ostream &out, const ByteFours &bf)