net.obsearch.pivots.rf02
Class AbstractIncrementalRF02<O extends OB>
java.lang.Object
net.obsearch.pivots.AbstractIncrementalPivotSelector<O>
net.obsearch.pivots.rf02.AbstractIncrementalRF02<O>
- Type Parameters:
O
- N
-
- All Implemented Interfaces:
- IncrementalPairPivotSelector<O>
- Direct Known Subclasses:
- RF02PivotSelectorFloat, RF02PivotSelectorShort
public abstract class AbstractIncrementalRF02<O extends OB>
- extends AbstractIncrementalPivotSelector<O>
- implements IncrementalPairPivotSelector<O>
Select pairs of pivots.
- Author:
- amuller
Nested Class Summary |
protected class |
AbstractIncrementalRF02.Score
a good pivot selection strategy should follow certain rules, but in
general those pivot selection strategies that perform well (find the k-nn
in the least number of iterations). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractIncrementalRF02
protected AbstractIncrementalRF02(Pivotable<O> pivotable)
generatePivotsPair
public PivotPairResult<O> generatePivotsPair(int pairCount,
Index<O> index)
throws OBException,
IllegalAccessException,
InstantiationException,
OBStorageException,
PivotsUnavailableException
- Description copied from interface:
IncrementalPairPivotSelector
- Generates pivots from all the elements found in the DB.
- Specified by:
generatePivotsPair
in interface IncrementalPairPivotSelector<O extends OB>
- Returns:
- A list of the ids of the pivots.
- Throws:
OBStorageException
- If something goes wrong with the DB
OBException
- User generated exception
IllegalAccessException
- If there is a problem when instantiating objects O
InstantiationException
- If there is a problem when instantiating objects O
PivotsUnavailableException
- If not all the pivots requested were found.
getRepetitions
public int getRepetitions()
setRepetitions
public void setRepetitions(int repetitions)
getDataSample
public int getDataSample()
setDataSample
public void setDataSample(int dataSample)
getDesiredSpread
public double getDesiredSpread()
setDesiredSpread
public void setDesiredSpread(double desiredSpread)
getDesiredDistortion
public double getDesiredDistortion()
setDesiredDistortion
public void setDesiredDistortion(double desiredDistortion)
generatePivotsPair
public PivotPairResult<O> generatePivotsPair(int pairCount,
cern.colt.list.LongArrayList elements,
Index<O> index)
throws OBException,
IllegalAccessException,
InstantiationException,
OBStorageException,
PivotsUnavailableException
- Description copied from interface:
IncrementalPairPivotSelector
- Generates pivots from the elements (object ids) given in the array elements.
Generates pivotsCount pivots.
- Specified by:
generatePivotsPair
in interface IncrementalPairPivotSelector<O extends OB>
- Returns:
- A list of the ids of the pivots.
- Throws:
OBException
IllegalAccessException
InstantiationException
OBStorageException
PivotsUnavailableException
distance
protected abstract double distance(O a,
O b)
throws OBException
- Throws:
OBException
Copyright © 2007-2011 Arnoldo Jose Muller Molina. All Rights Reserved.