- From: Yoann Pigné <yoann.pigne AT gmail.com>
- To: "graphstream-users AT litislab.fr" <graphstream-users AT litislab.fr>, yasirarfat081 AT gmail.com
- Subject: Re:
- Date: Mon, 31 Oct 2016 11:02:07 +0100
You can use Node#hasEdgeBetween before adding need edges. This will tell you
if an edge already exists between 2 nodes.
https://data.graphstream-project.org/api/gs-core/1.3/org/graphstream/graph/Node.html#hasEdgeBetween(java.lang.String)
>
Le 29 oct. 2016 à 18:41,
>
<yasirarfat081 AT gmail.com>
>
>
<yasirarfat081 AT gmail.com>
>
a écrit :
>
>
I have a text file as follows:
>
1 3
>
2 5
>
3 6
>
4 5
>
5 4
>
6 1
>
7 2
>
The above file represents the edges in an undirected graph. I want to remove
>
the duplicate edges in the graph. In the above given example I want to
>
remove
>
either 4,5 or 5,4 as they represent the same edge in graph and hence causes
>
duplication. I am trying to visualize the graph from the file using
>
Graphstream
>
using the GraphX library in Apache Spark. But due to the presence of
>
duplicate
>
nodes as explained above it gives an error as follows:
>
org.graphstream.graph.EdgeRejectedException: Edge 4[5--4] was rejected by
>
node
>
5
>
What would be the best way to remove such duplicates from the text file?
- [no subject], yasirarfat081, 29/10/2016
- Re:, Yoann Pigné, 31/10/2016
Archives gérées par MHonArc 2.6.16.