code: protected Clustering<?> runClusteringAlgorithm(ResultHierarchy hierarchy, Result parent, DBIDs ids, DataStore<DoubleVector> store, int dim, String title) {
      SimpleTypeInformation<DoubleVector> t = new VectorFieldTypeInformation<>(DoubleVector.FACTORY, dim);
      Relation<DoubleVector> sample = new MaterializedRelation<>(t, ids, title, store);
      ProxyDatabase d = new ProxyDatabase(ids, sample);
      Clustering<?> clusterResult = samplesAlgorithm.run(d);
      d.getHierarchy().remove(sample);
      d.getHierarchy().remove(clusterResult);
      hierarchy.add(parent, sample);
      hierarchy.add(sample, clusterResult);
      return clusterResult;
    }
docs: Run a clustering algorithm on a single instance.
  
  @param parent Parent result to attach to
  @param ids Object IDs to process
  @param store Input data
  @param dim Dimensionality
  @param title Title of relation
  @return Clustering result