14#ifndef ROOT_Math_KDTree
15#define ROOT_Math_KDTree
34 template<
class _DataPo
int>
101 virtual void Print(
int iRow = 0)
const = 0;
212 virtual void Print(
int iRow = 0)
const;
237 friend class KDTree<_DataPoint>;
255 virtual void Print(
int iRow = 0)
const;
263 typedef typename std::vector<const point_type* >::iterator
data_it;
264 typedef typename std::vector<const point_type* >::const_iterator
const_data_it;
297 friend class KDTree<_DataPoint>;
340 const iterator
First()
const;
354 const iterator
Last()
const;
BaseNode *& GetParentPointer()
BaseNode(const BaseNode &)
const BaseNode * LeftChild() const
virtual Bool_t Insert(const point_type &rPoint)=0
const BaseNode * Parent() const
virtual const BinNode * FindNode(const point_type &rPoint) const =0
const BaseNode * RightChild() const
virtual void GetPointsWithinDist(const point_type &rRef, value_type fDist, std::vector< const point_type * > &vFoundPoints) const =0
virtual void GetClosestPoints(const point_type &rRef, UInt_t nPoints, std::vector< std::pair< const _DataPoint *, Double_t > > &vFoundPoints) const =0
Bool_t IsLeftChild() const
BaseNode * fRightChild
pointer to left child
virtual Bool_t IsHeadNode() const
BaseNode & operator=(const BaseNode &)
virtual void Print(int iRow=0) const =0
virtual BaseNode * Clone()=0
BaseNode * fLeftChild
pointer to parent node
virtual void GetPointsWithinDist(const point_type &, value_type, std::vector< const point_type * > &) const
virtual const std::vector< tBoundary > & GetBoundaries() const
std::vector< tBoundary > fBoundaries
bin boundaries
virtual const BinNode * FindNode(const point_type &rPoint) const
virtual BinNode * Clone()
point_type GetBinCenter() const
Double_t GetSumw2() const
virtual void GetClosestPoints(const point_type &, UInt_t, std::vector< std::pair< const _DataPoint *, Double_t > > &) const
virtual Bool_t Insert(const point_type &rPoint)
std::pair< value_type, value_type > tBoundary
Bool_t IsInBin(const point_type &rPoint) const
BinNode & operator=(const BinNode &rhs)
Double_t fSumw2
sum of weights^2
UInt_t GetEntries() const
UInt_t fEntries
number of entries
Double_t GetDensity() const
Double_t GetEffectiveEntries() const
Double_t fSumw
sum of weights
Double_t GetBinContent() const
Double_t GetVolume() const
Bool_t operator()(const point_type *pFirst, const point_type *pSecond) const
void SetAxis(UInt_t iAxis)
value_type GetCutValue() const
Cut(UInt_t iAxis, Double_t fNewCutValue)
Bool_t operator>(const point_type &rPoint) const
void SetAxis(UInt_t iAxis)
void SetCutValue(Double_t fNewCutValue)
Bool_t operator<(const point_type &rPoint) const
virtual bool IsHeadNode() const
virtual Bool_t Insert(const point_type &rPoint)
HeadNode & operator=(const HeadNode &)
HeadNode(BaseNode &rNode)
HeadNode(const HeadNode &)
virtual void GetPointsWithinDist(const point_type &rRef, value_type fDist, std::vector< const _DataPoint * > &vFoundPoints) const
virtual void Print(Int_t) const
virtual HeadNode * Clone()
virtual const BinNode * FindNode(const point_type &rPoint) const
virtual void GetClosestPoints(const point_type &rRef, UInt_t nPoints, std::vector< std::pair< const _DataPoint *, Double_t > > &vFoundPoints) const
virtual void GetClosestPoints(const point_type &rRef, UInt_t nPoints, std::vector< std::pair< const _DataPoint *, Double_t > > &vFoundPoints) const
virtual void GetPointsWithinDist(const point_type &rRef, value_type fDist, std::vector< const _DataPoint * > &vFoundPoints) const
const Cut * GetCut() const
virtual const BinNode * FindNode(const point_type &rPoint) const
SplitNode & operator=(const SplitNode &)
virtual SplitNode * Clone()
SplitNode(const SplitNode &)
virtual Bool_t Insert(const point_type &rPoint)
virtual const std::vector< tBoundary > & GetBoundaries() const
data_it SplitBinContent()
std::vector< constpoint_type * >::iterator data_it
Double_t fBucketSize
target number of entries per bucket
void SetOwner(Bool_t bIsOwner=true)
void SetSplitOption(eSplitOption opt)
Bool_t fOwnData
terminal node owns the data objects (default = false)
virtual const BinNode * FindNode(const point_type &) const
std::pair< value_type, value_type > tBoundary
virtual void GetPointsWithinDist(const point_type &rRef, value_type fDist, std::vector< const _DataPoint * > &vFoundPoints) const
BinNode * ConvertToBinNode()
virtual Bool_t Insert(const point_type &rPoint)
std::vector< constpoint_type * >::const_iterator const_data_it
UInt_t fSplitAxis
axis at which the next split will occur
virtual void GetClosestPoints(const point_type &rRef, UInt_t nPoints, std::vector< std::pair< const _DataPoint *, Double_t > > &vFoundPoints) const
TerminalNode & operator=(const TerminalNode &)
TerminalNode(const TerminalNode &)
data_it SplitEffectiveEntries()
virtual BinNode * Clone()
std::vector< const _DataPoint * > fDataPoints
data points in this bucket
const std::vector< const point_type * > & GetPoints() const
eSplitOption fSplitOption
according to which figure of merit the node is split
bool operator==(const iterator &rIterator) const
const Bin & operator*() const
bool operator!=(const iterator &rIterator) const
iterator(const iterator ©)
iterator & operator=(const iterator &rhs)
const Bin * operator->() const
Double_t GetTotalSumw2() const
Bool_t Insert(const point_type &rData)
void SetOwner(Bool_t bIsOwner=true)
KDTree< _DataPoint > * GetFrozenCopy()
Double_t GetTotalSumw() const
_DataPoint::value_type value_type
const Bin * FindBin(const point_type &rPoint) const
UInt_t GetEntries() const
void GetPointsWithinDist(const point_type &rRef, value_type fDist, std::vector< const point_type * > &vFoundPoints) const
Double_t GetBucketSize() const
Double_t GetEffectiveEntries() const
KDTree< point_type > & operator=(const KDTree< point_type > &)
void SetSplitOption(eSplitOption opt)
void GetClosestPoints(const point_type &rRef, UInt_t nPoints, std::vector< std::pair< const _DataPoint *, Double_t > > &vFoundPoints) const
KDTree(const KDTree< point_type > &)
static UInt_t Dimension()
Namespace for new Math classes and functions.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...