public class Cluster
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
id
Id of the cluster
|
Constructor and Description |
---|
Cluster(Prototype p)
Cluster constructor using a prototype set and its center.
|
Cluster(PrototypeSet s)
Cluster constructor using a prototype set and its center.
|
Cluster(PrototypeSet s,
Prototype representative)
Cluster constructor using a prototype set and its center.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Prototype p)
Add prototype to the cluster.
|
double |
d(Cluster c)
Distance between clusters.
|
double |
getLabel()
Gets the label of all prototypes of the cluster.
|
PrototypeSet |
getPrototypeSet()
Gets the prototype set of the cluster.
|
Pair<Prototype,java.lang.Double> |
getRadius()
Gets the radius of the cluster.
|
double |
getRadiusLength()
Gets the radius length of the cluster.
|
Prototype |
getRepresentative()
Gets the representative of the cluster
|
PrototypeSet |
getSet()
Gets the prototype set of the cluster.
|
double |
label()
Gets the label of all prototypes of the cluster.
|
Cluster |
mix(Cluster other)
Merges two cluster but not including the representatives of the cluster arguments.
|
boolean |
remove(Prototype p)
Removes a prototype of the cluster.
|
int |
size()
Gets the number of prototypes that forms the cluster.
|
public Cluster(PrototypeSet s, Prototype representative)
s
- Prototype set.representative
- Center of s.public Cluster(PrototypeSet s)
s
- Prototype set.public Cluster(Prototype p)
p
- Prototype which forms an one-prototype prototype set.public double d(Cluster c)
c
- Other cluster.public boolean remove(Prototype p)
p
- Prototype to be removed.public void add(Prototype p)
p
- Prototype to be added.public Prototype getRepresentative()
public Pair<Prototype,java.lang.Double> getRadius()
public double getRadiusLength()
public PrototypeSet getSet()
public PrototypeSet getPrototypeSet()
public double label()
public double getLabel()
public int size()
public Cluster mix(Cluster other)
other
- Cluster to be merged with.