code: public static <V extends NumberVector> V getPrototypeOrCentroid(Model model, Relation<? extends V> relation, DBIDs ids, NumberVector.Factory<V> factory) {
      assert (ids.size() > 0);
      V v = getPrototype(model, relation, factory);
      return v != null ? v : factory.newNumberVector(Centroid.make(relation, ids));
    }
docs: Get the representative vector for a cluster model, or compute the centroid.
  
  @param model Model
  @param relation Data relation (for representatives specified per DBID)
  @param ids Cluster ids (must not be empty.
  @return Vector of type V, {@code null} if not supported.
  @param <V> desired vector type