code: public static NumberVector getPrototypeOrCentroid(Model model, Relation<? extends NumberVector> relation, DBIDs ids) {
      assert (ids.size() > 0);
      NumberVector v = getPrototype(model, relation);
      return v != null ? v : 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 Some {@link NumberVector}.