30#include "ElementsKernel/Exception.h"
57 size_t x_size = x_vector.
size();
58 size_t y_size = y_vector.
size();
60 if (x_size != y_size) {
62 <<
"the same size! x size: %d" << x_size <<
" y_size : %d" << y_size;
69 transform(x_vector.
begin(), x_vector.
end(), y_vector.
begin(), back_inserter(vector_pair),
const std::pair< double, double > & back() const
Returns a reference to the last pair of the dataset.
std::vector< std::pair< double, double > >::const_iterator const_iterator
static XYDataset factory(std::vector< std::pair< double, double > > vector_pair)
Make a XYDataset object from a vector of pair of doubles.
const std::pair< double, double > & front() const
Returns a reference to the first pair of the dataset.
const_iterator begin() const
Returns a const iterator to the first pair of the dataset.
std::vector< std::pair< double, double > > m_values
const_iterator end() const
Returns a const iterator to the one after last pair dataset.
XYDataset(std::vector< std::pair< double, double > > values)
Constructor XYDataset interface represents an immutable data set.