public class IncrementalPivotChooser extends AbstractPivotChooser implements java.io.Serializable, BucketFilterAfterAdd, BucketFilterAfterRemove
Modifier and Type | Field and Description |
---|---|
static float |
BUCKETCHANGE_THRESHOLD_TO_RESELECT
Reselect sample set when the percentage of the bucket changes (with respect to its occupation) exceeds this constant.
|
static int |
SAMPLE_PIVOT_SIZE
Size of the candidate set of pivots from which the best pivot is picked.
|
static int |
SAMPLE_SET_SIZE
Size of the sample set used to verify the goodness of candidate pivots (used to estimate mu_d)
|
counterBucketReadBuckets, counterObjectDistComp, counterPivotDistComp, counterPivotReadBuckets, preselectedPivots, sampleProviders
Constructor and Description |
---|
IncrementalPivotChooser()
Creates a new instance of IncrementalPivotChooser
|
Modifier and Type | Method and Description |
---|---|
void |
addPivot(LocalAbstractObject newPivot)
This method appends a new pivot to the currently existing list.
|
void |
filterAfterAdd(LocalAbstractObject object,
LocalBucket bucket)
Filter object after its insertion into a bucket.
|
void |
filterAfterRemove(LocalAbstractObject object,
LocalBucket bucket)
Filter object after its removal from a bucket.
|
protected void |
selectPivot(int pivots,
AbstractObjectIterator<? extends LocalAbstractObject> objectIter)
Selects new pivots.
|
clear, deregisterSampleProvider, getLastPivot, getNextPivot, getPivot, getPivot, iterator, registerSampleProvider, removeLastPivot, selectPivot, selectPivot, size
public static int SAMPLE_SET_SIZE
public static int SAMPLE_PIVOT_SIZE
public static float BUCKETCHANGE_THRESHOLD_TO_RESELECT
public IncrementalPivotChooser()
public void filterAfterAdd(LocalAbstractObject object, LocalBucket bucket)
BucketFilterAfterAdd
filterAfterAdd
in interface BucketFilterAfterAdd
object
- the inserted objectbucket
- bucket, where the object is storedpublic void filterAfterRemove(LocalAbstractObject object, LocalBucket bucket)
BucketFilterAfterRemove
filterAfterRemove
in interface BucketFilterAfterRemove
object
- the removed objectbucket
- bucket, where the object has been storedprotected void selectPivot(int pivots, AbstractObjectIterator<? extends LocalAbstractObject> objectIter)
selectPivot
in class AbstractPivotChooser
pivots
- number of pivots to generateobjectIter
- Iterator over the sample set of objects to choose new pivots frompublic void addPivot(LocalAbstractObject newPivot)
addPivot
in class AbstractPivotChooser
newPivot
- The pivot added to the preselected list