26 fPointSize( (isWeighted) ? dim +1 : dim),
42 fPointSize( (isWeighted) ? dim +1 : dim),
58 fPointSize( (isWeighted) ? dim +1 : dim),
84 fDim( (isWeighted) ? 1 : 2),
94 UnBinData::UnBinData(
unsigned int n,
const double * dataX,
const double * dataY,
const double * dataZ,
bool isWeighted ) :
96 fDim( (isWeighted) ? 2 : 3),
121 for (
unsigned int i = 0; i <
n; ++i)
130 fDim( (isWeighted) ? 1 : 2 ),
143 for (
unsigned int i = 0; i <
n; ++i)
146 Add(dataX[i], dataY[i] );
153 const DataRange & range,
bool isWeighted ) :
155 fDim( (isWeighted) ? 2 : 3 ),
167 for (
unsigned int i = 0; i <
n; ++i)
171 Add(dataX[i], dataY[i], dataZ[i] );
179 unsigned int pointSize = (isWeighted) ? dim+1 : dim;
201 if (
fDim == 0)
return;
208 if (nextraPoints < 0) {
212 else if (nextraPoints > 0) {
Namespace for new ROOT classes and functions.
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...