Github user vasia commented on a diff in the pull request: https://github.com/apache/flink/pull/1901#discussion_r62310412 --- Diff: docs/apis/batch/libs/gelly.md --- @@ -2067,7 +2067,92 @@ configuration. <tbody> <tr> - <td><strong>TranslateGraphIds</strong></td> + <td>degree.annotate.directed.<br/><strong>VertexInDegree</strong></td> + <td> + <p>Annotate vertices of a directed graph with the in-degree count.</p> +{% highlight java %} +DataSet<Vertex<K, LongValue>> inDegree = graph + .run(new VertexInDegree() + .setIncludeZeroDegreeVertices(true)); +{% endhighlight %} + </td> + </tr> + + <tr> + <td>degree.annotate.directed.<br/><strong>VertexOutDegree</strong></td> + <td> + <p>Annotate vertices of a directed graph with the out-degree count.</p> +{% highlight java %} +DataSet<Vertex<K, LongValue>> outDegree = graph + .run(new VertexOutDegree() + .setIncludeZeroDegreeVertices(true)); +{% endhighlight %} + </td> + </tr> + + <tr> + <td>degree.annotate.directed.<br/><strong>VertexDegreePair</strong></td> + <td> + <p>Annotate vertices of a directed graph with both the out-degree and in-degree count.</p> +{% highlight java %} +DataSet<Vertex<K, Tuple2<LongValue, LongValue>>> pairDegree = graph + .run(new VertexDegreePair() + .setIncludeZeroDegreeVertices(true)); +{% endhighlight %} + </td> + </tr> + + <tr> + <td>degree.annotate.undirected.<br/><strong>VertexDegree</strong></td> + <td> + <p>Annotate vertices of an undirected graph with the degree count.</p> +{% highlight java %} +DataSet<Vertex<K, LongValue>> degree = graph + .run(new VertexDegree() + .setIncludeZeroDegreeVertices(true) + .setReduceOnTargetId(true)); +{% endhighlight %} + </td> + </tr> + + <tr> + <td>degree.annotate.undirected.<br/><strong>EdgeSourceDegree</strong></td> + <td> + <p>Annotate edges of an undirected graph with degree of the source ID.</p> --- End diff -- When you say "undirected" graph, do you mean the algorithm does not take into account the edge direction or does the input graph have to be undirected? Since gelly graphs are in fact always directed and we simply add opposite-direction edges to represent undirected graphs, we should be clear about this. Also, which is the source vertex is an undirected edge?
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---