11 #ifndef ROOT_TKDTreeBinning
12 #define ROOT_TKDTreeBinning
79 std::pair<const Double_t*, const Double_t*>
GetBinsEdges()
const;
106 #endif // ROOT_TKDTreeBinning
std::vector< std::vector< Double_t > > GetPointsInBin(UInt_t bin) const
Return the corresponding point belonging to the bin i.
std::vector< std::vector< std::pair< Bool_t, Bool_t > > > fCheckedBinEdges
Minimum and maximum data values.
const Double_t * GetBinMaxEdges(UInt_t bin) const
Returns the bin's maximum edges. 'bin' is between 0 and fNBins - 1.
std::vector< Double_t > fBinMaxEdges
The minimum values for the bins' edges for each dimension.
Double_t GetBinVolume(UInt_t bin) const
Returns the (hyper)volume of bin. 'bin' is between 0 and fNBins - 1.
const Double_t * GetDimData(UInt_t dim) const
void SetBinMinMaxEdges(Double_t *binEdges)
const Double_t * GetBinWidth(UInt_t bin) const
Returns a pointer to the vector of the bin widths. 'bin' is between 0 and fNBins - 1...
friend struct CompareDesc
! Predicate for descending sort
std::vector< UInt_t > fBinsContent
Flags if the bin edges are sorted densitywise (or by bin-edge for 1D) in ascending order...
void SetData(Double_t *data)
Disallowed assign operator.
Double_t GetBinDensity(UInt_t bin) const
Returns the density in bin.
UInt_t FindBin(const Double_t *point) const
find the corresponding bin index given the coordinate of a point
UInt_t GetBinMaxDensity() const
Return the bin with maximum density.
TKDTreeBinning()
Default constructor (for I/O)
UInt_t GetBinContent(UInt_t bin) const
Returns the number of points in bin. 'bin' is between 0 and fNBins - 1.
void SetNBins(UInt_t bins)
Sets binning inner structure.
const Double_t * GetOneDimBinEdges() const
Returns a pointer to the vector of the bin edges for one dimensional binning only.
const Double_t * GetBinsMaxEdges() const
Returns an array with all bins' maximum edges The edges are arranges as xmax_1,ymax_1, xmax_2,ymax_2,....xmax_{nbin},ymax_{nbin}.
UInt_t fDataSize
The data dimension.
Bool_t fIsSortedAsc
Flags if the bin edges are sorted densitywise (or by bin endges in case of 1-dim ) ...
#define ClassDef(name, id)
~TKDTreeBinning()
Class's destructor.
const Double_t * SortOneDimBinEdges(Bool_t sortAsc=kTRUE)
Sort the one-dimensional bin edges and retuns a pointer to them.
<- TKDTreeBinning - A class providing multidimensional binning ->
UInt_t GetNBins() const
Returns the number of bins.
Class implementing a kd-tree.
TKDTreeID * fDataBins
Index of the bins in the kd-tree (needed when bins are sorted)
void ReadjustMaxBinEdges(Double_t *binEdges)
std::vector< Double_t > fBinMinEdges
[fDataSize*fDim] The data from which a KDTree partition is computed for binning
Double_t GetDataMin(UInt_t dim) const
Returns the minimum of the data in the dim coordinate. 'dim' is between 0 and fDim - 1...
std::vector< Double_t > fData
std::vector< UInt_t > fIndices
The maximum values for the bins' edges for each dimension.
friend struct CompareAsc
! Predicate for ascending sort
Class describing the binned data sets : vectors of x coordinates, y values and optionally error on y ...
std::vector< std::pair< Double_t, Double_t > > fDataThresholds
The data size.
void SortBinsByDensity(Bool_t sortAsc=kTRUE)
Sorts bins by their density.
TFitResultPtr Fit(FitObject *h1, TF1 *f1, Foption_t &option, const ROOT::Math::MinimizerOptions &moption, const char *goption, ROOT::Fit::DataRange &range)
UInt_t GetDim() const
Returns the number of dimensions.
const Double_t * GetBinCenter(UInt_t bin) const
Returns the geometric center of of the bin. 'bin' is between 0 and fNBins - 1.
void FillBinData(ROOT::Fit::BinData &data) const
Fill the bin data set (class ROOT::Fit::BinData) with the result of the TKDTree binning.
const Double_t * GetBinMinEdges(UInt_t bin) const
Returns the bin's minimum edges. 'bin' is between 0 and fNBins - 1.
Mother of all ROOT objects.
void SetCommonBinEdges(Double_t *binEdges)
void ReadjustMinBinEdges(Double_t *binEdges)
UInt_t fDim
The number of bins.
const Double_t * GetBinsMinEdges() const
Returns an array with all bins' minimum edges The edges are arranges as xmin_1,ymin_1, xmin_2,ymin_2,....xmin_{nbin},ymin_{nbin}.
std::vector< std::map< Double_t, std::vector< UInt_t > > > fCommonBinEdges
! Auxiliary structure for readjusting the bin edges. Keeps the common bin boundaries ...
std::pair< const Double_t *, const Double_t * > GetBinEdges(UInt_t bin) const
Returns a pir with the bin's edges. 'bin' is between 0 and fNBins - 1.
std::pair< const Double_t *, const Double_t * > GetBinsEdges() const
Returns a pair of an array with all bins minimum and maximum edges.
TKDTreeID * GetTree() const
Returns the kD-Tree structure of the binning.
UInt_t GetBinMinDensity() const
Return the bin with minimum density.
Double_t GetDataMax(UInt_t dim) const
Returns the maximum of the data in the dim coordinate. 'dim' is between 0 and fDim - 1...
TKDTreeBinning operator=(TKDTreeBinning &bins)
Disallowed copy constructor.