class TriadicCensus extends GraphAnalyticBase<K, VV, EV, Result> {

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

		triangleCount = new Count<>();

		DataSet<TriangleListing.Result<K>> triangles = input
			.run(new TriangleListing<K, VV, EV>()
				.setSortTriangleVertices(false)
				.setParallelism(parallelism));

		triangleCount.run(triangles);

		vertexMetrics = new VertexMetrics<K, VV, EV>()
			.setParallelism(parallelism);

		input.run(vertexMetrics);

		return this;
	}

}