@Test
public void testUpdatePcxi() {

    GmmPartitionData.updatePcxi(
        data,
        VectorUtils.of(0.3, 0.7),
        Arrays.asList(
            new MultivariateGaussianDistribution(VectorUtils.of(1.0, 0.5), new DenseMatrix(new double[] {0.5, 0., 0., 1.}, 2)),
            new MultivariateGaussianDistribution(VectorUtils.of(0.0, 0.5), new DenseMatrix(new double[] {1.0, 0., 0., 1.}, 2))
        )
    );
    assertEquals(0.49, data.pcxi(0, 0), 1e-2);
    assertEquals(0.50, data.pcxi(1, 0), 1e-2);
    assertEquals(0.18, data.pcxi(0, 1), 1e-2);
    assertEquals(0.81, data.pcxi(1, 1), 1e-2);
    assertEquals(0.49, data.pcxi(0, 2), 1e-2);
    assertEquals(0.50, data.pcxi(1, 2), 1e-2);
}