code: private static void updateNearestCenter(double inverseSimilarities[], Matrix dataPoints,
                                              int newlyChosen, 
                                              SimilarityFunction simFunc) {
          
          DoubleVector chosenVec = dataPoints.getRowVector(newlyChosen);
  	for (int i = 0; i < inverseSimilarities.length; i++) {
              double sim = simFunc.sim(dataPoints.getRowVector(i), chosenVec);
              sim = invertSim(sim);
              inverseSimilarities[i] = Math.min(inverseSimilarities[i], sim);
          }
      }
docs: For the given newly chosen center, updates the {@code inverseSimilarities} array to
  be the maximum similarity of a data point to any center.