@@ -87,10 +87,9 public: | |||
|
87 | 87 | return it != end ? *it : std::numeric_limits<double>::quiet_NaN(); |
|
88 | 88 | } |
|
89 | 89 | |
|
90 | private: | |
|
91 | std::vector<double> values() const | |
|
90 | QVector<double> values() const override | |
|
92 | 91 | { |
|
93 |
auto result = |
|
|
92 | auto result = QVector<double>{}; | |
|
94 | 93 | for (auto i = 0; i < m_NbComponents; ++i) { |
|
95 | 94 | result.push_back(*(m_It + i)); |
|
96 | 95 | } |
@@ -98,6 +97,7 private: | |||
|
98 | 97 | return result; |
|
99 | 98 | } |
|
100 | 99 | |
|
100 | private: | |
|
101 | 101 | DataContainer::const_iterator m_It; |
|
102 | 102 | int m_NbComponents; |
|
103 | 103 | }; |
@@ -4,6 +4,7 | |||
|
4 | 4 | #include "CoreGlobal.h" |
|
5 | 5 | #include "Data/SqpIterator.h" |
|
6 | 6 | |
|
7 | #include <QVector> | |
|
7 | 8 | #include <memory> |
|
8 | 9 | |
|
9 | 10 | /** |
@@ -25,6 +26,7 public: | |||
|
25 | 26 | virtual double first() const = 0; |
|
26 | 27 | virtual double min() const = 0; |
|
27 | 28 | virtual double max() const = 0; |
|
29 | virtual QVector<double> values() const = 0; | |
|
28 | 30 | }; |
|
29 | 31 | |
|
30 | 32 | explicit ArrayDataIteratorValue(std::unique_ptr<Impl> impl); |
@@ -46,6 +48,8 public: | |||
|
46 | 48 | double min() const; |
|
47 | 49 | /// Gets max value among all components |
|
48 | 50 | double max() const; |
|
51 | /// Gets all values | |
|
52 | QVector<double> values() const; | |
|
49 | 53 | |
|
50 | 54 | private: |
|
51 | 55 | std::unique_ptr<Impl> m_Impl; |
@@ -67,6 +67,7 public: | |||
|
67 | 67 | double value(int componentIndex) const override { return m_ValuesIt->at(componentIndex); } |
|
68 | 68 | double minValue() const override { return m_ValuesIt->min(); } |
|
69 | 69 | double maxValue() const override { return m_ValuesIt->max(); } |
|
70 | QVector<double> values() const override { return m_ValuesIt->values(); } | |
|
70 | 71 | |
|
71 | 72 | private: |
|
72 | 73 | ArrayDataIterator m_XIt; |
@@ -4,6 +4,7 | |||
|
4 | 4 | #include "CoreGlobal.h" |
|
5 | 5 | #include "Data/SqpIterator.h" |
|
6 | 6 | |
|
7 | #include <QVector> | |
|
7 | 8 | #include <memory> |
|
8 | 9 | |
|
9 | 10 | /** |
@@ -27,6 +28,7 public: | |||
|
27 | 28 | virtual double value(int componentIndex) const = 0; |
|
28 | 29 | virtual double minValue() const = 0; |
|
29 | 30 | virtual double maxValue() const = 0; |
|
31 | virtual QVector<double> values() const = 0; | |
|
30 | 32 | }; |
|
31 | 33 | |
|
32 | 34 | explicit DataSeriesIteratorValue(std::unique_ptr<Impl> impl); |
@@ -50,6 +52,8 public: | |||
|
50 | 52 | double minValue() const; |
|
51 | 53 | /// Gets max of all values data |
|
52 | 54 | double maxValue() const; |
|
55 | /// Gets all values data | |
|
56 | QVector<double> values() const; | |
|
53 | 57 | |
|
54 | 58 | private: |
|
55 | 59 | std::unique_ptr<Impl> m_Impl; |
General Comments 0
You need to be logged in to leave comments.
Login now