@@ -9,11 +9,11 | |||
|
9 | 9 | * @tparam T the type of object handled in iterator |
|
10 | 10 | * @sa http://www.cplusplus.com/reference/iterator/ |
|
11 | 11 | */ |
|
12 | template <typename T> | |
|
12 | template <typename T, bool isConst=false> | |
|
13 | 13 | class SCIQLOP_CORE_EXPORT SqpIterator { |
|
14 | 14 | public: |
|
15 | 15 | using iterator_category = std::random_access_iterator_tag; |
|
16 | using value_type = const T; | |
|
16 | using value_type = typename std::conditional<isConst, const T, T>::type; | |
|
17 | 17 | using difference_type = std::ptrdiff_t; |
|
18 | 18 | using pointer = value_type *; |
|
19 | 19 | using reference = value_type &; |
@@ -1,4 +1,5 | |||
|
1 | 1 | #include <Data/SpectrogramSeries.h> |
|
2 | #include <Data/DataSeriesUtils.h> | |
|
2 | 3 | |
|
3 | 4 | SpectrogramSeries::SpectrogramSeries(std::vector<double> xAxisData, std::vector<double> yAxisData, |
|
4 | 5 | std::vector<double> valuesData, const Unit &xAxisUnit, |
@@ -22,6 +23,10 SpectrogramSeries::SpectrogramSeries(std::shared_ptr<ArrayData<1> > xAxisData, | |||
|
22 | 23 | std::move(yAxis)}, |
|
23 | 24 | m_XResolution{resolution} |
|
24 | 25 | { |
|
26 | if(std::isnan(m_XResolution)) | |
|
27 | { | |
|
28 | //m_XResolution = DataSeriesUtils::resolution(xAxisData->begin(), xAxisData->end()).m_Val; | |
|
29 | } | |
|
25 | 30 | } |
|
26 | 31 | |
|
27 | 32 | std::unique_ptr<IDataSeries> SpectrogramSeries::clone() const |
@@ -4,6 +4,8 | |||
|
4 | 4 | #include <pybind11/numpy.h> |
|
5 | 5 | #include <pybind11/chrono.h> |
|
6 | 6 | #include <pybind11/functional.h> |
|
7 | #include <pybind11/stl.h> | |
|
8 | ||
|
7 | 9 | |
|
8 | 10 | #include <string> |
|
9 | 11 | #include <sstream> |
@@ -69,6 +71,7 PYBIND11_MODULE(pysciqlopcore,m){ | |||
|
69 | 71 | |
|
70 | 72 | py::class_<DataSeriesIteratorValue>(m,"DataSeriesIteratorValue") |
|
71 | 73 | .def_property_readonly("x", &DataSeriesIteratorValue::x) |
|
74 | .def_property_readonly("y", &DataSeriesIteratorValue::y) | |
|
72 | 75 | .def("value", py::overload_cast<>(&DataSeriesIteratorValue::value, py::const_)) |
|
73 | 76 | .def("value", py::overload_cast<int>(&DataSeriesIteratorValue::value, py::const_)) |
|
74 | 77 | .def("values", &DataSeriesIteratorValue::values); |
General Comments 0
You need to be logged in to leave comments.
Login now