Mobios v0.91

mobios.index
Class VPRangeCursor

java.lang.Object
  extended by mobios.index.Cursor
      extended by mobios.index.VPRangeCursor
All Implemented Interfaces:
Iterator

public class VPRangeCursor
extends Cursor

Implements an Cursor, for range search in vp tree

Version:
2006.05.31
Author:
Rui Mao, Willard

Constructor Summary
VPRangeCursor(RangeQuery query, Index index)
           
 
Method Summary
 int[] getCounters()
          return some counters
 int[] getDistanceCalculationNumber()
          return the number of distance calculations during the search
 int getHeight()
           
 int[][] getLevelNodeVisited()
          return the number of nodes visited in each level of the index tree.
 int[][] getLevelPointVisited()
          return the number of data objects that the query directly compute distance with in the leaf nodes of each level of the index tree.
 int[] getNodeVisitedNumber()
          Return the number of index node visited during the search
 double[][] getQueryPivotDistance()
          return the average distance between the query and the pivots for each layer.
 String toString()
           
 
Methods inherited from class mobios.index.Cursor
hasNext, next, remove
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VPRangeCursor

public VPRangeCursor(RangeQuery query,
                     Index index)
Method Detail

getHeight

public int getHeight()
Returns:
the height the of index tree

getNodeVisitedNumber

public int[] getNodeVisitedNumber()
Return the number of index node visited during the search

Returns:
an int array of length 2, the first element is the total number of index nodes visited during the search, the second is the number of internal nodes visited.

getCounters

public int[] getCounters()
return some counters

Returns:
an array of counters: 0: int resultConfirmedByPathDist; //number of data points that are confirmed to be results by path distance list //without computing the distance directly. it is a subset of resultWithoutDist. 1: int pointPrunedByPivotDist; //number of data points that are pruned by the pivot distance 2: int nodePrunedByPivotDist; //number of nodes that are pruned by the pivot distance 3: int pointPrunedByPathDist; //number of data points that are pruned by path distance list 4: int nodeWithoutDist; //number of nodes that are determined to be all results without computing distance directly. 5: int resultWithoutDist; //number of results that are determined to be results without computing distance directly. 6: int pivotAsResult; //number of pivots that are also search results 7: int pivotRowIDAsResult; //number of row IDs corresponding to those pivots being search results

getDistanceCalculationNumber

public int[] getDistanceCalculationNumber()
return the number of distance calculations during the search

Returns:
an int array of length 2, the first element is total number of distance calculations during the search, the second is the number of distance calculations between the query and the pivots

getQueryPivotDistance

public double[][] getQueryPivotDistance()
return the average distance between the query and the pivots for each layer.

Returns:
a 2-d double array, average distance between the query to the pivots (column) on each level (row). the length of a row is the max number of pivots in the level.

getLevelNodeVisited

public int[][] getLevelNodeVisited()
return the number of nodes visited in each level of the index tree.

Returns:
a 2-d int array, each row is the statistics of a level, starting from level 0, the root. each row is an int array of length 2, the first is the number of index nodes of the level that belong to the parent nodes of the nodes counted; the second is the number of nodes visited in the layer,

getLevelPointVisited

public int[][] getLevelPointVisited()
return the number of data objects that the query directly compute distance with in the leaf nodes of each level of the index tree.

Returns:
a 2-d int array, each row is the statistics of a level, starting from level 0, the root. each row is an int array of length 2, the first the total number of data objects in the leaf node visited of the level, the second is the number of data object that the query directly compute distance with. Note that the total number of index nodes of a level can not be found during the search. Also note that the first element can be 0.

toString

public String toString()
Overrides:
toString in class Object
Returns:
a string representation of the Visitor

Mobios v0.91

(C) 2002 - 2006 The MoBIoS Group