docs: @SuppressWarnings("unchecked")
    public static <V extends NumberVector> V getPrototype(Model model, Relation<? extends V> relation, NumberVector.Factory<V> factory) {
      // Mean model contains a numeric Vector
      if(model instanceof MeanModel) {
        final double[] p = ((MeanModel) model).getMean();
        return factory.newNumberVector(p);
      }
      // Handle medoid models
      if(model instanceof MedoidModel) {
        NumberVector p = relation.get(((MedoidModel) model).getMedoid());
        if(factory.getRestrictionClass().isInstance(p)) {
          return (V) p;
        }
        return factory.newNumberVector(p, NumberVectorAdapter.STATIC);
      }
      if(model instanceof PrototypeModel) {
        Object p = ((PrototypeModel<?>) model).getPrototype();
        if(factory.getRestrictionClass().isInstance(p)) {
          return (V) p;
        }
        if(p instanceof NumberVector) {
          return factory.newNumberVector((NumberVector) p, NumberVectorAdapter.STATIC);
        }
        return null; // Inconvertible
      }
      return null;
    }