##// END OF EJS Templates
Creates method to retrieve nb points of a data series
Alexandre Leroux -
r717:3f8156a1a068
parent child
Show More
@@ -273,6 +273,13 public:
273 return m_Data.size() / m_NbComponents;
273 return m_Data.size() / m_NbComponents;
274 }
274 }
275
275
276 /// @return the total size (i.e. number of values) of the array data
277 int totalSize() const
278 {
279 QReadLocker locker{&m_Lock};
280 return m_Data.size();
281 }
282
276 std::shared_ptr<ArrayData<Dim> > sort(const std::vector<int> &sortPermutation)
283 std::shared_ptr<ArrayData<Dim> > sort(const std::vector<int> &sortPermutation)
277 {
284 {
278 QReadLocker locker{&m_Lock};
285 QReadLocker locker{&m_Lock};
@@ -146,6 +146,7 public:
146 /// @sa IDataSeries::valuesUnit()
146 /// @sa IDataSeries::valuesUnit()
147 Unit valuesUnit() const override { return m_ValuesUnit; }
147 Unit valuesUnit() const override { return m_ValuesUnit; }
148
148
149 int nbPoints() const override { return m_XAxisData->totalSize() + m_ValuesData->totalSize(); }
149
150
150 SqpRange range() const override
151 SqpRange range() const override
151 {
152 {
@@ -64,6 +64,10 public:
64 virtual std::shared_ptr<IDataSeries> subDataSeries(const SqpRange &range) = 0;
64 virtual std::shared_ptr<IDataSeries> subDataSeries(const SqpRange &range) = 0;
65
65
66 virtual std::unique_ptr<IDataSeries> clone() const = 0;
66 virtual std::unique_ptr<IDataSeries> clone() const = 0;
67
68 /// @return the total number of points contained in the data series
69 virtual int nbPoints() const = 0;
70
67 virtual SqpRange range() const = 0;
71 virtual SqpRange range() const = 0;
68
72
69 // ///////// //
73 // ///////// //
General Comments 0
You need to be logged in to leave comments. Login now