Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TKDTreeBinning Class Reference

<- TKDTreeBinning - A class providing multidimensional binning ->

The class implements multidimensional binning by constructing a TKDTree inner structure from the data which is used as the bins. The bins are retrieved as two double*, one for the minimum bin edges, the other as the maximum bin edges. For one dimension one of these is enough to correctly define the bins. For the multidimensional case both minimum and maximum ones are necessary for the bins to be well defined. The bin edges of d-dimensional data is a d-tet of the bin's thresholds. For example if d=3 the minimum bin edges of bin b is of the form of the following array: {xbmin, ybmin, zbmin}. You also have the possibility to sort the bins by their density.

Details of usage can be found in $ROOTSYS/tutorials/math/kdTreeBinning.C and more information on the embedded TKDTree documentation.

Definition at line 29 of file TKDTreeBinning.h.

Classes

struct  CompareAsc
 
struct  CompareDesc
 

Public Types

enum  { kAdjustBinEdges = (1ULL << ( 14 )) }
 
- Public Types inherited from TObject
enum  {
  kIsOnHeap = 0x01000000 , kNotDeleted = 0x02000000 , kZombie = 0x04000000 , kInconsistent = 0x08000000 ,
  kBitMask = 0x00ffffff
}
 
enum  { kSingleKey = (1ULL << ( 0 )) , kOverwrite = (1ULL << ( 1 )) , kWriteDelete = (1ULL << ( 2 )) }
 
enum  EDeprecatedStatusBits { kObjInCanvas = (1ULL << ( 3 )) }
 
enum  EStatusBits {
  kCanDelete = (1ULL << ( 0 )) , kMustCleanup = (1ULL << ( 3 )) , kIsReferenced = (1ULL << ( 4 )) , kHasUUID = (1ULL << ( 5 )) ,
  kCannotPick = (1ULL << ( 6 )) , kNoContextMenu = (1ULL << ( 8 )) , kInvalidObject = (1ULL << ( 13 ))
}
 

Public Member Functions

 TKDTreeBinning ()
 Default constructor (for I/O)
 
 TKDTreeBinning (UInt_t dataSize, UInt_t dataDim, const std::vector< double > &data, UInt_t nBins=100, bool adjustBinEdges=false)
 Class's constructor taking the size of the data points, dimension, a data vector and the number of bins (default = 100).
 
 TKDTreeBinning (UInt_t dataSize, UInt_t dataDim, Double_t *data, UInt_t nBins=100, bool adjustBinEdges=false)
 Class's constructor taking the size of the data points, dimension, a data array and the number of bins (default = 100).
 
 ~TKDTreeBinning () override
 Class's destructor.
 
void FillBinData (ROOT::Fit::BinData &data) const
 Fill the bin data set (class ROOT::Fit::BinData) with the result of the TKDTree binning.
 
UInt_t FindBin (const Double_t *point) const
 find the corresponding bin index given the coordinate of a point
 
const Double_tGetBinCenter (UInt_t bin) const
 Returns the geometric center of of the bin.
 
UInt_t GetBinContent (UInt_t bin) const
 Returns the number of points in bin. 'bin' is between 0 and fNBins - 1.
 
Double_t GetBinDensity (UInt_t bin) const
 Returns the density in bin.
 
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.
 
UInt_t GetBinMaxDensity () const
 Return the bin with maximum density.
 
const Double_tGetBinMaxEdges (UInt_t bin) const
 Returns the bin's maximum edges. 'bin' is between 0 and fNBins - 1.
 
UInt_t GetBinMinDensity () const
 Return the bin with minimum density.
 
const Double_tGetBinMinEdges (UInt_t bin) const
 Returns the bin's minimum 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.
 
const Double_tGetBinsMaxEdges () 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}.
 
const Double_tGetBinsMinEdges () 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}.
 
Double_t GetBinVolume (UInt_t bin) const
 Returns the (hyper)volume of bin. 'bin' is between 0 and fNBins - 1.
 
const Double_tGetBinWidth (UInt_t bin) const
 Returns a pointer to the vector of the bin widths.
 
Double_t GetDataMax (UInt_t dim) const
 Returns the maximum of the data in the dim coordinate. 'dim' is between 0 and fDim - 1.
 
