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

## org.encog.ml.kmeans
Class BasicCluster

    java.lang.Object
      org.encog.ml.kmeans.BasicCluster

All Implemented Interfaces:
  MLCluster

    public class BasicCluster

extends Object
implements MLCluster

Holds a cluster of MLData items that have been clustered by the KMeansClustering class.

Constructor Summary
`BasicCluster(Cluster<BasicMLDataPair> cluster)` Construct a cluster from another.

Method Summary
`void` | `add(MLData pair)` Add to the cluster.
`MLDataSet` | `createDataSet()` Create a dataset from the clustered data.
`MLData` | `get(int pos)` Get the specified data item by index.
`Centroid<?>` | `getCentroid()`
`List<MLData>` | `getData()`
`void` | `remove(MLData pair)` Remove the specified item.
`void` | `setCentroid(BasicMLDataPairCentroid c)` Set the centroid.
`int` | `size()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BasicCluster

    public BasicCluster(Cluster<BasicMLDataPair> cluster)

  Construct a cluster from another.

  Parameters:
    `cluster` - The other cluster.

Method Detail

### add

    public final void add(MLData pair)

  Add to the cluster.

  Specified by:
    `add` in interface `MLCluster`
  Parameters:
    `pair` - The pair to add.

### createDataSet

    public final MLDataSet createDataSet()

  Create a dataset from the clustered data.

  Specified by:
    `createDataSet` in interface `MLCluster`
  Returns:
    The dataset.

### get

    public final MLData get(int pos)

  Get the specified data item by index.

  Specified by:
    `get` in interface `MLCluster`
  Parameters:
    `pos` - The index of the data item to get.
  Returns:
    The data item.

### getCentroid

    public final Centroid<?> getCentroid()

  Returns:
    The centroid.

### getData

    public final List<MLData> getData()

  Specified by:
    `getData` in interface `MLCluster`
  Returns:
    The data in this cluster.

### remove

    public final void remove(MLData pair)

  Remove the specified item.

  Specified by:
    `remove` in interface `MLCluster`
  Parameters:
    `pair` - The item to remove.

### setCentroid

    public final void setCentroid(BasicMLDataPairCentroid c)

  Set the centroid.

  Parameters:
    `c` - The new centroid.

### size

    public final int size()

  Specified by:
    `size` in interface `MLCluster`
  Returns:
    The number of items.

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

Copyright © 2012. All Rights Reserved.