public static void writeCentroidsToFile(Clusters clusters,FlagConfig flagConfig){
  VectorStoreRAM centroidsOutput=new VectorStoreRAM(flagConfig);
  for (int i=0; i < clusters.centroids.length; ++i) {
    centroidsOutput.putVector(Integer.toString(i),clusters.centroids[i]);
  }
  try {
    VectorStoreWriter.writeVectors("cluster_centroids.bin",flagConfig,centroidsOutput);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

public static void writeCentroidsToFile ( Clusters clusters , FlagConfig flagConfig ) { VectorStoreRAM centroidsOutput = new VectorStoreRAM ( flagConfig ) ; for ( int i = 0 ; i < clusters . centroids . length ; ++ i ) { centroidsOutput . putVector ( Integer . toString ( i ) , clusters . centroids [ i ] ) ; } try { VectorStoreWriter . writeVectors ( "cluster_centroids.bin" , flagConfig , centroidsOutput ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } }
utility method that writes cluster centroids to a file called " cluster_centroids . bin " .
