public static <V extends SampledVertex>Set<V> createSampledPartition(Collection<V> vertices){
  Set<V> partition=new HashSet<V>();
  for (  V vertex : vertices) {
    if (vertex.isSampled())     partition.add(vertex);
  }
  return partition;
}

public static < V extends SampledVertex > Set < V > createSampledPartition ( Collection < V > vertices ) { Set < V > partition = new HashSet < V > ( ) ; for ( V vertex : vertices ) { if ( vertex . isSampled ( ) ) partition . add ( vertex ) ; } return partition ; }
creates a subset of sampled vertices .
