public class ClusterPivotChooser 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 |
ClusterPivotChooser.Cluster
Class encapsulating objects of one cluster and storing the cluster's radius.
|
protected class |
ClusterPivotChooser.Pair
Class encapsulating two clusters and the diameters of a cluster that would be produced be merging these clusters.
|
protected class |
ClusterPivotChooser.PrecomputedDistances
A cache for distances between a pair of objects
|
Modifier and Type | Field and Description |
---|---|
protected float |
maxClusterRadius
Threshold on the maximum distance within a single cluster.
|
static int |
SAMPLE_SET_SIZE
Size of the data sample used to create clusters.
|
counterBucketReadBuckets, counterObjectDistComp, counterPivotDistComp, counterPivotReadBuckets, preselectedPivots, sampleProviders
Constructor and Description |
---|
ClusterPivotChooser(float radius)
Creates a new instance of ClusterPivotChooser.
|
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 float maxClusterRadius
public ClusterPivotChooser(float radius)
radius
- maximum radius of cluster createdprotected 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