public BallNode buildTree() throws Exception {
  ArrayList<TempNode> list=new ArrayList<TempNode>();
  for (int i=0; i < m_InstList.length; i++) {
    TempNode n=new TempNode();
    n.points=new int[1];
    n.points[0]=m_InstList[i];
    n.anchor=m_Instances.instance(m_InstList[i]);
    n.radius=0.0;
    list.add(n);
  }
  return mergeNodes(list,0,m_InstList.length - 1,m_InstList);
}

public BallNode buildTree ( ) throws Exception { ArrayList < TempNode > list = new ArrayList < TempNode > ( ) ; for ( int i = 0 ; i < m_InstList . length ; i ++ ) { TempNode n = new TempNode ( ) ; n . points = new int [ 1 ] ; n . points [ 0 ] = m_InstList [ i ] ; n . anchor = m_Instances . instance ( m_InstList [ i ] ) ; n . radius = 0.0 ; list . add ( n ) ; } return mergeNodes ( list , 0 , m_InstList . length - 1 , m_InstList ) ; }
builds the ball tree bottom up .
