org.apache.commons.math3.ml.clustering
Class Cluster<T extends Clusterable>

java.lang.Object
  extended by org.apache.commons.math3.ml.clustering.Cluster<T>
Type Parameters:
T - the type of points that can be clustered
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CentroidCluster

public class Cluster<T extends Clusterable>
extends Object
implements Serializable

Cluster holding a set of Clusterable points.

Since:
3.2
Version:
$Id: Cluster.java 1461862 2013-03-27 21:48:10Z tn $
See Also:
Serialized Form

Field Summary
private  List<T> points
          The points contained in this cluster.
private static long serialVersionUID
          Serializable version identifier.
 
Constructor Summary
Cluster()
          Build a cluster centered at a specified point.
 
Method Summary
 void addPoint(T point)
          Add a point to this cluster.
 List<T> getPoints()
          Get the points contained in the cluster.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serializable version identifier.

See Also:
Constant Field Values

points

private final List<T extends Clusterable> points
The points contained in this cluster.

Constructor Detail

Cluster

public Cluster()
Build a cluster centered at a specified point.

Method Detail

addPoint

public void addPoint(T point)
Add a point to this cluster.

Parameters:
point - point to add

getPoints

public List<T> getPoints()
Get the points contained in the cluster.

Returns:
points contained in the cluster


Copyright (c) 2003-2013 Apache Software Foundation