##// END OF EJS Templates
Merge pull request 296 from SCIQLOP-Initialisation develop...
leroux -
r769:ac71c472785a merge master
parent child
Show More
@@ -64,23 +64,20 std::unique_ptr<IDataSeries> VectorSeries::clone() const
64 std::shared_ptr<IDataSeries> VectorSeries::subDataSeries(const SqpRange &range)
64 std::shared_ptr<IDataSeries> VectorSeries::subDataSeries(const SqpRange &range)
65 {
65 {
66 auto subXAxisData = std::vector<double>();
66 auto subXAxisData = std::vector<double>();
67 auto subXValuesData = std::vector<double>();
67 auto subValuesData = std::vector<double>();
68 auto subYValuesData = std::vector<double>();
69 auto subZValuesData = std::vector<double>();
70
68
71 this->lockRead();
69 this->lockRead();
72 {
70 {
73 auto bounds = xAxisRange(range.m_TStart, range.m_TEnd);
71 auto bounds = xAxisRange(range.m_TStart, range.m_TEnd);
74 for (auto it = bounds.first; it != bounds.second; ++it) {
72 for (auto it = bounds.first; it != bounds.second; ++it) {
75 subXAxisData.push_back(it->x());
73 subXAxisData.push_back(it->x());
76 subXValuesData.push_back(it->value(0));
74 subValuesData.push_back(it->value(0));
77 subYValuesData.push_back(it->value(1));
75 subValuesData.push_back(it->value(1));
78 subZValuesData.push_back(it->value(2));
76 subValuesData.push_back(it->value(2));
79 }
77 }
80 }
78 }
81 this->unlock();
79 this->unlock();
82
80
83 return std::make_shared<VectorSeries>(std::move(subXAxisData), std::move(subXValuesData),
81 return std::make_shared<VectorSeries>(std::move(subXAxisData), std::move(subValuesData),
84 std::move(subYValuesData), std::move(subZValuesData),
85 this->xAxisUnit(), this->valuesUnit());
82 this->xAxisUnit(), this->valuesUnit());
86 }
83 }
General Comments 0
You need to be logged in to leave comments. Login now