TKDTree< Index, Value > Class Template Reference

#include <TKDTree.h>

Inheritance diagram for TKDTree< Index, Value >:

TObject TObject List of all members.

Public Member Functions

 TKDTree ()
 TKDTree (Index npoints, Index ndim, UInt_t bsize)
 TKDTree (Index npoints, Index ndim, UInt_t bsize, Value **data)
 ~TKDTree ()
void Build ()
Double_t Distance (const Value *point, Index ind, Int_t type=2) const
void DistanceToNode (const Value *point, Index inode, Value &min, Value &max, Int_t type=2)
Int_t GetLeft (Int_t inode) const
Int_t GetRight (Int_t inode) const
Int_t GetParent (Int_t inode) const
Index * GetPointsIndexes (Int_t node) const
void GetNodePointsIndexes (Int_t node, Int_t &first1, Int_t &last1, Int_t &first2, Int_t &last2) const
UChar_t GetNodeAxis (Int_t id) const
Value GetNodeValue (Int_t id) const
Int_t GetNNodes () const
Int_t GetTotalNodes () const
Value * GetBoundaries ()
Value * GetBoundariesExact ()
Value * GetBoundary (const Int_t node)
Value * GetBoundaryExact (const Int_t node)
Index GetNPoints ()
Index GetNDim ()
Index GetNPointsNode (Int_t node) const
Int_t GetRowT0 ()
Int_t GetCrossNode ()
 smallest terminal row
Int_t GetOffset ()
 cross node
Index * GetIndPoints ()
 offset in fIndPoints
Index GetBucketSize ()
void FindNearestNeighbors (const Value *point, Int_t k, Index *ind, Value *dist)
Index FindNode (const Value *point) const
void FindPoint (Value *point, Index &index, Int_t &iter)
void FindInRange (Value *point, Value range, std::vector< Index > &res)
void FindBNodeA (Value *point, Value *delta, Int_t &inode)
Bool_t IsTerminal (Index inode) const
Int_t IsOwner ()
Value KOrdStat (Index ntotal, Value *a, Index k, Index *index) const
void MakeBoundaries (Value *range=0x0)
void MakeBoundariesExact ()
void SetData (Index npoints, Index ndim, UInt_t bsize, Value **data)
Int_t SetData (Index idim, Value *data)
void SetOwner (Int_t owner)
void Spread (Index ntotal, Value *a, Index *index, Value &min, Value &max) const
 TKDTree ()
 TKDTree (Index npoints, Index ndim, UInt_t bsize)
 TKDTree (Index npoints, Index ndim, UInt_t bsize, Value **data)
 ~TKDTree ()
void Build ()
Double_t Distance (const Value *point, Index ind, Int_t type=2) const
void DistanceToNode (const Value *point, Index inode, Value &min, Value &max, Int_t type=2)
Int_t GetLeft (Int_t inode) const
Int_t GetRight (Int_t inode) const
Int_t GetParent (Int_t inode) const
Index * GetPointsIndexes (Int_t node) const
void GetNodePointsIndexes (Int_t node, Int_t &first1, Int_t &last1, Int_t &first2, Int_t &last2) const
UChar_t GetNodeAxis (Int_t id) const
Value GetNodeValue (Int_t id) const
Int_t GetNNodes () const
Int_t GetTotalNodes () const
Value * GetBoundaries ()
Value * GetBoundariesExact ()
Value * GetBoundary (const Int_t node)
Value * GetBoundaryExact (const Int_t node)
Index GetNPoints ()
Index GetNDim ()
Index GetNPointsNode (Int_t node) const
Int_t GetRowT0 ()
Int_t GetCrossNode ()
 smallest terminal row
Int_t GetOffset ()
 cross node
Index * GetIndPoints ()
 offset in fIndPoints
Index GetBucketSize ()
void FindNearestNeighbors (const Value *point, Int_t k, Index *ind, Value *dist)
Index FindNode (const Value *point) const
void FindPoint (Value *point, Index &index, Int_t &iter)
void FindInRange (Value *point, Value range, std::vector< Index > &res)
void FindBNodeA (Value *point, Value *delta, Int_t &inode)
Bool_t IsTerminal (Index inode) const
Int_t IsOwner ()
Value KOrdStat (Index ntotal, Value *a, Index k, Index *index) const
void MakeBoundaries (Value *range=0x0)
void MakeBoundariesExact ()
void SetData (Index npoints, Index ndim, UInt_t bsize, Value **data)
Int_t SetData (Index idim, Value *data)
void SetOwner (Int_t owner)
void Spread (Index ntotal, Value *a, Index *index, Value &min, Value &max) const
template<>
TClassClass ()
template<>
TClassClass ()
template<>
void Streamer (TBuffer &R__b)
template<>
void Streamer (TBuffer &R__b)

Protected Attributes

Int_t fDataOwner
Int_t fNNodes
 0 - not owner, 2 - owner of the pointer array, 1 - owner of the whole 2-d array
Int_t fTotalNodes
Index fNDim
Index fNDimm
Index fNPoints
Index fBucketSize
UChar_tfAxis
Value * fValue
Value * fRange
Value ** fData
Value * fBoundaries
 data points
Index * fIndPoints
 nodes boundaries
Int_t fRowT0
 array of points indexes
Int_t fCrossNode
 smallest terminal row - first row that contains terminal nodes
Int_t fOffset
 cross node - node that begins the last row (with terminal nodes only)
UChar_tfAxis
Value * fValue
Value * fRange
Value ** fData
Value * fBoundaries
 data points
Index * fIndPoints
 nodes boundaries

Private Member Functions

 TKDTree (const TKDTree &)
