net.obsearch
Interface ApproxIndexShort<O extends OBShort>


public interface ApproxIndexShort<O extends OBShort>

An approximate index has extra search methods useful to compare the approx index against other indexes. We add search bounded by ep and precision. As soon as the search reaches the given ep or precision the search stops and then statistics can be fetched.

Author:
Arnoldo Jose Muller Molina

Method Summary
 void searchOBAnalyzeEp(O object, short r, OBPriorityQueueShort<O> result, double ep, List<AbstractOBResult<O>> db)
          Searches the Index and returns OBResult (ID, OB and distance) elements that are closer to "object".
 void searchOBAnalyzeRecall(O object, short r, OBPriorityQueueShort<O> result, double recall, List<AbstractOBResult<O>> perfectQueryResult)
          Searches the Index and returns OBResult (ID, OB and distance) elements that are closer to "object".
 

Method Detail

searchOBAnalyzeEp

void searchOBAnalyzeEp(O object,
                       short r,
                       OBPriorityQueueShort<O> result,
                       double ep,
                       List<AbstractOBResult<O>> db)
                       throws NotFrozenException,
                              InstantiationException,
                              IllegalIdException,
                              IllegalAccessException,
                              OutOfRangeException,
                              OBException
Searches the Index and returns OBResult (ID, OB and distance) elements that are closer to "object". The closest element is at the beginning of the list and the farthest elements is at the end of the list. You can control the size of the resulting set when you create the object "result". This becomes the k parameter of the search. The search stops when the query's ep value is <= ep.

Parameters:
object - The object that has to be searched
r - The range to be used
result - A priority queue that will hold the result
ep - We will search until the given ep is fulfilled.
db - The entire db objects sorted by distance to object
Throws:
NotFrozenException - if the index has not been frozen.
OBException - User generated exception
IllegalAccessException - If there is a problem when instantiating objects O
InstantiationException - If there is a problem when instantiating objects O
IllegalIdException - This exception is left as a Debug flag. If you receive this exception please report the problem to: http://code.google.com/p/obsearch/issues/list
OutOfRangeException - If the distance of any object to any other object exceeds the range defined by the user.

searchOBAnalyzeRecall

void searchOBAnalyzeRecall(O object,
                           short r,
                           OBPriorityQueueShort<O> result,
                           double recall,
                           List<AbstractOBResult<O>> perfectQueryResult)
                           throws NotFrozenException,
                                  InstantiationException,
                                  IllegalIdException,
                                  IllegalAccessException,
                                  OutOfRangeException,
                                  OBException
Searches the Index and returns OBResult (ID, OB and distance) elements that are closer to "object". The closest element is at the beginning of the list and the farthest elements is at the end of the list. You can control the size of the resulting set when you create the object "result". This becomes the k parameter of the search. The search stops when the query's recall is >= recall

Parameters:
object - The object that has to be searched
r - The range to be used
result - A priority queue that will hold the result
recall - The expected recall of the query.
perfectQueryResult - the perfect query result to compare against the approx query.
Throws:
NotFrozenException - if the index has not been frozen.
OBException - User generated exception
IllegalAccessException - If there is a problem when instantiating objects O
InstantiationException - If there is a problem when instantiating objects O
IllegalIdException - This exception is left as a Debug flag. If you receive this exception please report the problem to: http://code.google.com/p/obsearch/issues/list
OutOfRangeException - If the distance of any object to any other object exceeds the range defined by the user.


Copyright © 2007-2011 Arnoldo Jose Muller Molina. All Rights Reserved.