예제 #1
0
  /**
   * performs the clustering
   *
   * @return
   * @throws ClusterException
   */
  public Cluster perform() throws ClusterException {

    for (int i = 0; i < data.getWidth(); i++) {
      for (int j = 0; j < data.getHeight(); j++) {
        if (!cluster.isClustered(i, j)) {
          ClusterNode node = new SimpleClusterNode(count++);
          node.addCell(i, j, data.getCellAt(i, j));
          cluster.setClusterNode(i, j, node);
          clusterLoop(i, j, node);
        }
      }
    }

    return cluster;
  }