TKDTree< Index, Value > & operator= (const TKDTree< Index, Value > &)
void CookBoundaries (const Int_t node, Bool_t left)
void UpdateNearestNeighbors (Index inode, const Value *point, Int_t kNN, Index *ind, Value *dist)
void UpdateRange (Index inode, Value *point, Value range, std::vector< Index > &res)
 TKDTree (const TKDTree &)
TKDTree< Index, Value > & operator= (const TKDTree< Index, Value > &)
void CookBoundaries (const Int_t node, Bool_t left)
void UpdateNearestNeighbors (Index inode, const Value *point, Int_t kNN, Index *ind, Value *dist)
void UpdateRange (Index inode, Value *point, Value range, std::vector< Index > &res)

Detailed Description

template<typename Index, typename Value>
class TKDTree< Index, Value >

Definition at line 11 of file TKDTree.h.


Constructor & Destructor Documentation

template<typename Index, typename Value>
Value TKDTree< Index, Value >::TKDTree (  ) 

Definition at line 248 of file TKDTree.cxx.

template<typename Index, typename Value>
TKDTree< Index, Value >::TKDTree ( Index  npoints,
Index  ndim,
UInt_t  bsize 
)

Definition at line 271 of file TKDTree.cxx.

template<typename Index, typename Value>
TKDTree< Index, Value >::TKDTree ( Index  npoints,
Index  ndim,
UInt_t  bsize,
Value **  data 
)

Definition at line 300 of file TKDTree.cxx.

template<typename Index, typename Value>
TKDTree< Index, Value >::~TKDTree (  ) 

Definition at line 348 of file TKDTree.cxx.

References TKDTree< Index, Value >::fAxis, TKDTree< Index, Value >::fBoundaries, TKDTree< Index, Value >::fData, TKDTree< Index, Value >::fDataOwner, TKDTree< Index, Value >::fIndPoints, TKDTree< Index, Value >::fNDim, TKDTree< Index, Value >::fRange, and TKDTree< Index, Value >::fValue.

template<typename Index, typename Value>
TKDTree< Index, Value >::TKDTree ( const TKDTree< Index, Value > &   )  [private]

template<typename Index, typename Value>
TKDTree< Index, Value >::TKDTree (  ) 

template<typename Index, typename Value>
TKDTree< Index, Value >::TKDTree ( Index  npoints,
Index  ndim,
UInt_t  bsize 
)

template<typename Index, typename Value>
TKDTree< Index, Value >::TKDTree ( Index  npoints,
Index  ndim,
UInt_t  bsize,
Value **  data 
)

template<typename Index, typename Value>
TKDTree< Index, Value >::~TKDTree (  ) 

template<typename Index, typename Value>
TKDTree< Index, Value >::TKDTree ( const TKDTree< Index, Value > &   )  [private]


Member Function Documentation

template<typename Index, typename Value>
void TKDTree< Index, Value >::Build (  ) 

Definition at line 378 of file TKDTree.cxx.

References array, TKDTree< Index, Value >::fAxis, TKDTree< Index, Value >::fBucketSize, TKDTree< Index, Value >::fCrossNode, TKDTree< Index, Value >::fData, TKDTree< Index, Value >::fIndPoints, TKDTree< Index, Value >::fNDim, TKDTree< Index, Value >::fNNodes, TKDTree< Index, Value >::fNPoints, TKDTree< Index, Value >::fOffset, Form(), TKDTree< Index, Value >::fRange, TKDTree< Index, Value >::fRowT0, TKDTree< Index, Value >::fTotalNodes, TKDTree< Index, Value >::fValue, i, RooFit::Index(), TObject::Info(), TKDTree< Index, Value >::KOrdStat(), max, min, TKDTree< Index, Value >::Spread(), xmlio::Value, and TObject::Warning().

Referenced by TKDTree< Index, Value >::SetData(), TKDTreeBinning::SetNBins(), TestBuild(), TestConstr(), TestMembers(), TestNeighbors(), TestRange(), and TestSpeed().

template<typename Index, typename Value>
Double_t TKDTree< Index, Value >::Distance ( const Value *  point,
Index  ind,
Int_t  type = 2 
) const

Definition at line 591 of file TKDTree.cxx.

References TMath::Abs(), ROOT::Math::gv_detail::dist(), TKDTree< Index, Value >::fData, TKDTree< Index, Value >::fNDim, and TMath::Sqrt().

Referenced by TKDTree< Index, Value >::UpdateNearestNeighbors(), and TKDTree< Index, Value >::UpdateRange().

template<typename Index, typename Value>
void TKDTree< Index, Value >::DistanceToNode ( const Value *  point,
Index  inode,
Value &  min,
Value &  max,
Int_t  type = 2 
)

Definition at line 615 of file TKDTree.cxx.

References TMath::Abs(), TKDTree< Index, Value >::fNDimm, TKDTree< Index, Value >::GetBoundaryExact(), TMath::Sqrt(), and xmlio::Value.

Referenced by TKDTree< Index, Value >::UpdateNearestNeighbors(), and TKDTree< Index, Value >::UpdateRange().

template<typename Index, typename Value>
Int_t TKDTree< Index, Value >::GetLeft ( Int_t  inode  )  const [inline]

Definition at line 26 of file TKDTree.h.

Referenced by TKDTree< Index, Value >::GetNodePointsIndexes(), TKDTree< Index, Value >::MakeBoundariesExact(), TKDTree< Index, Value >::UpdateNearestNeighbors(), and TKDTree< Index, Value >::UpdateRange().

template<typename Index, typename Value>
Int_t TKDTree< Index, Value >::GetRight ( Int_t  inode  )  const [inline]

