docs: protected void updateDistances(Relation<V> relation, double[][] means, final WritableDataStore<Meta> metas, NumberVectorDistanceFunction<? super V> df) {
      for(DBIDIter id = relation.iterDBIDs(); id.valid(); id.advance()) {
        Meta c = metas.get(id);
        V fv = relation.get(id);
        // Update distances to means.
        c.secondary = -1;
        for(int i = 0; i < k; i++) {
          c.dists[i] = df.distance(fv, DoubleVector.wrap(means[i]));
          if(c.primary != i) {
            if(c.secondary < 0 || c.dists[i] < c.dists[c.secondary]) {
              c.secondary = i;
            }
          }
        }
        metas.put(id, c); // Changed.
      }
    }