Double_t GetDataMin (UInt_t dim) const
 Returns the minimum of the data in the dim coordinate. 'dim' is between 0 and fDim - 1.
 
UInt_t GetDim () const
 Returns the number of dimensions.
 
const Double_tGetDimData (UInt_t dim) const
 
UInt_t GetNBins () const
 Returns the number of bins.
 
const Double_tGetOneDimBinEdges () const
 Returns a pointer to the vector of the bin edges for one dimensional binning only.
 
std::vector< std::vector< Double_t > > GetPointsInBin (UInt_t bin) const
 Return the corresponding point belonging to the bin i.
 
TKDTreeIDGetTree () const
 Returns the kD-Tree structure of the binning.
 
TClassIsA () const override
 
void SetNBins (UInt_t bins)
 Sets binning inner structure.
 
void SortBinsByDensity (Bool_t sortAsc=kTRUE)
 Sorts bins by their density.
 
const Double_tSortOneDimBinEdges (Bool_t sortAsc=kTRUE)
 Sort the one-dimensional bin edges and returns a pointer to them.
 
void Streamer (TBuffer &) override
 Stream a class object.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TObject
 TObject ()
 TObject constructor.
 
 TObject (const TObject &object)
 TObject copy ctor.
 
virtual ~TObject ()
 TObject destructor.
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract.
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad.
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action.
 
ULong_t CheckedHash ()
 Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object.
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs.
 
virtual void Clear (Option_t *="")
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility.
 
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method.
 
virtual void Copy (TObject &object) const
 Copy this to obj.
 
virtual void Delete (Option_t *option="")
 Delete this object.
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object.
 
virtual void Draw (Option_t *option="")
 Default Draw method for all objects.
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs.
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1).
 
virtual void Dump () const
 Dump contents of object on stdout.
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message.
 
virtual void Execute (const char *method, const char *params, Int_t *error=nullptr)
 Execute method on this object with the given parameter string, e.g.
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr)
 Execute method on this object with parameters stored in the TObjArray.
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py).
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message.
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes.
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes.
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object.
 
virtual const char * GetIconName () const
 Returns mime type name of object.
 
virtual const char * GetName () const
 Returns name of object.
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py).
 
virtual Option_tGetOption () const
 
virtual const char * GetTitle () const
 Returns title of object.
 
virtual UInt_t GetUniqueID () const
 Return the unique object id.
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out.
 
virtual ULong_t Hash () const
 Return hash value for this object.
 
Bool_t HasInconsistentHash () const
 Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e.
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message.
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname".
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl.
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas.
 
void InvertBit (UInt_t f)
 
Bool_t IsDestructed () const
 IsDestructed.
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory).
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
virtual Bool_t IsSortable () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
virtual void ls (Option_t *option="") const
 The ls function lists the contents of a class on stdout.
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary).
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification (the base implementation is no-op).
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete.
 
void operator delete (void *ptr)
 Operator delete.
 
void operator delete (void *ptr, void *vp)
 Only called by placement new when throwing an exception.
 
void operator delete[] (void *ptr)
 Operator delete [].
 
void operator delete[] (void *ptr, void *vp)
 Only called by placement new[] when throwing an exception.
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, void *vp)
 
void * operator new[] (size_t sz)
 
void * operator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator.
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself.
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list.
 
virtual void Print (Option_t *option="") const
 This method must be overridden when a class wants to print itself.
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory.
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list.
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename.
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out".
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f.
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object.
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message.
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked.
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message.
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory.
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory.
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TObject
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static Longptr_t GetDtorOnly ()
 Return destructor only flag.
 
static Bool_t GetObjectStat ()
 Get status of object stat flag.
 
static void SetDtorOnly (void *obj)
 Set destructor only flag.
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable.
 

Private Member Functions

 TKDTreeBinning (TKDTreeBinning &bins)
 Disallowed copy constructor.
 
TKDTreeBinning operator= (TKDTreeBinning &bins)
 Disallowed assign operator.
 
void ReadjustMaxBinEdges (Double_t *binEdges)
 
void ReadjustMinBinEdges (Double_t *binEdges)
 
void SetBinMinMaxEdges (Double_t *binEdges)
 
