Top Description Fields Constructors Methods
org.apache.commons.math3.ml.clustering

public Class CentroidCluster<T extends Clusterable>

extends Cluster<T extends Clusterable>
Class Inheritance
Type Parameters
<T>
the type of points that can be clustered

A Cluster used by centroid-based clustering algorithms.

Defines additionally a cluster center which may not necessarily be a member of the original data set.

Since
3.2

Field Summary

Modifier and TypeField and Description
private final Clusterable
center

Center of the cluster.

private static final long

Constructor Summary

AccessConstructor and Description
public
CentroidCluster(final Clusterable
the point which is to be the center of this cluster
center
)

Build a cluster centered at a specified point.

Method Summary

Modifier and TypeMethod and Description
public Clusterable

Returns:

chosen cluster center
getCenter
()

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

Inherited from org.apache.commons.math3.ml.clustering.Cluster:
addPointgetPoints

Field Detail

centerback to summary
private final Clusterable center

Center of the cluster.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.apache.commons.math3.ml.clustering.Cluster.serialVersionUID.

Serializable version identifier.

Constructor Detail

CentroidClusterback to summary
public CentroidCluster(final Clusterable center)

Build a cluster centered at a specified point.

Parameters
center:Clusterable

the point which is to be the center of this cluster

Method Detail

getCenterback to summary
public Clusterable getCenter()

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

Returns:Clusterable

chosen cluster center