/**
 * The interface of centroid generator
 */
public interface CentroidGenerator {
    /**
     * Generate k centroids.
     * @param k An int value representing the number of centroids being generated.
     * @param data The data set containing all data points.
     * @return A list of all generated centroids.
     */
    double[][] generate(int k, double[][] data) throws EmptyDataSetException;
}

@@ -345,16 +345,22 @@
 e(int k,
+ final
  double%5B

change dataset to constant in CentroidGenerator