|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmessif.pivotselection.ClusterPivotChooser.Cluster
protected class ClusterPivotChooser.Cluster
Class encapsulating objects of one cluster and storing the cluster's radius.
Field Summary | |
---|---|
protected int |
id
Id of the cluster |
protected AbstractObjectList<LocalAbstractObject> |
objects
List of objects of this cluster |
protected float |
radius
Diameter of a cluster if cluster1 and cluster2 were merged. |
Constructor Summary | |
---|---|
ClusterPivotChooser.Cluster(ClusterPivotChooser.Cluster model)
Copy constructor |
|
ClusterPivotChooser.Cluster(int id,
LocalAbstractObject object,
ClusterPivotChooser.PrecomputedDistances pd)
Create a new Cluster containing just the passed object. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
AbstractObjectIterator<LocalAbstractObject> |
getAllObjects()
Returns all objects of this cluster as an iterator. |
LocalAbstractObject |
getClusteroid()
Returns an object (clusteriod) that is in the center of this cluster. |
int |
getId()
Returns identification of this cluster |
LocalAbstractObject |
getObject(int index)
Retrieves an object at the passed index. |
float |
getRadius()
Covering radius of this cluster (maximum distance between a pair of objects of this cluster). |
int |
hashCode()
|
void |
mergeWithCluster(ClusterPivotChooser.Cluster cluster,
ClusterPivotChooser.PrecomputedDistances pd)
Merge this cluster with the passed cluster and set the new cluster's radius. |
int |
size()
Size of the cluster |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected float radius
protected int id
protected AbstractObjectList<LocalAbstractObject> objects
Constructor Detail |
---|
public ClusterPivotChooser.Cluster(int id, LocalAbstractObject object, ClusterPivotChooser.PrecomputedDistances pd)
id
- identification of the clusterobject
- single object that forms the clusterpd
- cache of precomputed distances between all pairs of objectspublic ClusterPivotChooser.Cluster(ClusterPivotChooser.Cluster model)
model
- a cluster to create a copy ofMethod Detail |
---|
public LocalAbstractObject getClusteroid()
public float getRadius()
public int size()
public int getId()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public LocalAbstractObject getObject(int index)
index
- index of objects to retrive
public AbstractObjectIterator<LocalAbstractObject> getAllObjects()
public void mergeWithCluster(ClusterPivotChooser.Cluster cluster, ClusterPivotChooser.PrecomputedDistances pd)
cluster
- a cluster to add to thispd
- cache of precomputed distances between all pairs of objects
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |