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);

		triangleListingHelper = new TriangleListingHelper<>();

		input
			.run(new TriangleListing<K, VV, EV>()
				.setParallelism(parallelism))
			.output(triangleListingHelper)
				.name("Triangle counts");

		vertexDegreesHelper = new VertexDegreesHelper<>();

		input
			.run(new VertexDegrees<K, VV, EV>()
				.setParallelism(parallelism))
			.output(vertexDegreesHelper)
				.name("Edge and triplet counts");

		return this;
	}

}