public class ClusterSet
extends java.lang.Object
Constructor and Description |
---|
ClusterSet()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Cluster c)
Adds a cluster of the set.
|
ClusterSet |
clone()
Clone the cluster set.
|
Cluster |
get(int i)
Gets cluster in ith position.
|
Cluster |
get(Prototype p)
Gets the cluster of a prototype.
|
Cluster |
getClusterOf(Prototype p)
Returns the cluster of a prototype.
|
java.util.ArrayList<Cluster> |
getClusters()
Returns the set of clusters.
|
double |
maxRadiusLength()
Returns the maximum radius length of set of clusters.
|
double |
maxRadiusLengthOfClass(double k)
Returns the maximum radius length of set of clusters of one class.
|
Cluster |
merge(Cluster Ca,
Cluster Cb)
Merge two clusters.
|
void |
moveTo(Prototype p,
Cluster c)
Move one prototype to a cluster.
|
java.util.ArrayList<Pair<Cluster,Cluster>> |
nearestClustersWithSameClass()
Returns a list of pairs of clusters in inter-cluster ascending order.
|
boolean |
remove(Cluster c)
Remove a cluster of the set.
|
int |
size()
Gets the number of clusters of the set.
|
public ClusterSet clone()
clone
in class java.lang.Object
public Cluster get(int i)
i
- Position of the cluster.public Cluster get(Prototype p)
p
- Prototype.public Cluster merge(Cluster Ca, Cluster Cb)
Ca
- One cluster.Cb
- Other cluster.public boolean remove(Cluster c)
c
- Cluster to be removed.public void add(Cluster c)
c
- Cluster to be added.public java.util.ArrayList<Pair<Cluster,Cluster>> nearestClustersWithSameClass()
public java.util.ArrayList<Cluster> getClusters()
public double maxRadiusLength()
public double maxRadiusLengthOfClass(double k)
k
- Class that must have the clusters.public void moveTo(Prototype p, Cluster c)
p
- Prototype to be moved.c
- Destination of p.public Cluster getClusterOf(Prototype p)
p
- Prototype to be its cluster returned.public int size()