|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmessif.pivotselection.AbstractPivotChooser
messif.pivotselection.TwoDistantIncrementalPivotChooser
public class TwoDistantIncrementalPivotChooser
This class provides a privot chooser that selects maximally two pivots. The chooser is incrementally maintaining two objects that have a maximal distance.
Field Summary |
---|
Fields inherited from class messif.pivotselection.AbstractPivotChooser |
---|
counterBucketReadBuckets, counterObjectDistComp, counterPivotDistComp, counterPivotReadBuckets, preselectedPivots, sampleProviders |
Constructor Summary | |
---|---|
TwoDistantIncrementalPivotChooser()
Creates a new instance of TwoDistantIncrementalPivotChooser. |
Method Summary | |
---|---|
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 pitvots and add them by addPivot method. |
protected void |
updateSelectedPivots(LocalAbstractObject object)
Updates the selected pivots. |
Methods inherited from class messif.pivotselection.AbstractPivotChooser |
---|
addPivot, 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 |
---|
public TwoDistantIncrementalPivotChooser()
Method Detail |
---|
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 from
java.lang.IllegalArgumentException
- if more than two pivots are requestedprotected void updateSelectedPivots(LocalAbstractObject object)
object
- the object to checkpublic void clear()
clear
in class AbstractPivotChooser
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |