/**
 * Created by bing on 4/20/17.
 */
public class KMeans {

}

@@ -55,10 +55,1544 @@
 eans %7B%0A%0A
+    private DistanceFunction df;%0A    private MeanFunction mf;%0A    private CentroidGenerator cg;%0A    private double%5B%5D%5B%5D data;%0A    private double%5B%5D%5B%5D centroids;%0A    private int k;%0A%0A    /**%0A     * The constructor of KMeans class%0A     * @param k the k value%0A     * @param data the input data set%0A     * @param df the distance function%0A     * @param cg the centroid generator function%0A     * @param mf the mean function%0A     */%0A    public KMeans(int k,double%5B%5D%5B%5D data,DistanceFunction df,CentroidGenerator cg,MeanFunction mf)%7B%0A        this.k = k;%0A        this.data = data;%0A        this.df = df;%0A        this.mf = mf;%0A        this.cg = cg;%0A        try %7B%0A            centroids = cg.generate(k,data);%0A        %7D catch (EmptyDataSetException e) %7B%0A            e.printStackTrace();%0A            System.exit(1);%0A        %7D%0A    %7D%0A%0A    /**%0A     * The constructor of KMeans class with standard mean function%0A     * @param k the k value%0A     * @param data the input data set%0A     * @param df the distance function%0A     * @param cg the centroid generator function%0A     */%0A    public KMeans(int k,double%5B%5D%5B%5D data, DistanceFunction df, CentroidGenerator cg)%7B%0A        this(k,data,df,cg,new StandardMeanFunction());%0A    %7D%0A%0A    /**%0A     * The short constructor of KMeans class with standard mean function, Euclidean distance function, and random centroid generator.%0A     * @param k the k value%0A     * @param data the input data set%0A     */%0A    public KMeans(int k, double%5B%5D%5B%5D data)%7B%0A        this(k,data,new Euclidean(), new RandomCentroidGenerator());%0A    %7D%0A%0A
 %7D%0A

add contructors Changes to be committed: modified: src/main/java/KMeans.java