org.encog.util.kmeans

## Class Cluster<T extends CentroidFactory<? super T>>

- java.lang.Object
- - org.encog.util.kmeans.Cluster<T>

- Type Parameters:
    `T` - The type of data to cluster.

      public class Cluster<T extends CentroidFactory<? super T>>
      extends Object

  A cluster.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Cluster()` Create an empty cluster.
    `Cluster(T d)` Create a cluster with one initial data point.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(T e)` Add a element to the cluster.
    `Centroid<? super T>` | `centroid()`
    `List<T>` | `getContents()`
    `void` | `remove(int i)` Remove the specified index from the cluster.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Cluster

          public Cluster()

      Create an empty cluster.

    - #### Cluster

          public Cluster(T d)

      Create a cluster with one initial data point.
      Parameters:
        `d` - The initial data point.

  - ### Method Detail

    - #### getContents

          public List<T> getContents()

      Returns:
        The contents of this cluster.

    - #### add

          public void add(T e)

      Add a element to the cluster.
      Parameters:
        `e` - The element to add.

    - #### remove

          public void remove(int i)

      Remove the specified index from the cluster.
      Parameters:
        `i` - The index to remove.

    - #### centroid

          public Centroid<? super T> centroid()

      Returns:
        The centroid of this cluster.

Copyright © 2014. All Rights Reserved.