messif.pivotselection
Class RandomPivotChooser

java.lang.Object
  extended by messif.pivotselection.AbstractPivotChooser
      extended by messif.pivotselection.RandomPivotChooser
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
OnFlyRandomPivotChooser

public class RandomPivotChooser
extends AbstractPivotChooser
implements java.io.Serializable

RandomPivotChooser provides the capability of selecting a random object from the whole bucket.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class messif.pivotselection.AbstractPivotChooser
counterBucketReadBuckets, counterObjectDistComp, counterPivotDistComp, counterPivotReadBuckets, preselectedPivots, sampleProviders
 
Constructor Summary
RandomPivotChooser()
          Creates a new instance of RandomPivotChooser
 
Method Summary
protected  void selectPivot(int count, AbstractObjectIterator<? extends LocalAbstractObject> sampleSetIterator)
          Method for selecting pivots and appending to the list of pivots.
 
Methods inherited from class messif.pivotselection.AbstractPivotChooser
addPivot, clear, deregisterSampleProvider, getLastPivot, getNextPivot, getPivot, getPivot, iterator, registerSampleProvider, removeLastPivot, selectPivot, selectPivot, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomPivotChooser

public RandomPivotChooser()
Creates a new instance of RandomPivotChooser

Method Detail

selectPivot

protected void selectPivot(int count,
                           AbstractObjectIterator<? extends LocalAbstractObject> sampleSetIterator)
Method for selecting pivots and appending to the list of pivots. It is used in getPivot() function for automatic selection of missing pivots. Statistics are maintained automatically.

Specified by:
selectPivot in class AbstractPivotChooser
Parameters:
sampleSetIterator - Iterator over the sample set of objects to choose new pivots from
count - Number of pivots to generate