##// END OF EJS Templates
Implements test execute() method...
Implements test execute() method For each iteration of the test, this method generates available operations according to states of the variables, and execute an operation that has been chosen randomly.

File last commit:

r694:c050c224f3de
r1205:0c07405da56c
Show More
ScalarSeries.cpp
31 lines | 1.1 KiB | text/x-c | CppLexer
#include <Data/ScalarSeries.h>
ScalarSeries::ScalarSeries(std::vector<double> xAxisData, std::vector<double> valuesData,
const Unit &xAxisUnit, const Unit &valuesUnit)
: DataSeries{std::make_shared<ArrayData<1> >(std::move(xAxisData)), xAxisUnit,
std::make_shared<ArrayData<1> >(std::move(valuesData)), valuesUnit}
{
}
std::unique_ptr<IDataSeries> ScalarSeries::clone() const
{
return std::make_unique<ScalarSeries>(*this);
}
std::shared_ptr<IDataSeries> ScalarSeries::subDataSeries(const SqpRange &range)
{
auto subXAxisData = std::vector<double>();
auto subValuesData = std::vector<double>();
this->lockRead();
{
auto bounds = xAxisRange(range.m_TStart, range.m_TEnd);
for (auto it = bounds.first; it != bounds.second; ++it) {
subXAxisData.push_back(it->x());
subValuesData.push_back(it->value());
}
}
this->unlock();
return std::make_shared<ScalarSeries>(std::move(subXAxisData), std::move(subValuesData),
this->xAxisUnit(), this->valuesUnit());
}