public class Cluster
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Cluster() |
Cluster(Point center,
java.lang.String distanceFunction) |
Modifier and Type | Method and Description |
---|---|
void |
addPoint(Point point) |
void |
addPoint(Point point,
boolean moveClusterCenter) |
Point |
getCenter() |
double |
getDistanceToCenter(Point point) |
java.lang.String |
getId() |
java.lang.String |
getLabel() |
Point |
getPoint(java.lang.String id) |
java.util.List<Point> |
getPoints() |
boolean |
isEmpty() |
Point |
removePoint(java.lang.String id) |
void |
removePoints() |
void |
setCenter(Point center) |
void |
setId(java.lang.String id) |
void |
setLabel(java.lang.String label) |
void |
setPoints(java.util.List<Point> points) |
public Cluster()
public Cluster(Point center, java.lang.String distanceFunction)
public double getDistanceToCenter(Point point)
public void addPoint(Point point)
public void addPoint(Point point, boolean moveClusterCenter)
public void removePoints()
public boolean isEmpty()
public Point getPoint(java.lang.String id)
public Point removePoint(java.lang.String id)
public Point getCenter()
public void setCenter(Point center)
public java.util.List<Point> getPoints()
public void setPoints(java.util.List<Point> points)
public java.lang.String getId()
public void setId(java.lang.String id)
public java.lang.String getLabel()
public void setLabel(java.lang.String label)