diff --git a/core/include/Data/DataSeries.h b/core/include/Data/DataSeries.h index 1fa35a7..ce63883 100644 --- a/core/include/Data/DataSeries.h +++ b/core/include/Data/DataSeries.h @@ -230,6 +230,21 @@ public: return std::make_pair(lowerIt, upperIt); } + std::pair + valuesBounds(double minXAxisData, double maxXAxisData) const override + { + // Places iterators to the correct x-axis range + auto xAxisRangeIts = xAxisRange(minXAxisData, maxXAxisData); + + // Returns end iterators if the range is empty + if (xAxisRangeIts.first == xAxisRangeIts.second) { + return std::make_pair(cend(), cend()); + } + + /// @todo ALX: complete + + } + // /////// // // Mutexes // // /////// // diff --git a/core/include/Data/IDataSeries.h b/core/include/Data/IDataSeries.h index 2d134ee..33fc095 100644 --- a/core/include/Data/IDataSeries.h +++ b/core/include/Data/IDataSeries.h @@ -83,6 +83,12 @@ public: virtual std::pair xAxisRange(double minXAxisData, double maxXAxisData) const = 0; + /// @return two iterators pointing to the data that have respectively the min and the max value + /// data of a data series' range. The search is performed for a given x-axis range. + /// @sa xAxisRange() + virtual std::pair + valuesBounds(double minXAxisData, double maxXAxisData) const = 0; + // /////// // // Mutexes // // /////// //