Follow the compilation scheme of AliRoot and to fulfill the C++ effic
[u/mrichter/AliRoot.git] / STAT / TKDTree.cxx
index e65331259cd0131f6b7c39d21ff40e9431ea10f8..e679ed3cf67eda7eccc16df044e05620466f2c9a 100644 (file)
@@ -38,12 +38,15 @@ TKDTree<Index, Value>::TKDTree() :
        ,fNDim(0)
        ,fNpoints(0)
        ,fBucketSize(0)
-       ,fIndPoints(0x0)
        ,fData(0x0)
        ,fRange(0x0)
        ,fBoundaries(0x0)
        ,fNodes(0x0)
        ,fkNN(0x0)
+       ,fIndPoints(0x0)
+       ,fRowT0(0)
+       ,fCrossNode(0)
+       ,fOffset(0)
 {
 // Default constructor. Nothing is built
 }
@@ -58,19 +61,21 @@ TKDTree<Index, Value>::TKDTree(Index npoints, Index ndim, UInt_t bsize, Value **
        ,fNDim(ndim)
        ,fNpoints(npoints)
        ,fBucketSize(bsize)
-       ,fIndPoints(0x0)
        ,fData(data) //Columnwise!!!!!
        ,fRange(0x0)
        ,fBoundaries(0x0)
        ,fNodes(0x0)
        ,fkNN(0x0)
+       ,fIndPoints(0x0)
+       ,fRowT0(0)
+       ,fCrossNode(0)
+       ,fOffset(0)
 {
        // Allocate data by hand. See TKDTree(TTree*, const Char_t*) for an automatic method.
        
        Build();
 }
 
-
 //_________________________________________________________________
 template <typename  Index, typename Value>
 TKDTree<Index, Value>::~TKDTree()
@@ -222,7 +227,6 @@ void TKDTree<Index, Value>::Build(){
                        if (nleft<0 || nright<0) Warning("Build()", "Problem Negative number");
                }
        }
-       OrderIndexes();
        
        //printf("NBuckets\t%d\n", nbucketsall);
        //fData = 0;
@@ -404,9 +408,12 @@ Index TKDTree<Index, Value>::FindNode(const Value * point){
                        stackNode[currentIndex]=(inode*2)+2;
                }
        }
+       
+       return -1;
 }
 
 
+
 //_________________________________________________________________
 template <typename  Index, typename Value>
 void TKDTree<Index, Value>::FindPoint(Value * point, Index &index, Int_t &iter){
@@ -752,18 +759,6 @@ void TKDTree<Index, Value>::CookBoundariesTerminal(Int_t parent_node, Bool_t LEF
        }
 }
 
-//_________________________________________________________________
-template <typename Index, typename Value>
-void TKDTree<Index, Value>::OrderIndexes()
-{
-// Order array of point's indexes in increasing order of terminal nodes
-// indexes such that first bucket points correspond to first terminal
-// node (index fNnodes) and so on.
-
-       printf("fRowT0 %d fCrossNode %d fOffset %d\n", fRowT0, fCrossNode, fOffset);
-
-}
-
 template class TKDTree<Int_t, Float_t>;
 template class TKDTree<Int_t, Double_t>;