void SetBinsContent ()
 
void SetBinsEdges ()
 
void SetCommonBinEdges (Double_t *binEdges)
 
void SetData (const std::vector< double > &data)
 
void SetData (Double_t *data)
 
void SetTreeData ()
 

Private Attributes

std::vector< Double_tfBinMaxEdges
 The maximum values for the bins' edges for each dimension.
 
std::vector< Double_tfBinMinEdges
 The minimum values for the bins' edges for each dimension.
 
std::vector< UInt_tfBinsContent
 Holds the contents of the bins.
 
std::vector< std::vector< std::pair< Bool_t, Bool_t > > > fCheckedBinEdges
 ! Auxiliary structure for readjusting the bin edges. Flags if the bin edge was processed in the algorithm
 
std::vector< std::map< Double_t, std::vector< UInt_t > > > fCommonBinEdges
 ! Auxiliary structure for readjusting the bin edges. Keeps the common bin boundaries
 
std::vector< Double_tfData
 [fDataSize*fDim] The data from which a KDTree partition is computed for binning
 
TKDTreeIDfDataBins
 ! The binning inner structure.
 
UInt_t fDataSize
 The data size.
 
std::vector< std::pair< Double_t, Double_t > > fDataThresholds
 Minimum and maximum data values.
 
UInt_t fDim
 The data dimension.
 
std::vector< UInt_tfIndices
 Index of the bins in the kd-tree (needed when bins are sorted)
 
Bool_t fIsSorted
 Flags if the bin edges are sorted densitywise (or by bin endges in case of 1-dim )
 
Bool_t fIsSortedAsc
 Flags if the bin edges are sorted densitywise (or by bin-edge for 1D) in ascending order.
 
UInt_t fNBins
 The number of bins.
 

Friends

struct CompareAsc
 ! Predicate for ascending sort
 
struct CompareDesc
 ! Predicate for descending sort
 

Additional Inherited Members

- Protected Types inherited from TObject
enum  { kOnlyPrepStep = (1ULL << ( 3 )) }
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected).
 
void MakeZombie ()
 

#include <TKDTreeBinning.h>

Inheritance diagram for TKDTreeBinning:
[legend]

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kAdjustBinEdges 

adjust bin edges to avoid overlapping with data

Definition at line 66 of file TKDTreeBinning.h.

Constructor & Destructor Documentation

◆ TKDTreeBinning() [1/4]

TKDTreeBinning::TKDTreeBinning ( TKDTreeBinning bins)
private

Disallowed copy constructor.

◆ TKDTreeBinning() [2/4]

TKDTreeBinning::TKDTreeBinning ( )

Default constructor (for I/O)

Definition at line 112 of file TKDTreeBinning.cxx.

◆ TKDTreeBinning() [3/4]

TKDTreeBinning::TKDTreeBinning ( UInt_t  dataSize,
UInt_t  dataDim,
Double_t data,
UInt_t  nBins = 100,
bool  adjustBinEdges = false 
)

Class's constructor taking the size of the data points, dimension, a data array and the number of bins (default = 100).

It is recommended to have the number of bins as an exact divider of the data size. The data array must be organized with a stride=1 for the points and = N (the dataSize) for the dimension.

Thus data[] = x1,x2,x3,......xN, y1,y2,y3......yN, z1,z2,...........zN,....

Note that the passed dataSize is not the size of the array but is the number of points (N) The size of the array must be at least dataDim*dataSize

Definition at line 73 of file TKDTreeBinning.cxx.

◆ TKDTreeBinning() [4/4]

TKDTreeBinning::TKDTreeBinning ( UInt_t  dataSize,
UInt_t  dataDim,
const std::vector< double > &  data,
UInt_t  nBins = 100,
bool  adjustBinEdges = false 
)

Class's constructor taking the size of the data points, dimension, a data vector and the number of bins (default = 100).

It is recommended to have the number of bins as an exact divider of the data size. The data array must be organized with a stride=1 for the points and = N (the dataSize) for the dimension.

Thus data[] = x1,x2,x3,......xN, y1,y2,y3......yN, z1,z2,...........zN,....

Note that the passed data vector may contains a larger size, in case extra coordinates are associated but not used in building the kdtree The size of thedata vector must be at least dataDim*dataSize

