docs: protected static <T> double initialWeights(WritableDoubleDataStore weights, Relation<? extends T> relation, DBIDs ids, T first, T second, DistanceQuery<? super T> distQ) {
      double weightsum = 0.;
      for(DBIDIter it = ids.iter(); it.valid(); it.advance()) {
        // distance will usually already be squared
        T v = relation.get(it);
        double weight = Math.min(distQ.distance(first, v), distQ.distance(second, v));
        weights.putDouble(it, weight);
        weightsum += weight;
      }
      return weightsum;
    }