net.obsearch.index
Interface IndexInt<O extends OBInt>

Type Parameters:
O - An object of type OBInt that will be stored in the index.
All Superinterfaces:
net.obsearch.Index<O>
All Known Implementing Classes:
DistPermInt, Sketch64Int

public interface IndexInt<O extends OBInt>
extends net.obsearch.Index<O>

An Index interface for distance functions that return Ints.

Since:
0.7
Author:
Arnoldo Jose Muller Molina

Field Summary
 
Fields inherited from interface net.obsearch.Index
ID_SIZE
 
Method Summary
 int[] fullMatchLite(O query, boolean filterSame)
          This method returns a list of all the distances of the query against the DB.
 void searchOB(O object, int r, net.obsearch.filter.Filter<O> filter, OBPriorityQueueInt<O> result)
          Searches the Index and returns OBResult (ID, OB and distance) elements that are closer to "object".
 void searchOB(O object, int r, OBPriorityQueueInt<O> result)
          Searches the Index and returns OBResult (ID, OB and distance) elements that are closer to "object".
 
Methods inherited from interface net.obsearch.Index
close, databaseSize, debug, delete, exists, freeze, getBox, getObject, getStats, getType, init, insert, insert, insertBulk, insertBulk, isFrozen, loadObject, resetStats, setPreFreezeCheck, totalBoxes
 

Method Detail

searchOB

void searchOB(O object,
              int r,
              OBPriorityQueueInt<O> result)
              throws net.obsearch.exception.NotFrozenException,
                     InstantiationException,
                     net.obsearch.exception.IllegalIdException,
                     IllegalAccessException,
                     net.obsearch.exception.OutOfRangeException,
                     net.obsearch.exception.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.

Parameters:
object - The object that has to be searched
r - The range to be used
result - A priority queue that will hold the result
Throws:
net.obsearch.exception.NotFrozenException - if the index has not been frozen.
net.obsearch.exception.OBException - User generated exception
IllegalAccessException - If there is a problem when instantiating objects O
InstantiationException - If there is a problem when instantiating objects O
net.obsearch.exception.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
net.obsearch.exception.OutOfRangeException - If the distance of any object to any other object exceeds the range defined by the user.

searchOB

void searchOB(O object,
              int r,
              net.obsearch.filter.Filter<O> filter,
              OBPriorityQueueInt<O> result)
              throws net.obsearch.exception.NotFrozenException,
                     InstantiationException,
                     net.obsearch.exception.IllegalIdException,
                     IllegalAccessException,
                     net.obsearch.exception.OutOfRangeException,
                     net.obsearch.exception.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 parameter "filter" is used to remove unwanted objects from the result (a select where clause). Users are responsible to implement at least one filter that can be used with their O.

Parameters:
object - The object that has to be searched
r - The range to be used
result - A priority queue that will hold the result
Throws:
net.obsearch.exception.NotFrozenException - if the index has not been frozen.
net.obsearch.exception.OBException - User generated exception
IllegalAccessException - If there is a problem when instantiating objects O
InstantiationException - If there is a problem when instantiating objects O
net.obsearch.exception.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
net.obsearch.exception.OutOfRangeException - If the distance of any object to any other object exceeds the range defined by the user.

fullMatchLite

int[] fullMatchLite(O query,
                    boolean filterSame)
                    throws net.obsearch.exception.OBException,
                           IllegalAccessException,
                           InstantiationException
This method returns a list of all the distances of the query against the DB. This helps to calculate EP values in a cheaper way. results that are equal to the original object are added or skipped based on "filterSame" as Float.MAX_VALUE

Parameters:
query -
filterSame - if True we do not return objects o such that query.equals(o)
Returns:
Throws:
net.obsearch.exception.OBException
InstantiationException
IllegalAccessException


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