class GmmPartitionData implements AutoCloseable {

    static void estimateLikelihoodClusters(GmmPartitionData data, Vector[] initMeans) {
        for (int i = 0; i < data.size(); i++) {
            int closestClusterId = -1;
            double minSquaredDist = Double.MAX_VALUE;

            Vector x = data.getX(i);
            for (int c = 0; c < initMeans.length; c++) {
                data.setPcxi(c, i, 0.0);
                double distance = initMeans[c].getDistanceSquared(x);
                if (distance < minSquaredDist) {
                    closestClusterId = c;
                    minSquaredDist = distance;
                }
            }

            data.setPcxi(closestClusterId, i, 1.);
        }
    }

      GmmPartitionData(List<LabeledVector<Double>> xs, double[][] pcxi);

}