ROOT logo
ROOT » MATH » MATHCORE » ROOT::Fit::UnBinData

class ROOT::Fit::UnBinData: public ROOT::Fit::FitData


   Class describing the unbinned data sets (just x coordinates values) of any dimensions

              There is the option to construct UnBindata copying the data in (using the DataVector class)
              or using pointer to external data (DataWrapper) class.
              In general is found to be more efficient to copy the data.
              In case of really large data sets for limiting memory consumption then the other option can be used
              Specialized constructor exists for using external data up to 3 dimensions.

              When the data are copying in the number of points can be set later (or re-set) using Initialize and
              the data are inserted one by one using the Add method.
              It is mandatory to set the size before using the Add method.

             @ingroup  FitData

Function Members (Methods)

public:
virtual~UnBinData()
voidAdd(double x)
voidAdd(const double* x)
voidAdd(double x, double y)
voidAdd(double x, double y, double z)
const double*Coords(unsigned int ipoint) const
unsigned intDataSize() const
ROOT::Fit::FitDataROOT::Fit::FitData::FitData()
ROOT::Fit::FitDataROOT::Fit::FitData::FitData(const ROOT::Fit::DataOptions& opt)
ROOT::Fit::FitDataROOT::Fit::FitData::FitData(const ROOT::Fit::DataRange& range)
ROOT::Fit::FitDataROOT::Fit::FitData::FitData(const ROOT::Fit::FitData&)
ROOT::Fit::FitDataROOT::Fit::FitData::FitData(const ROOT::Fit::DataOptions& opt, const ROOT::Fit::DataRange& range)
voidInitialize(unsigned int maxpoints, unsigned int dim = 1)
static unsigned intROOT::Fit::FitData::MaxSize()
unsigned intNDim() const
unsigned intNPoints() const
const ROOT::Fit::DataOptions&ROOT::Fit::FitData::Opt() const
ROOT::Fit::DataOptions&ROOT::Fit::FitData::Opt()
unsigned intPointSize() const
const ROOT::Fit::DataRange&ROOT::Fit::FitData::Range() const
voidResize(unsigned int npoints)
unsigned intSize() const
ROOT::Fit::UnBinDataUnBinData(unsigned int maxpoints = 0, unsigned int dim = 1)
ROOT::Fit::UnBinDataUnBinData(unsigned int n, const double* dataX)
ROOT::Fit::UnBinDataUnBinData(const ROOT::Fit::DataRange& range, unsigned int maxpoints = 0, unsigned int dim = 1)
ROOT::Fit::UnBinDataUnBinData(unsigned int n, const double* dataX, const double* dataY)
ROOT::Fit::UnBinDataUnBinData(unsigned int maxpoints, const double* dataX, const ROOT::Fit::DataRange& range)
ROOT::Fit::UnBinDataUnBinData(const ROOT::Fit::DataOptions& opt, const ROOT::Fit::DataRange& range, unsigned int maxpoints = 0, unsigned int dim = 1)
ROOT::Fit::UnBinDataUnBinData(unsigned int n, const double* dataX, const double* dataY, const double* dataZ)
ROOT::Fit::UnBinDataUnBinData(unsigned int maxpoints, const double* dataX, const double* dataY, const ROOT::Fit::DataRange& range)
ROOT::Fit::UnBinDataUnBinData(unsigned int maxpoints, const double* dataX, const double* dataY, const double* dataZ, const ROOT::Fit::DataRange& range)
protected:
voidSetNPoints(unsigned int n)
private:
ROOT::Fit::UnBinData&operator=(const ROOT::Fit::UnBinData&)
ROOT::Fit::UnBinDataUnBinData(const ROOT::Fit::UnBinData&)

Data Members

private:
ROOT::Fit::DataVector*fDataVectorpointer to internal data vector (null for external data)
ROOT::Fit::DataWrapper*fDataWrapperpointer to structure wrapping external data (null when data are copied in)
unsigned intfDimcoordinate data dimension
unsigned intfNPointsnumer of fit points

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

explicit UnBinData(unsigned int maxpoints = 0, unsigned int dim = 1)
      constructor from dimension of point  and max number of points (to pre-allocate vector)

explicit UnBinData(const ROOT::Fit::DataRange& range, unsigned int maxpoints = 0, unsigned int dim = 1)
      constructor from range and default option

UnBinData(const ROOT::Fit::DataOptions& opt, const ROOT::Fit::DataRange& range, unsigned int maxpoints = 0, unsigned int dim = 1)
      constructor from options and range

UnBinData(unsigned int n, const double* dataX)
      constructor for 1D external data (data are not copied inside)

UnBinData(unsigned int n, const double* dataX, const double* dataY)
      constructor for 2D external data (data are not copied inside)

UnBinData(unsigned int n, const double* dataX, const double* dataY, const double* dataZ)
      constructor for 3D external data (data are not copied inside)

UnBinData(unsigned int maxpoints, const double* dataX, const ROOT::Fit::DataRange& range)
      constructor for multi-dim external data (data are not copied inside)
      Uses as argument an iterator of a list (or vector) containing the const double * of the data
      An example could be the std::vector<const double *>::begin

UnBinData(unsigned int maxpoints, const double * dataX, const DataRange & range)
      constructor for 1D data and a range (data are copied inside according to the given range)

UnBinData(unsigned int maxpoints, const double* dataX, const double* dataY, const ROOT::Fit::DataRange& range)
      constructor for 2D data and a range (data are copied inside according to the given range)

UnBinData(unsigned int maxpoints, const double* dataX, const double* dataY, const double* dataZ, const ROOT::Fit::DataRange& range)
      constructor for 3D data and a range (data are copied inside according to the given range)

UnBinData & operator=(const ROOT::Fit::UnBinData& )
 assignment operator  (private)
{ return *this; }
virtual ~UnBinData()
      destructor, delete pointer to internal data or external data wrapper

void Initialize(unsigned int maxpoints, unsigned int dim = 1)
      preallocate a data set given size and dimension
      if a vector already exists with correct dimension (point size) extend the existing one
      to a total size of maxpoints (equivalent to a Resize)

unsigned int PointSize() const
      return fit point size (for unbin data is equivalent to coordinate dimension)

unsigned int DataSize() const
      return size of internal data vector (is 0 for external data)

void Add(double x)
      add one dim coordinate data

void Add(double x, double y)
      add 2-dim coordinate data

void Add(double x, double y, double z)
      add 3-dim coordinate data

void Add(const double* x)
      add multi-dim coordinate data

const double * Coords(unsigned int ipoint) const
      return pointer to coordinate data

void Resize(unsigned int npoints)
      resize the vector to the given npoints

unsigned int NPoints() const
      return number of contained points

{ return fNPoints; }
unsigned int Size() const
      return number of contained points

{ return fNPoints; }
unsigned int NDim() const
      return coordinate data dimension

{ return fDim; }
void SetNPoints(unsigned int n)
{ fNPoints = n; }