27 fPointSize( (isWeighted) ? dim +1 : dim),
43 fPointSize( (isWeighted) ? dim +1 : dim),
59 fPointSize( (isWeighted) ? dim +1 : dim),
85 fDim( (isWeighted) ? 1 : 2),
95 UnBinData::UnBinData(
unsigned int n,
const double * dataX,
const double * dataY,
const double * dataZ,
bool isWeighted ) :
97 fDim( (isWeighted) ? 2 : 3),
122 for (
unsigned int i = 0; i <
n; ++i)
131 fDim( (isWeighted) ? 1 : 2 ),
144 for (
unsigned int i = 0; i <
n; ++i)
147 Add(dataX[i], dataY[i] );
154 const DataRange & range,
bool isWeighted ) :
156 fDim( (isWeighted) ? 2 : 3 ),
168 for (
unsigned int i = 0; i <
n; ++i)
172 Add(dataX[i], dataY[i], dataZ[i] );
180 unsigned int pointSize = (isWeighted) ? dim+1 : dim;
202 if (
fDim == 0)
return;
209 if (nextraPoints < 0) {
213 else if (nextraPoints > 0) {
void Resize(unsigned int npoints)
resize the vector to the given npoints
Base class for all the fit data types.
DataWrapper * fDataWrapper
#define MATH_ERROR_MSGVAL(loc, str, x)
const FData & Data() const
const access to underlying vector
class holding the fit data points.
class maintaining a pointer to external data Using this class avoids copying the data when performing...
DataOptions : simple structure holding the options on how the data are filled.
class describing the range in the coordinates it supports multiple range in a coordinate.
TFitResultPtr Fit(FitObject *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range)
void Add(double x)
add one dim coordinate data (unweighted)
size_t Size() const
full size of data vector (npoints * point size)
static unsigned int MaxSize()
define a max size to avoid allocating too large arrays
bool IsInside(double x, unsigned int icoord=0) const
check if a point is inside the range for the given coordinate
UnBinData(unsigned int maxpoints=0, unsigned int dim=1, bool isWeighted=false)
constructor from dimension of point and max number of points (to pre-allocate vector) ...
void Initialize(unsigned int maxpoints, unsigned int dim=1, bool isWeighted=false)
preallocate a data set given size and dimension of the coordinates if a vector already exists with co...