graphstream / gs-core

Graphstream core
http://graphstream-project.org/
Other
402 stars 109 forks source link

Graphstream is case sensitive #154

Closed rafatp closed 9 years ago

rafatp commented 9 years ago

Hello everyone! I'm trying to implement a gene regulatory network on GraphStream, but in some cases when I have the same gene and protein name (like CRP->crp) it returns an exception. One reason for this, in my opinion, might be the same name to different nodes. Some suggestion?? Thanks! Exception report: org.graphstream.graph.EdgeRejectedException: Edge 1[CRP--crp] was rejected by node CRP

gsavin commented 9 years ago

Can not reproduce this bug with :

Graph g = new SingleGraph("g");
g.addNode("CRP");
g.addNode("crp");
g.addEdge("1", "CRP", "crp");

With any of the graph implementations.

pigne commented 9 years ago

"CRP" and "crp" are two different strings (with a different hash) so it's OK to have two nodes with these names. The error says you already have an edge between node '"CRP" and node "crp". Maybe you tried to add it twice?

If you want multiple edges between two nodes then consider using the MultiGraph implementation instead of SingleGraph.

rafatp commented 9 years ago

Thanks for your quickly answer! You are right,Yoann! I must use a MultiGraph approach! Thanks