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.util.kmeans
Class KMeansUtil<K extends CentroidFactory<? super K>>

    java.lang.Object
      org.encog.util.kmeans.KMeansUtil<K>

Type Parameters:
  `K` - The type to cluster.

    public class KMeansUtil<K extends CentroidFactory<? super K>>

extends Object

Generic KMeans clustering object.

Constructor Summary
`KMeansUtil(int theK, List<? extends K> theElements)` Construct the clusters.

Method Summary
`Collection<K>` | `get(int index)` Get a cluster by index.
`Cluster<K>` | `getCluster(int i)` Get a cluster by index.
`void` | `process()` Perform the cluster.
`int` | `size()`

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

Constructor Detail

### KMeansUtil

    public KMeansUtil(int theK,
                      List<? extends K> theElements)

  Construct the clusters. Call process to perform the cluster.

  Parameters:
    `theK` - The number of clusters.
    `theElements` - The elements to cluster.

Method Detail

### process

    public void process()

  Perform the cluster.

### get

    public Collection<K> get(int index)

  Get a cluster by index.

  Parameters:
    `index` - The index to get.
  Returns:
    The cluster.

### size

    public int size()

  Returns:
    The number of clusters.

### getCluster

    public Cluster<K> getCluster(int i)

  Get a cluster by index.

  Parameters:
    `index` - The index to get.
  Returns:
    The cluster.

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.