public class TwoDistantIncrementalPivotChooser extends AbstractPivotChooser implements java.io.Serializable, BucketFilterAfterAdd
counterBucketReadBuckets, counterObjectDistComp, counterPivotDistComp, counterPivotReadBuckets, preselectedPivots, sampleProviders
Constructor and Description |
---|
TwoDistantIncrementalPivotChooser()
Creates a new instance of TwoDistantIncrementalPivotChooser.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the list of preselected pivots and reset the distance between them.
|
void |
filterAfterAdd(LocalAbstractObject object,
LocalBucket bucket)
Method for preselecting pivots as they are added to a bucket.
|
LocalAbstractObject |
getLeftPivot()
Returns the left (first) pivot.
|
float |
getPivotsDistance()
Returns the distance of the actually selected pivots or zero if there is not enough objects seen yet.
|
LocalAbstractObject |
getRightPivot()
Returns the right (second) pivot.
|
protected void |
selectPivot(int count,
AbstractObjectIterator<? extends LocalAbstractObject> sampleSetIterator)
Select at least count pivots and
add them by
addPivot method. |
protected void |
updateSelectedPivots(LocalAbstractObject object)
Updates the selected pivots.
|
addPivot, deregisterSampleProvider, getLastPivot, getNextPivot, getPivot, getPivot, iterator, registerSampleProvider, removeLastPivot, selectPivot, selectPivot, size
public TwoDistantIncrementalPivotChooser()
public LocalAbstractObject getLeftPivot()
public LocalAbstractObject getRightPivot()
public float getPivotsDistance()
public void filterAfterAdd(LocalAbstractObject object, LocalBucket bucket)
filterAfterAdd
in interface BucketFilterAfterAdd
object
- the inserted objectbucket
- the bucket where the object was storedprotected void selectPivot(int count, AbstractObjectIterator<? extends LocalAbstractObject> sampleSetIterator) throws java.lang.IllegalArgumentException
addPivot
method.selectPivot
in class AbstractPivotChooser
count
- Number of pivots to generatesampleSetIterator
- Iterator over the sample set of objects to choose new pivots fromjava.lang.IllegalArgumentException
- if more than two pivots are requestedprotected void updateSelectedPivots(LocalAbstractObject object)
object
- the object to checkpublic void clear()
clear
in class AbstractPivotChooser