flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Junghanns (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (FLINK-2905) Add intersect method to Graph class
Date Tue, 27 Oct 2015 15:06:27 GMT

    [ https://issues.apache.org/jira/browse/FLINK-2905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14976525#comment-14976525
] 

Martin Junghanns edited comment on FLINK-2905 at 10/27/15 3:05 PM:
-------------------------------------------------------------------

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.


was (Author: mju):
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)

Mime
View raw message