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 pushed in (one by one) using the Add method.

             @ingroup  FitData

Function Members (Methods)

public:
virtual~UnBinData()
voidAdd(double x)
voidAdd(double* x)
const double*Coords(unsigned int ipoint) const
unsigned intDataSize() const
voidInitialize(unsigned int maxpoints, unsigned int dim = 1)
unsigned intNDim() const
unsigned intNPoints() const
unsigned intPointSize() 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::DataOptions& opt, unsigned int maxpoints = 0, unsigned int dim = 1)
ROOT::Fit::UnBinDataUnBinData(unsigned int n, const double* dataX, const double* dataY)
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)
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 DataOptions & opt, unsigned int maxpoints = 0, unsigned int dim = 1)
      constructor from option and default range

UnBinData(const DataOptions & opt, const 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

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

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

UnBinData(unsigned int n, unsigned int dim, Iterator dataItr )
      constructor for multi-dim external data
      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 & 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

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

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

return fDataVector-> Size()
void Add(double x)
      add one dim coordinate data

void Add(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()
      return number of contained points

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

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

Author: L. Moneta Wed Aug 30 11:15:23 2006
Last change: root/mathcore:$Id: UnBinData.h 24477 2008-06-23 12:58:47Z moneta $
Last generated: 2008-06-25 08:29
Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.