class CommunityDetection implements GraphAlgorithm<K, Long, Double, Graph<K, Long, Double>> {

	@Override
	public Graph<K, Long, Double> run(Graph<K, Long, Double> graph) {

		DataSet<Vertex<K, Tuple2<Long, Double>>> initializedVertices = graph.getVertices()
			.map(new AddScoreToVertexValuesMapper<>());

		Graph<K, Tuple2<Long, Double>, Double> graphWithScoredVertices =
			Graph.fromDataSet(initializedVertices, graph.getEdges(), graph.getContext()).getUndirected();

		return graphWithScoredVertices.runScatterGatherIteration(new LabelMessenger<>(),
			new VertexLabelUpdater<>(delta), maxIterations)
				.mapVertices(new RemoveScoreFromVertexValuesMapper<>());
	}

	public  CommunityDetection(int maxIterations, double delta);

}