19 if (t.size() != x.size()) {
20 std::cerr <<
"ERROR. Vectors provided are different sizes. Initializing this object's properties to 0." <<
std::endl;
36 return this->
T.size();
42 return *std::min_element(this->
T.begin(), this->
T.end());
48 return *std::max_element(this->
T.begin(), this->
T.end());
63 return *std::min_element(this->
X.begin(), this->
X.end());
69 return *std::max_element(this->
X.begin(), this->
X.end());
75 auto meanLambda = [&](
double a,
double b){
return a +
b / this->
X.size();};
76 return std::accumulate(this->
X.begin(), this->
X.end(), 0.0, meanLambda);
91 out << std::setiosflags(std::ios::fixed) << std::setprecision(2);
92 out <<
"Time series data at " << ts <<
" contains " << ts.
N() <<
" entries.";
double MaxValue() const
Largest value in data.
friend std::ostream & operator<<(std::ostream &out, const TimeSeriesData &ts)
Float_t x1[n_points_granero]
double MinValue() const
Smallest value in data.
double MeanValue() const
Mean value of data.
std::time_t MinTime() const
Earliest time in data.
double RangeValue() const
Range spanned by data.
TimeSeriesData(std::vector< std::time_t > t, std::vector< double > x)
std::time_t MaxTime() const
Latest time in data.
unsigned int N() const
Number of entries in data.
int RangeTime() const
Time spanned by data.
std::vector< std::time_t > T
A container for time series data typically used in Nearline plotmaking.