net.obsearch.pivots.bustos.impl
Class IncrementalBustosNavarroChavezShort<O extends OBShort>

java.lang.Object
  extended by net.obsearch.pivots.AbstractIncrementalPivotSelector<O>
      extended by net.obsearch.pivots.bustos.AbstractIncrementalBustosNavarroChavez<O>
          extended by net.obsearch.pivots.bustos.impl.IncrementalBustosNavarroChavezShort<O>
All Implemented Interfaces:
IncrementalPivotSelector<O>

public class IncrementalBustosNavarroChavezShort<O extends OBShort>
extends AbstractIncrementalBustosNavarroChavez<O>
implements IncrementalPivotSelector<O>

IncrementalBustosNavarroChavezShort is an implementation for OBShort objects

Author:
Arnoldo Jose Muller Molina

Field Summary
 
Fields inherited from class net.obsearch.pivots.AbstractIncrementalPivotSelector
pivotable, r
 
Constructor Summary
IncrementalBustosNavarroChavezShort(Pivotable<O> pivotable, int l, int m)
          Receives the object that accepts pivots as possible candidates.
 
Method Summary
protected  double calculateMedian(long[] pivots, long[] x, long[] y, Index<O> index)
          Calculates the median of L-inf(x[i], y[i]) based on pivots
protected  void resetCache(int x)
          Resets the internal cache.
protected  boolean validatePivots(long[] pivots, long id, Index<O> index)
          Validates that the lower layers have been processing everything fine.
 
Methods inherited from class net.obsearch.pivots.bustos.AbstractIncrementalBustosNavarroChavez
generatePivots
 
Methods inherited from class net.obsearch.pivots.AbstractIncrementalPivotSelector
enableAcceptRepeated, generatePivots, getObject, mapId, max, select, selectO, selectUnique
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.obsearch.pivots.IncrementalPivotSelector
generatePivots, generatePivots
 

Constructor Detail

IncrementalBustosNavarroChavezShort

public IncrementalBustosNavarroChavezShort(Pivotable<O> pivotable,
                                           int l,
                                           int m)
Receives the object that accepts pivots as possible candidates. Selects l pairs of objects to compare which set of pivots is better, and selects m possible pivot candidates from the data set.

Parameters:
pivotable -
l - pairs of objects to select
m - m possible pivot candidates to be randomly picked.
Method Detail

calculateMedian

protected double calculateMedian(long[] pivots,
                                 long[] x,
                                 long[] y,
                                 Index<O> index)
                          throws com.sleepycat.je.DatabaseException,
                                 IllegalIdException,
                                 IllegalAccessException,
                                 InstantiationException,
                                 OBException
Description copied from class: AbstractIncrementalBustosNavarroChavez
Calculates the median of L-inf(x[i], y[i]) based on pivots

Specified by:
calculateMedian in class AbstractIncrementalBustosNavarroChavez<O extends OBShort>
Parameters:
pivots - The pivots used to map the space
x - The left part of the pair
y - The right part of the pair.
index - The underlying index (used to extract the objects and calculate the distances)
Throws:
com.sleepycat.je.DatabaseException
IllegalIdException
IllegalAccessException
InstantiationException
OBException

resetCache

protected void resetCache(int x)
Description copied from class: AbstractIncrementalBustosNavarroChavez
Resets the internal cache.

Specified by:
resetCache in class AbstractIncrementalBustosNavarroChavez<O extends OBShort>

validatePivots

protected boolean validatePivots(long[] pivots,
                                 long id,
                                 Index<O> index)
                          throws com.sleepycat.je.DatabaseException,
                                 IllegalIdException,
                                 IllegalAccessException,
                                 InstantiationException,
                                 OBException
Description copied from class: AbstractIncrementalBustosNavarroChavez
Validates that the lower layers have been processing everything fine.

Specified by:
validatePivots in class AbstractIncrementalBustosNavarroChavez<O extends OBShort>
Parameters:
pivots - the pivots that were selected
id - Id of the object
index - Index from which we will load objects.
Throws:
com.sleepycat.je.DatabaseException
IllegalIdException
IllegalAccessException
InstantiationException
OBException


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