public class CoveragePivotChooser extends AbstractPivotChooser implements java.io.Serializable, BucketFilterAfterAdd, BucketFilterAfterRemove
count
passed in all selectPivot(int, messif.objects.util.AbstractObjectIterator<? extends messif.objects.LocalAbstractObject>)
methods.Modifier and Type | Class and Description |
---|---|
protected class |
CoveragePivotChooser.Ball
Class encapsulating info about each cluster (ball region).
|
protected class |
CoveragePivotChooser.PrecomputedDistances
A cache for distances between a pair of objects
|
Modifier and Type | Field and Description |
---|---|
protected float |
clusterDiameter
Ball size multiplied by two
|
protected float |
clusterRadius
Ball size -- radius of the cluster.
|
static int |
SAMPLE_SET_SIZE
Size of the data sample used to create clusters.
|
counterBucketReadBuckets, counterObjectDistComp, counterPivotDistComp, counterPivotReadBuckets, preselectedPivots, sampleProviders
Constructor and Description |
---|
CoveragePivotChooser(float radius)
Creates a new instance of CoveragePivotChooser.
|
Modifier and Type | Method and Description |
---|---|
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 count,
AbstractObjectIterator<? extends LocalAbstractObject> sampleSetIterator)
This method carries out the actual pivot selection and must be implemented by
subclasses.
|
addPivot, clear, deregisterSampleProvider, getLastPivot, getNextPivot, getPivot, getPivot, iterator, registerSampleProvider, removeLastPivot, selectPivot, selectPivot, size
public static int SAMPLE_SET_SIZE
protected final float clusterRadius
protected final float clusterDiameter
public CoveragePivotChooser(float radius)
radius
- radius of clusters (balls) used to create the coverageprotected void selectPivot(int count, AbstractObjectIterator<? extends LocalAbstractObject> sampleSetIterator)
AbstractPivotChooser
addPivot
method.selectPivot
in class AbstractPivotChooser
count
- Number of pivots to generatesampleSetIterator
- Iterator over the sample set of objects to choose new pivots frompublic 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 stored