Definition at line 27 of file TKDTree.h.

Referenced by TKDTree< Index, Value >::GetNodePointsIndexes(), TKDTree< Index, Value >::MakeBoundariesExact(), TKDTree< Index, Value >::UpdateNearestNeighbors(), and TKDTree< Index, Value >::UpdateRange().

template<typename Index, typename Value>
Int_t TKDTree< Index, Value >::GetParent ( Int_t  inode  )  const [inline]

Definition at line 28 of file TKDTree.h.

template<typename Index, typename Value>
Index * TKDTree< Index, Value >::GetPointsIndexes ( Int_t  node  )  const

Definition at line 792 of file TKDTree.cxx.

References TKDTree< Index, Value >::fBucketSize, TKDTree< Index, Value >::fCrossNode, TKDTree< Index, Value >::fIndPoints, TKDTree< Index, Value >::fNNodes, TKDTree< Index, Value >::fOffset, and TKDTree< Index, Value >::IsTerminal().

Referenced by TKDTree< Index, Value >::MakeBoundariesExact().

template<typename Index, typename Value>
void TKDTree< Index, Value >::GetNodePointsIndexes ( Int_t  node,
Int_t first1,
Int_t last1,
Int_t first2,
Int_t last2 
) const

Definition at line 808 of file TKDTree.cxx.

References f2, TKDTree< Index, Value >::fBucketSize, TKDTree< Index, Value >::fCrossNode, TKDTree< Index, Value >::fNNodes, TKDTree< Index, Value >::fOffset, TKDTree< Index, Value >::fTotalNodes, TKDTree< Index, Value >::GetLeft(), TKDTree< Index, Value >::GetNPointsNode(), TKDTree< Index, Value >::GetRight(), RooFit::Index(), and TKDTree< Index, Value >::IsTerminal().

Referenced by TKDTree< Index, Value >::GetNPointsNode(), TKDTree< Index, Value >::UpdateNearestNeighbors(), and TKDTree< Index, Value >::UpdateRange().

template<typename Index, typename Value>
UChar_t TKDTree< Index, Value >::GetNodeAxis ( Int_t  id  )  const [inline]

Definition at line 33 of file TKDTree.h.

References TKDTree< Index, Value >::fAxis, and TKDTree< Index, Value >::fNNodes.

template<typename Index, typename Value>
Value TKDTree< Index, Value >::GetNodeValue ( Int_t  id  )  const [inline]

Definition at line 34 of file TKDTree.h.

References TKDTree< Index, Value >::fNNodes, and TKDTree< Index, Value >::fValue.

Referenced by TestConstr().

template<typename Index, typename Value>
Int_t TKDTree< Index, Value >::GetNNodes (  )  const [inline]

Definition at line 35 of file TKDTree.h.

References TKDTree< Index, Value >::fNNodes.

Referenced by TKDTreeBinning::SetBinsEdges(), TestConstr(), TestMembers(), and TestSpeed().

template<typename Index, typename Value>
Int_t TKDTree< Index, Value >::GetTotalNodes (  )  const [inline]

Definition at line 36 of file TKDTree.h.

References TKDTree< Index, Value >::fTotalNodes.

template<typename Index, typename Value>
Value * TKDTree< Index, Value >::GetBoundaries (  ) 

Definition at line 1165 of file TKDTree.cxx.

References TKDTree< Index, Value >::fBoundaries, and TKDTree< Index, Value >::MakeBoundaries().

template<typename Index, typename Value>
Value * TKDTree< Index, Value >::GetBoundariesExact (  ) 

Definition at line 1175 of file TKDTree.cxx.

References TKDTree< Index, Value >::fBoundaries, and TKDTree< Index, Value >::MakeBoundariesExact().

template<typename Index, typename Value>
Value * TKDTree< Index, Value >::GetBoundary ( const Int_t  node  ) 

Definition at line 1184 of file TKDTree.cxx.

References TKDTree< Index, Value >::fBoundaries, TKDTree< Index, Value >::fNDim, and TKDTree< Index, Value >::MakeBoundaries().

Referenced by TKDTreeBinning::SetBinsEdges().

template<typename Index, typename Value>
Value * TKDTree< Index, Value >::GetBoundaryExact ( const Int_t  node  ) 

Definition at line 1193 of file TKDTree.cxx.

References TKDTree< Index, Value >::fBoundaries, TKDTree< Index, Value >::fNDim, and TKDTree< Index, Value >::MakeBoundariesExact().

Referenced by TKDTree< Index, Value >::DistanceToNode().

template<typename Index, typename Value>
Index TKDTree< Index, Value >::GetNPoints (  )  [inline]

Definition at line 41 of file TKDTree.h.

References TKDTree< Index, Value >::fNPoints.

template<typename Index, typename Value>
Index TKDTree< Index, Value >::GetNDim (  )  [inline]

Definition at line 42 of file TKDTree.h.

References TKDTree< Index, Value >::fNDim.

template<typename Index, typename Value>
Index TKDTree< Index, Value >::GetNPointsNode ( Int_t  node  )  const

Definition at line 875 of file TKDTree.cxx.

References f2, TKDTree< Index, Value >::fBucketSize, TKDTree< Index, Value >::fOffset, TKDTree< Index, Value >::fTotalNodes, TKDTree< Index, Value >::GetNodePointsIndexes(), and TKDTree< Index, Value >::IsTerminal().

Referenced by TKDTree< Index, Value >::GetNodePointsIndexes(), and TKDTree< Index, Value >::MakeBoundariesExact().

template<typename Index, typename Value>
Int_t TKDTree< Index, Value >::GetRowT0 (  )  [inline]

