11 #ifndef ROOT_TKDTreeBinning 12 #define ROOT_TKDTreeBinning 52 void SetData(Double_t* data);
53 void SetData(
const std::vector<double> & data);
56 void SetBinMinMaxEdges(Double_t* binEdges);
57 void SetCommonBinEdges(Double_t* binEdges);
58 void SetBinsContent();
59 void ReadjustMinBinEdges(Double_t* binEdges);
60 void ReadjustMaxBinEdges(Double_t* binEdges);
68 kAdjustBinEdges = BIT(14)
72 TKDTreeBinning(UInt_t dataSize, UInt_t dataDim, Double_t* data, UInt_t nBins = 100,
bool adjustBinEdges =
false);
73 TKDTreeBinning(UInt_t dataSize, UInt_t dataDim,
const std::vector<double> & data, UInt_t nBins = 100,
bool adjustBinEdges =
false);
75 void SetNBins(UInt_t bins);
76 void SortBinsByDensity(Bool_t sortAsc = kTRUE);
77 const Double_t* GetBinsMinEdges()
const;
78 const Double_t* GetBinsMaxEdges()
const;
79 std::pair<const Double_t*, const Double_t*> GetBinsEdges()
const;
80 std::pair<const Double_t*, const Double_t*> GetBinEdges(UInt_t bin)
const;
81 const Double_t* GetBinMinEdges(UInt_t bin)
const;
82 const Double_t* GetBinMaxEdges(UInt_t bin)
const;
83 UInt_t GetNBins()
const;
84 UInt_t GetDim()
const;
85 UInt_t GetBinContent(UInt_t bin)
const;
87 const Double_t* GetDimData(UInt_t dim)
const;
88 Double_t GetDataMin(UInt_t dim)
const;
89 Double_t GetDataMax(UInt_t dim)
const;
90 Double_t GetBinDensity(UInt_t bin)
const;
91 Double_t GetBinVolume(UInt_t bin)
const;
92 const Double_t* GetBinCenter(UInt_t bin)
const;
93 const Double_t* GetBinWidth(UInt_t bin)
const;
94 UInt_t GetBinMaxDensity()
const;
95 UInt_t GetBinMinDensity()
const;
96 const Double_t* GetOneDimBinEdges()
const;
97 const Double_t* SortOneDimBinEdges(Bool_t sortAsc = kTRUE);
99 UInt_t FindBin(
const Double_t * point)
const;
100 std::vector<std::vector<Double_t> > GetPointsInBin(UInt_t bin)
const;
106 #endif // ROOT_TKDTreeBinning std::vector< std::vector< std::pair< Bool_t, Bool_t > > > fCheckedBinEdges
Minimum and maximum data values.
std::vector< Double_t > fBinMaxEdges
The minimum values for the bins' edges for each dimension.
Namespace for new ROOT classes and functions.
std::vector< UInt_t > fBinsContent
Flags if the bin edges are sorted densitywise (or by bin-edge for 1D) in ascending order...
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 ) ...
<- TKDTreeBinning - A class providing multidimensional binning ->
Class implementing a kd-tree.
TKDTreeID * fDataBins
Index of the bins in the kd-tree (needed when bins are sorted)
std::vector< Double_t > fBinMinEdges
[fDataSize*fDim] The data from which a KDTree partition is computed for binning
std::vector< Double_t > fData
std::vector< UInt_t > fIndices
The maximum values for the bins' edges for each dimension.
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.
UInt_t fDim
The number of bins.
std::vector< std::map< Double_t, std::vector< UInt_t > > > fCommonBinEdges
! Auxiliary structure for readjusting the bin edges. Keeps the common bin boundaries ...