net.obsearch.index.utils
Class IndexSmokeTUtilApprox<O extends OBShort>

java.lang.Object
  extended by net.obsearch.index.utils.IndexSmokeTUtil<O>
      extended by net.obsearch.index.utils.IndexSmokeTUtilApprox<O>

public class IndexSmokeTUtilApprox<O extends OBShort>
extends IndexSmokeTUtil<O>


Field Summary
 
Fields inherited from class net.obsearch.index.utils.IndexSmokeTUtil
factory, maxSliceSize
 
Constructor Summary
IndexSmokeTUtilApprox(OBFactory<O> factory)
           
 
Method Summary
 double ep(OBPriorityQueueShort<O> x1, List<OBResultShort<O>> db, IndexShort<O> index)
           
 boolean isApproxZero(OBPriorityQueueShort<O> x1, List<OBResultShort<O>> db, short range)
          If x1 (query) returned zero results but db had results, this function returns true.
 boolean ok(OBPriorityQueueShort<O> x1, List<OBResultShort<O>> db, short range)
           
 double recall(OBPriorityQueueShort<O> x1, List<OBResultShort<O>> db, int k, short range)
           
 void search(IndexShort<O> index, short range, short k)
          Perform all the searches with
 void searchSequential(long max, O o, ArrayList<OBResultShort<O>> result, IndexShort<O> index, short range)
          Sequential search.
 boolean zeroResults(List<OBResultShort<O>> db, short range)
           
 
Methods inherited from class net.obsearch.index.utils.IndexSmokeTUtil
debug, debug, initIndex, isIn, parseLine, searchSequential, shouldProcessSlice, tIndex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexSmokeTUtilApprox

public IndexSmokeTUtilApprox(OBFactory<O> factory)
                      throws IOException
Throws:
IOException
Method Detail

search

public void search(IndexShort<O> index,
                   short range,
                   short k)
            throws Exception
Description copied from class: IndexSmokeTUtil
Perform all the searches with

Overrides:
search in class IndexSmokeTUtil<O extends OBShort>
Throws:
Exception

zeroResults

public boolean zeroResults(List<OBResultShort<O>> db,
                           short range)
Parameters:
db - database
range - range query
Returns:
true if the results are zero.

isApproxZero

public boolean isApproxZero(OBPriorityQueueShort<O> x1,
                            List<OBResultShort<O>> db,
                            short range)
If x1 (query) returned zero results but db had results, this function returns true. Otherwise false.

Parameters:
x1 -
db -
range -
Returns:

ok

public boolean ok(OBPriorityQueueShort<O> x1,
                  List<OBResultShort<O>> db,
                  short range)

recall

public double recall(OBPriorityQueueShort<O> x1,
                     List<OBResultShort<O>> db,
                     int k,
                     short range)

searchSequential

public void searchSequential(long max,
                             O o,
                             ArrayList<OBResultShort<O>> result,
                             IndexShort<O> index,
                             short range)
                      throws OBException,
                             IllegalAccessException,
                             InstantiationException
Sequential search.

Parameters:
max - Search all the ids in the database until max
o - The object to search
result - The queue were the results are stored
index - the index to search
range - The range to employ
Throws:
InstantiationException
IllegalAccessException
Exception - If something goes really bad.
OBException

ep

public double ep(OBPriorityQueueShort<O> x1,
                 List<OBResultShort<O>> db,
                 IndexShort<O> index)
          throws OBStorageException
Throws:
OBStorageException


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