Definition at line 46 of file TKDTree.h.

References TKDTree< Index, Value >::fRowT0.

Referenced by TestMembers().

template<typename Index, typename Value>
Int_t TKDTree< Index, Value >::GetCrossNode (  )  [inline]

smallest terminal row

Definition at line 47 of file TKDTree.h.

References TKDTree< Index, Value >::fCrossNode.

Referenced by TestMembers().

template<typename Index, typename Value>
Int_t TKDTree< Index, Value >::GetOffset (  )  [inline]

cross node

Definition at line 48 of file TKDTree.h.

References TKDTree< Index, Value >::fOffset.

Referenced by TestMembers().

template<typename Index, typename Value>
Index* TKDTree< Index, Value >::GetIndPoints (  )  [inline]

offset in fIndPoints

Definition at line 49 of file TKDTree.h.

References TKDTree< Index, Value >::fIndPoints.

template<typename Index, typename Value>
Index TKDTree< Index, Value >::GetBucketSize (  )  [inline]

Definition at line 50 of file TKDTree.h.

References TKDTree< Index, Value >::fBucketSize.

Referenced by TKDTreeBinning::SetBinsContent(), and TKDTreeBinning::SortBinsByDensity().

template<typename Index, typename Value>
void TKDTree< Index, Value >::FindNearestNeighbors ( const Value *  point,
Int_t  k,
Index *  ind,
Value *  dist 
)

Definition at line 523 of file TKDTree.cxx.

References TObject::Error(), i, TKDTree< Index, Value >::MakeBoundariesExact(), max, and TKDTree< Index, Value >::UpdateNearestNeighbors().

Referenced by TestNeighbors().

template<typename Index, typename Value>
Index TKDTree< Index, Value >::FindNode ( const Value *  point  )  const

Definition at line 652 of file TKDTree.cxx.

References TKDTree< Index, Value >::fAxis, TKDTree< Index, Value >::fValue, RooFit::Index(), and TKDTree< Index, Value >::IsTerminal().

template<typename Index, typename Value>
void TKDTree< Index, Value >::FindPoint ( Value *  point,
Index &  index,
Int_t iter 
)

Definition at line 683 of file TKDTree.cxx.

References TKDTree< Index, Value >::fAxis, TKDTree< Index, Value >::fBucketSize, TKDTree< Index, Value >::fCrossNode, TKDTree< Index, Value >::fData, TKDTree< Index, Value >::fIndPoints, TKDTree< Index, Value >::fNDim, TKDTree< Index, Value >::fNNodes, TKDTree< Index, Value >::fOffset, TKDTree< Index, Value >::fValue, TKDTree< Index, Value >::IsTerminal(), kFALSE, and kTRUE.

template<typename Index, typename Value>
void TKDTree< Index, Value >::FindInRange ( Value *  point,
Value  range,
std::vector< Index > &  res 
)

Definition at line 728 of file TKDTree.cxx.

References TKDTree< Index, Value >::MakeBoundariesExact(), and TKDTree< Index, Value >::UpdateRange().

Referenced by TestRange().

template<typename Index, typename Value>
void TKDTree< Index, Value >::FindBNodeA ( Value *  point,
Value *  delta,
Int_t inode 
)

Definition at line 1152 of file TKDTree.cxx.

References TMath::Abs(), TKDTree< Index, Value >::fAxis, TKDTree< Index, Value >::fNNodes, and TKDTree< Index, Value >::fValue.

template<typename Index, typename Value>
Bool_t TKDTree< Index, Value >::IsTerminal ( Index  inode  )  const [inline]

Definition at line 58 of file TKDTree.h.

References TKDTree< Index, Value >::fNNodes.

Referenced by TKDTree< Index, Value >::FindNode(), TKDTree< Index, Value >::FindPoint(), TKDTree< Index, Value >::GetNodePointsIndexes(), TKDTree< Index, Value >::GetNPointsNode(), TKDTree< Index, Value >::GetPointsIndexes(), TKDTree< Index, Value >::MakeBoundaries(), TKDTree< Index, Value >::UpdateNearestNeighbors(), and TKDTree< Index, Value >::UpdateRange().

template<typename Index, typename Value>
Int_t TKDTree< Index, Value >::IsOwner (  )  [inline]

Definition at line 59 of file TKDTree.h.

References TKDTree< Index, Value >::fDataOwner.

template<typename Index, typename Value>
Value TKDTree< Index, Value >::KOrdStat ( Index  ntotal,
Value *  a,
Index  k,
Index *  index 
) const

Definition at line 961 of file TKDTree.cxx.

References i, RooFit::Index(), j, l, and xmlio::Value.

Referenced by TKDTree< Index, Value >::Build().

template<typename Index, typename Value>
void TKDTree< Index, Value >::MakeBoundaries ( Value *  range = 0x0  ) 

Definition at line 1010 of file TKDTree.cxx.

References TKDTree< Index, Value >::CookBoundaries(), TKDTree< Index, Value >::fBoundaries, TKDTree< Index, Value >::fBucketSize, TKDTree< Index, Value >::fNDim, TKDTree< Index, Value >::fNDimm, TKDTree< Index, Value >::fNNodes, TKDTree< Index, Value >::fRange, TKDTree< Index, Value >::IsTerminal(), kFALSE, kTRUE, and xmlio::Value.

Referenced by TKDTree< Index, Value >::GetBoundaries(), and TKDTree< Index, Value >::GetBoundary().

template<typename Index, typename Value>
void TKDTree< Index, Value >::MakeBoundariesExact (  ) 

Definition at line 1089 of file TKDTree.cxx.

