@Test
public void kmeansTest() {

	EuclideanDistance distance = new EuclideanDistance();
	long[] sampleWeights = new long[10];
	FastDistanceVectorData[] samples = new FastDistanceVectorData[sampleWeights.length];
	for (int i = 0; i < 10; i++) {
		sampleWeights[i] = i;
		samples[i] = distance.prepareVectorData(Tuple2.of(DenseVector.ones(2).scale(i), null));
	}
	FastDistanceMatrixData initCentroid = kmeans(2, sampleWeights, samples, distance, 2);
	DenseMatrix initCentroidData = initCentroid.getVectors();
	Assert.assertEquals(initCentroidData.numCols(), 2);
	Assert.assertEquals(new DenseVector(initCentroidData.getColumn(0)).normL2(), 10.842, 0.001);
	Assert.assertEquals(new DenseVector(initCentroidData.getColumn(1)).normL2(), 5.185, 0.001);
}