code: public <E extends WeightedEdge> MultiMap<Integer,Integer> cluster(
                final WeightedGraph<E> graph, int numClusters, Properties props) {
          if (props.getProperty(KEEP_WEIGHT_VECTORS_PROPERTY) != null)
              keepWeightVectors = Boolean.parseBoolean(
                  props.getProperty(KEEP_WEIGHT_VECTORS_PROPERTY));
          vertexToWeightVector.clear();
          return super.cluster(graph, numClusters, props);
      }
docs: Computes the similarity of the graph's edges and merges them until the
  specified number of clusters has been reached.
  
  @param numClusters the number of clusters to return