References TKDTree< Index, Value >::fBoundaries, TKDTree< Index, Value >::fData, TKDTree< Index, Value >::fNDim, TKDTree< Index, Value >::fNDimm, TKDTree< Index, Value >::fNNodes, TKDTree< Index, Value >::fTotalNodes, TKDTree< Index, Value >::GetLeft(), TKDTree< Index, Value >::GetNPointsNode(), TKDTree< Index, Value >::GetPointsIndexes(), TKDTree< Index, Value >::GetRight(), RooFit::Index(), max, TMath::Max(), min, TMath::Min(), points, and xmlio::Value.

Referenced by TKDTree< Index, Value >::FindInRange(), TKDTree< Index, Value >::FindNearestNeighbors(), TKDTree< Index, Value >::GetBoundariesExact(), and TKDTree< Index, Value >::GetBoundaryExact().

template<typename Index, typename Value>
void TKDTree< Index, Value >::SetData ( Index  npoints,
Index  ndim,
UInt_t  bsize,
Value **  data 
)

Definition at line 900 of file TKDTree.cxx.

References TKDTree< Index, Value >::Build(), TObject::Clear(), TKDTree< Index, Value >::fBucketSize, TKDTree< Index, Value >::fData, and TKDTree< Index, Value >::fNDim.

Referenced by TKDTreeBinning::SetTreeData(), TestConstr(), TestMembers(), TestNeighbors(), and TestRange().

template<typename Index, typename Value>
Int_t TKDTree< Index, Value >::SetData ( Index  idim,
Value *  data 
)

Definition at line 922 of file TKDTree.cxx.

References TObject::Error(), TKDTree< Index, Value >::fAxis, TKDTree< Index, Value >::fData, TKDTree< Index, Value >::fDataOwner, TKDTree< Index, Value >::fNDim, TKDTree< Index, Value >::fValue, and xmlio::Value.

template<typename Index, typename Value>
void TKDTree< Index, Value >::SetOwner ( Int_t  owner  )  [inline]

Definition at line 67 of file TKDTree.h.

References TKDTree< Index, Value >::fDataOwner.

template<typename Index, typename Value>
void TKDTree< Index, Value >::Spread ( Index  ntotal,
Value *  a,
Index *  index,
Value &  min,
Value &  max 
) const

Definition at line 945 of file TKDTree.cxx.

References i, and RooFit::Index().

Referenced by TKDTree< Index, Value >::Build().

template<typename Index, typename Value>
TKDTree<Index, Value>& TKDTree< Index, Value >::operator= ( const TKDTree< Index, Value > &   )  [private]

template<typename Index, typename Value>
void TKDTree< Index, Value >::CookBoundaries ( const Int_t  node,
Bool_t  left 
) [private]

Definition at line 1051 of file TKDTree.cxx.

References TKDTree< Index, Value >::fAxis, TKDTree< Index, Value >::fBoundaries, flag, TKDTree< Index, Value >::fNDimm, TKDTree< Index, Value >::fRange, TKDTree< Index, Value >::fValue, kFALSE, kTRUE, and xmlio::Value.

Referenced by TKDTree< Index, Value >::MakeBoundaries().

template<typename Index, typename Value>
void TKDTree< Index, Value >::UpdateNearestNeighbors ( Index  inode,
const Value *  point,
Int_t  kNN,
Index *  ind,
Value *  dist 
) [private]

Definition at line 545 of file TKDTree.cxx.

References d, TKDTree< Index, Value >::Distance(), TKDTree< Index, Value >::DistanceToNode(), f2, TKDTree< Index, Value >::fAxis, TKDTree< Index, Value >::fIndPoints, TKDTree< Index, Value >::fValue, TKDTree< Index, Value >::GetLeft(), TKDTree< Index, Value >::GetNodePointsIndexes(), TKDTree< Index, Value >::GetRight(), i, RooFit::Index(), TKDTree< Index, Value >::IsTerminal(), max, min, and xmlio::Value.

Referenced by TKDTree< Index, Value >::FindNearestNeighbors().

template<typename Index, typename Value>
void TKDTree< Index, Value >::UpdateRange ( Index  inode,
Value *  point,
Value  range,
std::vector< Index > &  res 
) [private]

Definition at line 741 of file TKDTree.cxx.

References d, TKDTree< Index, Value >::Distance(), TKDTree< Index, Value >::DistanceToNode(), f2, TKDTree< Index, Value >::fAxis, TKDTree< Index, Value >::fIndPoints, TKDTree< Index, Value >::fValue, TKDTree< Index, Value >::GetLeft(), TKDTree< Index, Value >::GetNodePointsIndexes(), TKDTree< Index, Value >::GetRight(), RooFit::Index(), TKDTree< Index, Value >::IsTerminal(), max, min, and xmlio::Value.

Referenced by TKDTree< Index, Value >::FindInRange().

template<typename Index, typename Value>
void TKDTree< Index, Value >::Build (  ) 

template<typename Index, typename Value>
Double_t TKDTree< Index, Value >::Distance ( const Value *  point,
Index  ind,
Int_t  type = 2 
) const

template<typename Index, typename Value>
void TKDTree< Index, Value >::DistanceToNode ( const Value *  point,
Index  inode,
Value &  min,
Value &  max,
Int_t  type = 2 
)

template<typename Index, typename Value>
Int_t TKDTree< Index, Value >::GetLeft ( Int_t  inode  )  const [inline]

Definition at line 26 of file TKDTree.h.

template<typename Index, typename Value>
Int_t TKDTree< Index, Value >::GetRight ( Int_t  inode  )  const [inline]

