private void getInitialCentroidsFromCassandraDB() {
   String[] serializedCentroids = FuzzyClustersDatabase.getSerializedClusterMap();
   for (int i = 0; i < serializedCentroids.length; i++) {
     try {
       centroids.put(
           i + 1,
           SerializeAndDeserializeJavaObjects.convertStringToDoubleArray(serializedCentroids[i]));
     } catch (Exception ex) {
       ex.printStackTrace();
     }
   }
 }
 private void updateCentroids(int clusterIndex, double[] vector) {
   String serializedVectors =
       SerializeAndDeserializeJavaObjects.convertDoubleVectorToString(vector);
   FuzzyClustersDatabase.setSerializedMap(clusterIndex, serializedVectors);
 }