docs: public static double[][] relationAsMatrix(final Relation<? extends NumberVector> relation, ArrayDBIDs ids) {
      final int rowdim = ids.size();
      final int coldim = dimensionality(relation);
      double[][] mat = new double[rowdim][coldim];
      int r = 0;
      for(DBIDArrayIter iter = ids.iter(); iter.valid(); iter.advance(), r++) {
        NumberVector vec = relation.get(iter);
        double[] row = mat[r];
        for(int c = 0; c < coldim; c++) {
          row[c] = vec.doubleValue(c);
        }
      }
      assert (r == rowdim);
      return mat;
    }