Definition at line 27 of file TKDTree.h.

template<typename Index, typename Value>
Int_t TKDTree< Index, Value >::GetParent ( Int_t  inode  )  const [inline]

Definition at line 28 of file TKDTree.h.

template<typename Index, typename Value>
Index* TKDTree< Index, Value >::GetPointsIndexes ( Int_t  node  )  const

template<typename Index, typename Value>
void TKDTree< Index, Value >::GetNodePointsIndexes ( Int_t  node,
Int_t first1,
Int_t last1,
Int_t first2,
Int_t last2 
) const

template<typename Index, typename Value>
UChar_t TKDTree< Index, Value >::GetNodeAxis ( Int_t  id  )  const [inline]

Definition at line 33 of file TKDTree.h.

References TKDTree< Index, Value >::fAxis, and TKDTree< Index, Value >::fNNodes.

template<typename Index, typename Value>
Value TKDTree< Index, Value >::GetNodeValue ( Int_t  id  )  const [inline]

Definition at line 34 of file TKDTree.h.

References TKDTree< Index, Value >::fNNodes, and TKDTree< Index, Value >::fValue.

template<typename Index, typename Value>
Int_t TKDTree< Index, Value >::GetNNodes (  )  const [inline]

Definition at line 35 of file TKDTree.h.

References TKDTree< Index, Value >::fNNodes.

template<typename Index, typename Value>
Int_t TKDTree< Index, Value >::GetTotalNodes (  )  const [inline]

Definition at line 36 of file TKDTree.h.

References TKDTree< Index, Value >::fTotalNodes.

template<typename Index, typename Value>
Value* TKDTree< Index, Value >::GetBoundaries (  ) 

template<typename Index, typename Value>
Value* TKDTree< Index, Value >::GetBoundariesExact (  ) 

template<typename Index, typename Value>
Value* TKDTree< Index, Value >::GetBoundary ( const Int_t  node  ) 

template<typename Index, typename Value>
Value* TKDTree< Index, Value >::GetBoundaryExact ( const Int_t  node  ) 

template<typename Index, typename Value>
Index TKDTree< Index, Value >::GetNPoints (  )  [inline]

Definition at line 41 of file TKDTree.h.

References TKDTree< Index, Value >::fNPoints.

template<typename Index, typename Value>
Index TKDTree< Index, Value >::GetNDim (  )  [inline]

Definition at line 42 of file TKDTree.h.

References TKDTree< Index, Value >::fNDim.

template<typename Index, typename Value>
Index TKDTree< Index, Value >::GetNPointsNode ( Int_t  node  )  const

template<typename Index, typename Value>
Int_t TKDTree< Index, Value >::GetRowT0 (  )  [inline]

Definition at line 46 of file TKDTree.h.

References TKDTree< Index, Value >::fRowT0.

template<typename Index, typename Value>
Int_t TKDTree< Index, Value >::GetCrossNode (  )  [inline]

smallest terminal row

Definition at line 47 of file TKDTree.h.

References TKDTree< Index, Value >::fCrossNode.

template<typename Index, typename Value>
Int_t TKDTree< Index, Value >::GetOffset (  )  [inline]

cross node

Definition at line 48 of file TKDTree.h.

References TKDTree< Index, Value >::fOffset.

template<typename Index, typename Value>
Index* TKDTree< Index, Value >::GetIndPoints (  )  [inline]

offset in fIndPoints

Definition at line 49 of file TKDTree.h.

References TKDTree< Index, Value >::fIndPoints.

template<typename Index, typename Value>
Index TKDTree< Index, Value >::GetBucketSize (  )  [inline]

Definition at line 50 of file TKDTree.h.

References TKDTree< Index, Value >::fBucketSize.

template<typename Index, typename Value>
void TKDTree< Index, Value >::FindNearestNeighbors ( const Value *  point,
Int_t  k,
Index *  ind,
Value *  dist 
)

template<typename Index, typename Value>
Index TKDTree< Index, Value >::FindNode ( const Value *  point  )  const

template<typename Index, typename Value>
void TKDTree< Index, Value >::FindPoint ( Value *  point,
Index &  index,
Int_t iter 
)

template<typename Index, typename Value>
void TKDTree< Index, Value >::FindInRange ( Value *  point,
Value  range,
std::vector< Index > &  res 
)

template<typename Index, typename Value>
void TKDTree< Index, Value >::FindBNodeA ( Value *  point,
Value *  delta,
Int_t inode 
)

template<typename Index, typename Value>
Bool_t TKDTree< Index, Value >::IsTerminal ( Index  inode  )  const [inline]

Definition at line 58 of file TKDTree.h.

References TKDTree< Index, Value >::fNNodes.

template<typename Index, typename Value>
Int_t TKDTree< Index, Value >::IsOwner (  )  [inline]

Definition at line 59 of file TKDTree.h.

References TKDTree< Index, Value >::fDataOwner.

template<typename Index, typename Value>
Value TKDTree< Index, Value >::KOrdStat ( Index  ntotal,
Value *  a,
Index  k,
Index *  index 
) const

template<typename Index, typename Value>
void TKDTree< Index, Value >::MakeBoundaries ( Value *  range = 0x0  ) 

template<typename Index, typename Value>
void TKDTree< Index, Value >::MakeBoundariesExact (  ) 

template<typename Index, typename Value>
void TKDTree< Index, Value >::SetData ( Index  npoints,
Index  ndim,
UInt_t  bsize,
Value **  data 
)

template<typename Index, typename Value>
Int_t TKDTree< Index, Value >::SetData ( Index  idim,
Value *  data 
)

