org.encog.ml.kmeans
Class Centroid

java.lang.Object
  extended by org.encog.ml.kmeans.Centroid

public class Centroid
extends Object

The centers of each cluster.


Constructor Summary
Centroid(double[] theCenters)
          Construct the centroid.
 
Method Summary
 void calcCentroid()
          Calculate the centroid.
 double[] getCenters()
           
 KMeansCluster getCluster()
           
 void setCluster(KMeansCluster c)
          Set the cluster.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Centroid

public Centroid(double[] theCenters)
Construct the centroid.

Parameters:
theCenters - The centers.
Method Detail

calcCentroid

public final void calcCentroid()
Calculate the centroid.


getCenters

public final double[] getCenters()
Returns:
The centers.

getCluster

public final KMeansCluster getCluster()
Returns:
The clusters.

setCluster

public final void setCluster(KMeansCluster c)
Set the cluster.

Parameters:
c - The cluster.


Copyright © 2011. All Rights Reserved.