Adjust Kmean and Centroid

change centroid to double array. Adjust the structure.