template<typename Index, typename Value>
void TKDTree< Index, Value >::SetOwner ( Int_t  owner  )  [inline]

Definition at line 67 of file TKDTree.h.

References TKDTree< Index, Value >::fDataOwner.

template<typename Index, typename Value>
void TKDTree< Index, Value >::Spread ( Index  ntotal,
Value *  a,
Index *  index,
Value &  min,
Value &  max 
) const

template<typename Index, typename Value>
TKDTree<Index, Value>& TKDTree< Index, Value >::operator= ( const TKDTree< Index, Value > &   )  [private]

template<typename Index, typename Value>
void TKDTree< Index, Value >::CookBoundaries ( const Int_t  node,
Bool_t  left 
) [private]

template<typename Index, typename Value>
void TKDTree< Index, Value >::UpdateNearestNeighbors ( Index  inode,
const Value *  point,
Int_t  kNN,
Index *  ind,
Value *  dist 
) [private]

template<typename Index, typename Value>
void TKDTree< Index, Value >::UpdateRange ( Index  inode,
Value *  point,
Value  range,
std::vector< Index > &  res 
) [private]

template<>
TClass * TKDTree< int, double >::Class (  ) 

Definition at line 3102 of file G__MathCore.cxx.

References ROOT::GenerateInitInstanceLocal(), and x0.

template<>
TClass * TKDTree< int, float >::Class (  ) 

Definition at line 3136 of file G__MathCore.cxx.

References ROOT::GenerateInitInstanceLocal(), and x0.

template<>
void TKDTree< int, double >::Streamer ( TBuffer R__b  ) 

Definition at line 3446 of file G__MathCore.cxx.

References TBuffer::IsReading(), TBuffer::ReadClassBuffer(), and TBuffer::WriteClassBuffer().

template<>
void TKDTree< int, float >::Streamer ( TBuffer R__b  ) 

Definition at line 3516 of file G__MathCore.cxx.

References TBuffer::IsReading(), TBuffer::ReadClassBuffer(), and TBuffer::WriteClassBuffer().


Member Data Documentation

template<typename Index, typename Value>
Int_t TKDTree< Index, Value >::fDataOwner [protected]

Definition at line 79 of file TKDTree.h.

Referenced by TKDTree< Index, Value >::IsOwner(), TKDTree< Index, Value >::SetData(), TKDTree< Index, Value >::SetOwner(), and TKDTree< Index, Value >::~TKDTree().

template<typename Index, typename Value>
Int_t TKDTree< Index, Value >::fNNodes [protected]

0 - not owner, 2 - owner of the pointer array, 1 - owner of the whole 2-d array

Definition at line 80 of file TKDTree.h.

Referenced by TKDTree< Index, Value >::Build(), TKDTree< Index, Value >::FindBNodeA(), TKDTree< Index, Value >::FindPoint(), TKDTree< Index, Value >::GetNNodes(), TKDTree< Index, Value >::GetNodeAxis(), TKDTree< Index, Value >::GetNodePointsIndexes(), TKDTree< Index, Value >::GetNodeValue(), TKDTree< Index, Value >::GetPointsIndexes(), TKDTree< Index, Value >::IsTerminal(), TKDTree< Index, Value >::MakeBoundaries(), and TKDTree< Index, Value >::MakeBoundariesExact().

template<typename Index, typename Value>
Int_t TKDTree< Index, Value >::fTotalNodes [protected]

Definition at line 81 of file TKDTree.h.

Referenced by TKDTree< Index, Value >::Build(), TKDTree< Index, Value >::GetNodePointsIndexes(), TKDTree< Index, Value >::GetNPointsNode(), TKDTree< Index, Value >::GetTotalNodes(), and TKDTree< Index, Value >::MakeBoundariesExact().

template<typename Index, typename Value>
Index TKDTree< Index, Value >::fNDim [protected]

Definition at line 82 of file TKDTree.h.

Referenced by TKDTree< Index, Value >::Build(), TKDTree< Index, Value >::Distance(), TKDTree< Index, Value >::FindPoint(), TKDTree< Index, Value >::GetBoundary(), TKDTree< Index, Value >::GetBoundaryExact(), TKDTree< Index, Value >::GetNDim(), TKDTree< Index, Value >::MakeBoundaries(), TKDTree< Index, Value >::MakeBoundariesExact(), TKDTree< Index, Value >::SetData(), and TKDTree< Index, Value >::~TKDTree().

template<typename Index, typename Value>
Index TKDTree< Index, Value >::fNDimm [protected]

Definition at line 83 of file TKDTree.h.

Referenced by TKDTree< Index, Value >::CookBoundaries(), TKDTree< Index, Value >::DistanceToNode(), TKDTree< Index, Value >::MakeBoundaries(), and TKDTree< Index, Value >::MakeBoundariesExact().

template<typename Index, typename Value>
Index TKDTree< Index, Value >::fNPoints [protected]

Definition at line 84 of file TKDTree.h.

Referenced by TKDTree< Index, Value >::Build(), and TKDTree< Index, Value >::GetNPoints().

template<typename Index, typename Value>
Index TKDTree< Index, Value >::fBucketSize [protected]

Definition at line 85 of file TKDTree.h.

Referenced by TKDTree< Index, Value >::Build(), TKDTree< Index, Value >::FindPoint(), TKDTree< Index, Value >::GetBucketSize(), TKDTree< Index, Value >::GetNodePointsIndexes(), TKDTree< Index, Value >::GetNPointsNode(), TKDTree< Index, Value >::GetPointsIndexes(), TKDTree< Index, Value >::MakeBoundaries(), and TKDTree< Index, Value >::SetData().

