##### Site index · List index
Message view
Top
From "Martin Junghanns (JIRA)" <j...@apache.org>
Date Tue, 27 Oct 2015 14:19:27 GMT
```
]

-----------------------------------------

Hi, I agree with you that Option 3 is the most intuitive one. But as it is just a deduction
from Option 2, I thought about two basic cases for intersection. Let's focus on the edges:

E(G1):
{code}
1, 3, 13
{code}
E(G2):
{code}
1, 3, 13
1, 3, 14
{code}
Call 1
{{G' = G1.intersect(G2, considerEdgeValues = true)}}
E(G')
{code}
1, 3, 13 // G1
1, 3, 13 // G2
{code}
Call 2
{{G' = G1.intersect(G2, considerEdgeValues = false)}}
E(G')
{code}
1, 3, 13 // G1
1, 3, 13 // G2
1, 3, 14 // G2
{code}

If users are interested in Option 3, they can call {{E(G').distinct()}}. So imho, those two
calls are the most basic ones and leave more specific analytics to the user (e.g. distinct,
edge aggregation, ...). Wdyt?

> Add intersect method to Graph class
> -----------------------------------
>
>          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