[
https://issues.apache.org/jira/browse/FLINK-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14976525#comment-14976525
]
Martin Junghanns commented on FLINK-2905:
-----------------------------------------
Sorry for the confusion. In the example, I focused on the graphs that are
induced by the vertex intersection (1 and 3 in that case). You are right, in
call 1, resulting edges are the union of all input edges with identical source
target and edge values. I think, computing distinct edges would be too strict
for some cases. Consider a real world example where you want to intersect two
transportation networks between cities, one for trains and one for planes. Each
edge has a maximum transportation capacity. There can be a case, where you have
two identical edge values in both networks between the same cities. If we
compute distinct, it is not possible to aggregate edges by their value (to get
the total capacity). Keeping edges from both graphs allows us to compute such
aggregates. If the user is not interested in duplicates, a distinct call is
always possible and does not invalidate the graph.
> Add intersect method to Graph class
> -----------------------------------
>
> Key: FLINK-2905
> URL: https://issues.apache.org/jira/browse/FLINK-2905
> Project: Flink
> Issue Type: New Feature
> Components: Gelly
> Affects Versions: 0.10
> Reporter: Martin Junghanns
> Assignee: Martin Junghanns
> Priority: Minor
>
> Currently, the Gelly Graph supports the set operations
> {{Graph.union(otherGraph)}} and {{Graph.difference(otherGraph)}}. It would be
> nice to have a {{Graph.intersect(otherGraph)}} method, where the resulting
> graph contains all vertices and edges contained in both input graphs.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)