|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmessif.pivotselection.AbstractPivotChooser
messif.pivotselection.ClusterPivotChooser
public class ClusterPivotChooser
This pivot chooser selects a varying number of pivots based on cluster sizes which are limited by the parameter passed to the constructor.
Clustering of the sample set is done by creating as compact clusters as possible. The cluster radius (maximum distance within the cluster for the cluster's centroid)
is less than the threshold passed in the constructor. The clusteriods (pivots, centers of clusters) are selected as the objects having lowest sum of distances to all
other objects in the cluster.
CAVEAT: This pivot chooser ignores the parameter count
passed in all selectPivot(int, messif.objects.util.AbstractObjectIterator extends messif.objects.LocalAbstractObject>)
methods.
Nested Class Summary | |
---|---|
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 |
Field Summary | |
---|---|
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. |
Fields inherited from class messif.pivotselection.AbstractPivotChooser |
---|
counterBucketReadBuckets, counterObjectDistComp, counterPivotDistComp, counterPivotReadBuckets, preselectedPivots, sampleProviders |
Constructor Summary | |
---|---|
ClusterPivotChooser(float radius)
Creates a new instance of ClusterPivotChooser. |
Method Summary | |
---|---|
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. |
Methods inherited from class messif.pivotselection.AbstractPivotChooser |
---|
addPivot, clear, 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 |
Field Detail |
---|
public static int SAMPLE_SET_SIZE
protected float maxClusterRadius
Constructor Detail |
---|
public ClusterPivotChooser(float radius)
radius
- maximum radius of cluster createdMethod Detail |
---|
protected 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |