Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.math.stat.clustering
Class Cluster<T extends Clusterable<T>>

    java.lang.Object
      org.apache.commons.math.stat.clustering.Cluster<T>

Type Parameters:
  `T` - the type of points that can be clustered

All Implemented Interfaces:
  java.io.Serializable

    public class Cluster<T extends Clusterable<T>>

extends java.lang.Object
implements java.io.Serializable

Cluster holding a set of `Clusterable` points.

Since:
  2.0
Version:
  $Revision: 771076 $ $Date: 2009-05-03 12:28:48 -0400 (Sun, 03 May 2009) $
See Also:
  Serialized Form

Field Summary
`private T` | `center` Center of the cluster.
`private java.util.List<T>` | `points` The points contained in this cluster.
`private static long` | `serialVersionUID` Serializable version identifier.

Constructor Summary
`Cluster(T center)` Build a cluster centered at a specified point.

Method Summary
`void` | `addPoint(T point)` Add a point to this cluster.
`T` | `getCenter()` Get the point chosen to be the center of this cluster.
`java.util.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 java.util.List<T extends Clusterable<T>> points

  The points contained in this cluster.

### center

    private final T extends Clusterable<T> center

  Center of the cluster.

Constructor Detail

### Cluster

    public Cluster(T center)

  Build a cluster centered at a specified point.

  Parameters:
    `center` - the point which is to be the center of this cluster

Method Detail

### addPoint

    public void addPoint(T point)

  Add a point to this cluster.

  Parameters:
    `point` - point to add

### getPoints

    public java.util.List<T> getPoints()

  Get the points contained in the cluster.

  Returns:
    points contained in the cluster

### getCenter

    public T getCenter()

  Get the point chosen to be the center of this cluster.

  Returns:
    chosen cluster center

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2003-2011 Apache Software Foundation