Github user vasia commented on a diff in the pull request:
https://github.com/apache/flink/pull/537#discussion_r28643385
--- Diff: docs/gelly_guide.md ---
@@ -430,6 +440,46 @@ public static final class Messenger extends
MessagingFunction {...}
{% endhighlight %}
+The following example illustrates the usage of the degree, the number of
vertices as well as the messaging direction options.
+
+{% highlight java %}
+
+Graph<Long, Double, Double> graph = ...
+
+// configure the iteration
+IterationConfiguration parameters = new IterationConfiguration();
+
+// set the messaging direction
+parameters.setDirection(EdgeDirection.IN);
+
+// set the number of vertices option to true
+parameters.setOptNumVertices(true);
+
+// set the degree option to true
+parameters.setOptDegrees(true);
+
+// run the vertex-centric iteration, also passing the configuration
parameters
+Graph<Long, Double, Double> result =
+ graph.runVertexCentricIteration(
+ VertexDistanceUpdater(), new MinDistanceMessenger(),
maxIterations, parameters);
--- End diff --
A "new" is missing. Maybe we can use the shorter function names
"VertexUpdater" and "Messenger" as in the previous example, otherwise the last
line is split into two.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---