cluster.java
来自「聚类算法kmeans」· Java 代码 · 共 60 行
JAVA
60 行
class cluster {
/** Cluster Number */
private int clusterNumber;
/** Mean data point of this cluster */
private kMeansPoint mean;
/**
* Returns a new instance of cluster
*
* @param _clusterNumber the cluster number of this cluster
*/
public cluster(int _clusterNumber) {
this.clusterNumber = _clusterNumber;
} // end of cluster()
/**
* Sets the mean data point of this cluster
*
* @param meanDataPoint the new mean data point for this cluster
*/
public void setMean(kMeansPoint meanDataPoint) {
this.mean = meanDataPoint;
} // end of setMean()
/**
* Returns the mean data point of this cluster
*
* @return the mean data point of this cluster
*/
public kMeansPoint getMean() {
return this.mean;
} // end of getMean()
/**
* Returns the cluster number of this cluster
*
* @return the cluster number of this cluster
*/
public int getClusterNumber() {
return this.clusterNumber;
} // end of getClusterNumber()
} // end of class
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?