class TriangleCount extends AbstractGraphAnalytic<K, VV, EV, Long> {

	@Override
	public TriangleCount<K, VV, EV> run(Graph<K, VV, EV> input)
			throws Exception {
		super.run(input);

		DataSet<Tuple3<K, K, K>> triangles = input
			.run(new TriangleListing<K, VV, EV>()
				.setSortTriangleVertices(false)
				.setLittleParallelism(littleParallelism));

		triangles
			.output(new CountHelper<Tuple3<K, K, K>>(id))
				.name("Count triangles");

		return this;
	}

}