/** Resets all internal fields/counters. */
 public void reset() {
   super.reset();
   // initializing leaf variables
   m_SumLeaves = m_SumSqLeaves = m_LeafCount = 0;
   m_MinLeaves = Integer.MAX_VALUE;
   m_MaxLeaves = Integer.MIN_VALUE;
   // initializing internal variables
   m_SumIntNodes = m_SumSqIntNodes = m_IntNodeCount = 0;
   m_MinIntNodes = Integer.MAX_VALUE;
   m_MaxIntNodes = Integer.MIN_VALUE;
 }
 /** Signals end of the nearest neighbour search. Calculates the statistics for the search. */
 public void searchFinish() {
   super.searchFinish();
   // updating stats for leaf nodes
   m_SumLeaves += m_LeafCount;
   m_SumSqLeaves += m_LeafCount * m_LeafCount;
   if (m_LeafCount < m_MinLeaves) m_MinLeaves = m_LeafCount;
   if (m_LeafCount > m_MaxLeaves) m_MaxLeaves = m_LeafCount;
   // updating stats for internal nodes
   m_SumIntNodes += m_IntNodeCount;
   m_SumSqIntNodes += m_IntNodeCount * m_IntNodeCount;
   if (m_IntNodeCount < m_MinIntNodes) m_MinIntNodes = m_IntNodeCount;
   if (m_IntNodeCount > m_MaxIntNodes) m_MaxIntNodes = m_IntNodeCount;
 }
 /** Signals start of the nearest neighbour search. Initializes the stats object. */
 public void searchStart() {
   super.searchStart();
   m_LeafCount = 0;
   m_IntNodeCount = 0;
 }