protected class ClusterPivotChooser.Cluster
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
ClusterPivotChooser.Cluster(ClusterPivotChooser.Cluster model)
Copy constructor
|
ClusterPivotChooser.Cluster(int id,
LocalAbstractObject object)
Create a new Cluster containing just the passed object.
|
Modifier and Type | Method and Description |
---|---|
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
|
protected float radius
protected int id
protected AbstractObjectList<LocalAbstractObject> objects
public ClusterPivotChooser.Cluster(int id, LocalAbstractObject object)
id
- identification of the clusterobject
- single object that forms the clusterpublic ClusterPivotChooser.Cluster(ClusterPivotChooser.Cluster model)
model
- a cluster to create a copy ofpublic 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 retrivepublic 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