Definition at line 97 of file TKDTreeBinning.cxx.

◆ ~TKDTreeBinning()

TKDTreeBinning::~TKDTreeBinning ( )
override

Class's destructor.

Definition at line 122 of file TKDTreeBinning.cxx.

Member Function Documentation

◆ Class()

static TClass * TKDTreeBinning::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * TKDTreeBinning::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t TKDTreeBinning::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 101 of file TKDTreeBinning.h.

◆ DeclFileName()

static const char * TKDTreeBinning::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 101 of file TKDTreeBinning.h.

◆ FillBinData()

void TKDTreeBinning::FillBinData ( ROOT::Fit::BinData data) const

Fill the bin data set (class ROOT::Fit::BinData) with the result of the TKDTree binning.

Definition at line 615 of file TKDTreeBinning.cxx.

◆ FindBin()

UInt_t TKDTreeBinning::FindBin ( const Double_t point) const

find the corresponding bin index given the coordinate of a point

Definition at line 625 of file TKDTreeBinning.cxx.

◆ GetBinCenter()

const Double_t * TKDTreeBinning::GetBinCenter ( UInt_t  bin) const

Returns the geometric center of of the bin.

'bin' is between 0 and fNBins - 1, Array must be deleted as "delete [] res"

Definition at line 554 of file TKDTreeBinning.cxx.

◆ GetBinContent()

UInt_t TKDTreeBinning::GetBinContent ( UInt_t  bin) const

Returns the number of points in bin. 'bin' is between 0 and fNBins - 1.

Definition at line 428 of file TKDTreeBinning.cxx.

◆ GetBinDensity()

Double_t TKDTreeBinning::GetBinDensity ( UInt_t  bin) const

Returns the density in bin.

'bin' is between 0 and fNBins - 1 The density is the bin content/ bin volume

Definition at line 474 of file TKDTreeBinning.cxx.

◆ GetBinEdges()

std::pair< const Double_t *, const Double_t * > TKDTreeBinning::GetBinEdges ( UInt_t  bin) const

Returns a pir with the bin's edges. 'bin' is between 0 and fNBins - 1.

Definition at line 405 of file TKDTreeBinning.cxx.

◆ GetBinMaxDensity()

UInt_t TKDTreeBinning::GetBinMaxDensity ( ) const

Return the bin with maximum density.

Definition at line 585 of file TKDTreeBinning.cxx.

◆ GetBinMaxEdges()

const Double_t * TKDTreeBinning::GetBinMaxEdges ( UInt_t  bin) const

Returns the bin's maximum edges. 'bin' is between 0 and fNBins - 1.

Definition at line 392 of file TKDTreeBinning.cxx.

◆ GetBinMinDensity()

UInt_t TKDTreeBinning::GetBinMinDensity ( ) const

Return the bin with minimum density.

Definition at line 600 of file TKDTreeBinning.cxx.

◆ GetBinMinEdges()

const Double_t * TKDTreeBinning::GetBinMinEdges ( UInt_t  bin) const

Returns the bin's minimum edges. 'bin' is between 0 and fNBins - 1.

Definition at line 379 of file TKDTreeBinning.cxx.

◆ GetBinsEdges()

std::pair< const Double_t *, const Double_t * > TKDTreeBinning::GetBinsEdges ( ) const

Returns a pair of an array with all bins minimum and maximum edges.

Definition at line 369 of file TKDTreeBinning.cxx.

◆ GetBinsMaxEdges()

const Double_t * TKDTreeBinning::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}.

Definition at line 359 of file TKDTreeBinning.cxx.

◆ GetBinsMinEdges()

const Double_t * TKDTreeBinning::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}.

Definition at line 349 of file TKDTreeBinning.cxx.

◆ GetBinVolume()

Double_t TKDTreeBinning::GetBinVolume ( UInt_t  bin) const

Returns the (hyper)volume of bin. 'bin' is between 0 and fNBins - 1.

Definition at line 487 of file TKDTreeBinning.cxx.

◆ GetBinWidth()

const Double_t * TKDTreeBinning::GetBinWidth ( UInt_t  bin) const

Returns a pointer to the vector of the bin widths.

'bin' is between 0 and fNBins - 1 Array must be deleted as "delete [] res"

Definition at line 570 of file TKDTreeBinning.cxx.

◆ GetDataMax()

Double_t TKDTreeBinning::GetDataMax ( UInt_t  dim) const

Returns the maximum of the data in the dim coordinate. 'dim' is between 0 and fDim - 1.

Definition at line 464 of file TKDTreeBinning.cxx.

◆ GetDataMin()

Double_t TKDTreeBinning::GetDataMin ( UInt_t  dim) const

Returns the minimum of the data in the dim coordinate. 'dim' is between 0 and fDim - 1.

Definition at line 455 of file TKDTreeBinning.cxx.

◆ GetDim()

UInt_t TKDTreeBinning::GetDim ( ) const

Returns the number of dimensions.

Definition at line 423 of file TKDTreeBinning.cxx.

◆ GetDimData()

const Double_t * TKDTreeBinning::GetDimData ( UInt_t  dim) const

Definition at line 446 of file TKDTreeBinning.cxx.

◆ GetNBins()

UInt_t TKDTreeBinning::GetNBins ( ) const

Returns the number of bins.

Definition at line 418 of file TKDTreeBinning.cxx.

◆ GetOneDimBinEdges()

const double * TKDTreeBinning::GetOneDimBinEdges ( ) const

Returns a pointer to the vector of the bin edges for one dimensional binning only.

size of the vector is fNBins + 1 is the vector has been sorted in increasing bin edges N.B : if one does not call SortOneDimBinEdges the bins are not ordered

Definition at line 504 of file TKDTreeBinning.cxx.

◆ GetPointsInBin()

std::vector< std::vector< Double_t > > TKDTreeBinning::GetPointsInBin ( UInt_t  bin) const

Return the corresponding point belonging to the bin i.

Definition at line 640 of file TKDTreeBinning.cxx.

◆ GetTree()

TKDTreeID * TKDTreeBinning::GetTree ( ) const

Returns the kD-Tree structure of the binning.

Definition at line 438 of file TKDTreeBinning.cxx.

◆ IsA()

TClass * TKDTreeBinning::IsA ( ) const
inlineoverridevirtual
Returns
TClass describing current object

Reimplemented from TObject.

Definition at line 101 of file TKDTreeBinning.h.

◆ operator=()

TKDTreeBinning TKDTreeBinning::operator= ( TKDTreeBinning bins)
private

Disallowed assign operator.

◆ ReadjustMaxBinEdges()

void TKDTreeBinning::ReadjustMaxBinEdges ( Double_t binEdges)
private

Definition at line 328 of file TKDTreeBinning.cxx.

◆ ReadjustMinBinEdges()

void TKDTreeBinning::ReadjustMinBinEdges ( Double_t binEdges)
private

Definition at line 299 of file TKDTreeBinning.cxx.

◆ SetBinMinMaxEdges()

void TKDTreeBinning::SetBinMinMaxEdges ( Double_t binEdges)
private

Definition at line 266 of file TKDTreeBinning.cxx.

◆ SetBinsContent()

void TKDTreeBinning::SetBinsContent ( )
private

Definition at line 241 of file TKDTreeBinning.cxx.

◆ SetBinsEdges()

void TKDTreeBinning::SetBinsEdges ( )
private

Definition at line 250 of file TKDTreeBinning.cxx.

◆ SetCommonBinEdges()

void TKDTreeBinning::SetCommonBinEdges ( Double_t binEdges)
private

Definition at line 278 of file TKDTreeBinning.cxx.

◆ SetData() [1/2]

void TKDTreeBinning::SetData ( const std::vector< double > &  data)
private

Definition at line 223 of file TKDTreeBinning.cxx.

◆ SetData() [2/2]

void TKDTreeBinning::SetData ( Double_t data)
private

Definition at line 210 of file TKDTreeBinning.cxx.

◆ SetNBins()

void TKDTreeBinning::SetNBins ( UInt_t  bins)

Sets binning inner structure.

Definition at line 128 of file TKDTreeBinning.cxx.

◆ SetTreeData()

void TKDTreeBinning::SetTreeData ( )
private

Definition at line 235 of file TKDTreeBinning.cxx.

◆ SortBinsByDensity()

void TKDTreeBinning::SortBinsByDensity ( Bool_t  sortAsc = kTRUE)

Sorts bins by their density.

Definition at line 158 of file TKDTreeBinning.cxx.

◆ SortOneDimBinEdges()

const Double_t * TKDTreeBinning::SortOneDimBinEdges ( Bool_t  sortAsc = kTRUE)

Sort the one-dimensional bin edges and returns a pointer to them.

Definition at line 515 of file TKDTreeBinning.cxx.

◆ Streamer()

void TKDTreeBinning::Streamer ( TBuffer b)
overridevirtual

Stream a class object.

Reimplemented from TObject.

Definition at line 671 of file TKDTreeBinning.cxx.

◆ StreamerNVirtual()

void TKDTreeBinning::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 101 of file TKDTreeBinning.h.

Friends And Related Symbol Documentation

◆ CompareAsc

friend struct CompareAsc
friend

! Predicate for ascending sort

Definition at line 47 of file TKDTreeBinning.h.

◆ CompareDesc

friend struct CompareDesc
friend

! Predicate for descending sort

Definition at line 49 of file TKDTreeBinning.h.

Member Data Documentation

◆ fBinMaxEdges

std::vector<Double_t> TKDTreeBinning::fBinMaxEdges
private

The maximum values for the bins' edges for each dimension.

Definition at line 34 of file TKDTreeBinning.h.

◆ fBinMinEdges

std::vector<Double_t> TKDTreeBinning::fBinMinEdges
private

The minimum values for the bins' edges for each dimension.

Definition at line 33 of file TKDTreeBinning.h.

◆ fBinsContent

std::vector<UInt_t> TKDTreeBinning::fBinsContent
private

Holds the contents of the bins.

Definition at line 45 of file TKDTreeBinning.h.

◆ fCheckedBinEdges

std::vector<std::vector<std::pair<Bool_t, Bool_t> > > TKDTreeBinning::fCheckedBinEdges
private

! Auxiliary structure for readjusting the bin edges. Flags if the bin edge was processed in the algorithm

Definition at line 41 of file TKDTreeBinning.h.

◆ fCommonBinEdges

std::vector<std::map<Double_t, std::vector<UInt_t> > > TKDTreeBinning::fCommonBinEdges
private

! Auxiliary structure for readjusting the bin edges. Keeps the common bin boundaries

Definition at line 42 of file TKDTreeBinning.h.

◆ fData

std::vector<Double_t> TKDTreeBinning::fData
private

[fDataSize*fDim] The data from which a KDTree partition is computed for binning

Definition at line 32 of file TKDTreeBinning.h.

◆ fDataBins

TKDTreeID* TKDTreeBinning::fDataBins
private

! The binning inner structure.

Definition at line 36 of file TKDTreeBinning.h.

◆ fDataSize

UInt_t TKDTreeBinning::fDataSize
private

The data size.

Definition at line 39 of file TKDTreeBinning.h.

◆ fDataThresholds

std::vector<std::pair<Double_t, Double_t> > TKDTreeBinning::fDataThresholds
private

Minimum and maximum data values.

Definition at line 40 of file TKDTreeBinning.h.

◆ fDim

UInt_t TKDTreeBinning::fDim
private

The data dimension.

Definition at line 38 of file TKDTreeBinning.h.

◆ fIndices

std::vector<UInt_t> TKDTreeBinning::fIndices
private

Index of the bins in the kd-tree (needed when bins are sorted)

Definition at line 35 of file TKDTreeBinning.h.

◆ fIsSorted

Bool_t TKDTreeBinning::fIsSorted
private

Flags if the bin edges are sorted densitywise (or by bin endges in case of 1-dim )

Definition at line 43 of file TKDTreeBinning.h.

◆ fIsSortedAsc

Bool_t TKDTreeBinning::fIsSortedAsc
private

Flags if the bin edges are sorted densitywise (or by bin-edge for 1D) in ascending order.

Definition at line 44 of file TKDTreeBinning.h.

◆ fNBins

UInt_t TKDTreeBinning::fNBins
private

The number of bins.

Definition at line 37 of file TKDTreeBinning.h.

Libraries for TKDTreeBinning:

The documentation for this class was generated from the following files: