13#ifndef ROOT_Fit_FitData
14#define ROOT_Fit_FitData
59 explicit FitData(
unsigned int maxpoints = 0,
unsigned int dim = 1);
70 unsigned int maxpoints = 0,
unsigned int dim = 1);
73 FitData(
unsigned int n,
const double *dataX);
76 FitData(
unsigned int n,
const double *dataX,
const double *dataY);
79 FitData(
unsigned int n,
const double *dataX,
const double *dataY,
87 FitData(
const DataRange &range,
unsigned int maxpoints,
const double *dataX);
94 FitData(
const DataRange &range,
unsigned int maxpoints,
const double *dataX,
const double *dataY);
101 FitData(
const DataRange &range,
unsigned int maxpoints,
const double *dataX,
const double *dataY,
102 const double *dataZ);
111 template<
class Iterator>
121 for (
unsigned int i = 0; i <
fDim; i++) {
138 template<
class Iterator>
160 void Append(
unsigned int newPoints,
unsigned int dim = 1);
175 for (
unsigned int i = 0; i <
fDim; i++) {
188 template<
class Iterator>
191 for (
unsigned int i = 0; i <
fMaxPoints; i++) {
192 bool isInside =
true;
193 Iterator tmpItr = dataItr;
195 for (
unsigned int j = 0; j <
fDim; j++)
196 isInside &=
fRange.IsInside((*tmpItr++)[i], j);
201 for (
unsigned int k = 0; k <
fDim; k++)
221 assert(icoord <
fDim);
235 const double *
Coords(
unsigned int ipoint)
const
240 for (
unsigned int i = 0; i <
fDim; i++) {
274 for (
unsigned int i = 0; i <
fDim; i++) {
341 for (
unsigned int i = 0; i <
fDim; i++) {
352#ifdef R__HAS_STD_EXPERIMENTAL_SIMD
359 unsigned padding = 0;
360 unsigned modP = (dataSize) % ROOT::Double_v::size();
362 padding = ROOT::Double_v::size() - modP;
class describing the range in the coordinates it supports multiple range in a coordinate.
Base class for all the fit data types: Stores the coordinates and the DataOptions.
double * fpTmpCoordVector
FitData(unsigned int n, unsigned int dim, Iterator dataItr)
constructor for multi-dim external data (data are not copied inside) Uses as argument an iterator of ...
unsigned int Size() const
return number of fit points
FitData(unsigned int maxpoints=0, unsigned int dim=1)
construct with default option and data range
void InitCoordsVector()
initializer routines to set the corresponding pointers right The vectors must NOT be resized after th...
void Add(double x)
add one dim data with only coordinate and values
void Append(unsigned int newPoints, unsigned int dim=1)
std::vector< std::vector< double > > fCoords
This vector stores the vectorizable data: The inner vectors contain the coordinates data fCoords[0] i...
std::vector< const double * > fCoordsPtr
static constexpr unsigned VectorPadding(const unsigned)
If std::experimental::simd is not available, there is no vectorization available and the SIMD vector ...
const double * GetCoordComponent(unsigned int ipoint, unsigned int icoord) const
returns a single coordinate component of a point.
void InitFromRange(Iterator dataItr)
unsigned int NPoints() const
return number of fit points
void Add(const double *x)
add multi-dim coordinate data with only value
const std::vector< const double * > & GetCoordDataPtrs() const
direct access to coord data ptrs
FitData(const DataRange &range, unsigned int maxpoints, unsigned int dim, Iterator dataItr)
constructor for multi-dim external data and a range (data are copied inside according to the range) U...
unsigned int NDim() const
return coordinate data dimension
FitData & operator=(const FitData &rhs)
const DataOptions & Opt() const
access to options
const double * Coords(unsigned int ipoint) const
return a pointer to the coordinates data for the given fit point
const DataRange & Range() const
access to range
virtual ~FitData()
dummy virtual destructor
Namespace for the fitting classes.
DataOptions : simple structure holding the options on how the data are filled.