template<typename Index, typename Value>
UChar_t* TKDTree< Index, Value >::fAxis [protected]

Definition at line 86 of file TKDTree.h.

Referenced by TKDTree< Index, Value >::Build(), TKDTree< Index, Value >::CookBoundaries(), TKDTree< Index, Value >::FindBNodeA(), TKDTree< Index, Value >::FindNode(), TKDTree< Index, Value >::FindPoint(), TKDTree< Index, Value >::GetNodeAxis(), TKDTree< Index, Value >::SetData(), TKDTree< Index, Value >::UpdateNearestNeighbors(), TKDTree< Index, Value >::UpdateRange(), and TKDTree< Index, Value >::~TKDTree().

template<typename Index, typename Value>
Value* TKDTree< Index, Value >::fValue [protected]

Definition at line 87 of file TKDTree.h.

Referenced by TKDTree< Index, Value >::Build(), TKDTree< Index, Value >::CookBoundaries(), TKDTree< Index, Value >::FindBNodeA(), TKDTree< Index, Value >::FindNode(), TKDTree< Index, Value >::FindPoint(), TKDTree< Index, Value >::GetNodeValue(), TKDTree< Index, Value >::SetData(), TKDTree< Index, Value >::UpdateNearestNeighbors(), TKDTree< Index, Value >::UpdateRange(), and TKDTree< Index, Value >::~TKDTree().

template<typename Index, typename Value>
Value* TKDTree< Index, Value >::fRange [protected]

Definition at line 89 of file TKDTree.h.

Referenced by TKDTree< Index, Value >::Build(), TKDTree< Index, Value >::CookBoundaries(), TKDTree< Index, Value >::MakeBoundaries(), and TKDTree< Index, Value >::~TKDTree().

template<typename Index, typename Value>
Value** TKDTree< Index, Value >::fData [protected]

Definition at line 90 of file TKDTree.h.

Referenced by TKDTree< Index, Value >::Build(), TKDTree< Index, Value >::Distance(), TKDTree< Index, Value >::FindPoint(), TKDTree< Index, Value >::MakeBoundariesExact(), TKDTree< Index, Value >::SetData(), and TKDTree< Index, Value >::~TKDTree().

template<typename Index, typename Value>
Value* TKDTree< Index, Value >::fBoundaries [protected]

data points

Definition at line 91 of file TKDTree.h.

Referenced by TKDTree< Index, Value >::CookBoundaries(), TKDTree< Index, Value >::GetBoundaries(), TKDTree< Index, Value >::GetBoundariesExact(), TKDTree< Index, Value >::GetBoundary(), TKDTree< Index, Value >::GetBoundaryExact(), TKDTree< Index, Value >::MakeBoundaries(), TKDTree< Index, Value >::MakeBoundariesExact(), and TKDTree< Index, Value >::~TKDTree().

template<typename Index, typename Value>
Index* TKDTree< Index, Value >::fIndPoints [protected]

nodes boundaries

Definition at line 94 of file TKDTree.h.

Referenced by TKDTree< Index, Value >::Build(), TKDTree< Index, Value >::FindPoint(), TKDTree< Index, Value >::GetIndPoints(), TKDTree< Index, Value >::GetPointsIndexes(), TKDTree< Index, Value >::UpdateNearestNeighbors(), TKDTree< Index, Value >::UpdateRange(), and TKDTree< Index, Value >::~TKDTree().

template<typename Index, typename Value>
Int_t TKDTree< Index, Value >::fRowT0 [protected]

array of points indexes

Definition at line 95 of file TKDTree.h.

Referenced by TKDTree< Index, Value >::Build(), and TKDTree< Index, Value >::GetRowT0().

template<typename Index, typename Value>
Int_t TKDTree< Index, Value >::fCrossNode [protected]

smallest terminal row - first row that contains terminal nodes

Definition at line 96 of file TKDTree.h.

Referenced by TKDTree< Index, Value >::Build(), TKDTree< Index, Value >::FindPoint(), TKDTree< Index, Value >::GetCrossNode(), TKDTree< Index, Value >::GetNodePointsIndexes(), and TKDTree< Index, Value >::GetPointsIndexes().

template<typename Index, typename Value>
Int_t TKDTree< Index, Value >::fOffset [protected]

cross node - node that begins the last row (with terminal nodes only)

Definition at line 97 of file TKDTree.h.

Referenced by TKDTree< Index, Value >::Build(), TKDTree< Index, Value >::FindPoint(), TKDTree< Index, Value >::GetNodePointsIndexes(), TKDTree< Index, Value >::GetNPointsNode(), TKDTree< Index, Value >::GetOffset(), and TKDTree< Index, Value >::GetPointsIndexes().

template<typename Index, typename Value>
UChar_t* TKDTree< Index, Value >::fAxis [protected]

Definition at line 86 of file TKDTree.h.

template<typename Index, typename Value>
Value* TKDTree< Index, Value >::fValue [protected]

Definition at line 87 of file TKDTree.h.

template<typename Index, typename Value>
Value* TKDTree< Index, Value >::fRange [protected]

Definition at line 89 of file TKDTree.h.

template<typename Index, typename Value>
Value** TKDTree< Index, Value >::fData [protected]

Definition at line 90 of file TKDTree.h.

template<typename Index, typename Value>
Value* TKDTree< Index, Value >::fBoundaries [protected]

data points

Definition at line 91 of file TKDTree.h.

template<typename Index, typename Value>
Index* TKDTree< Index, Value >::fIndPoints [protected]

nodes boundaries

Definition at line 94 of file TKDTree.h.


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:42:07 2011 for ROOT_528-00b_version by  doxygen 1.5.1