Hello graphstream users, I have a question for the community. Here is my issue: I need to create a directed graph object from a dot file. This works, but when there are two edges from one node to the same node, only one edge is created in the graph. I am not sure if I am using the graphstream library correctly, or if the dot file is incorrect. Graphstream version: 2.0 gs-core-2.0.jar Here is an example of dot file: ************* digraph G { 1->2; 1->2; } *********** From what I read of dot specification, this is valid (and some visualization tools like graphviz will draw two nodes with to edges from 1 to 2) To create the graph, I use the following java code: import org.graphstream.graph.Edge; /* …. */ MultiGraph g = new MultiGraph("g",false, true); // graph id, strictChecking, autoCreate //check how many connections: System.out.println("number of edges: "+g.edges().count()); // print out: number of edges: 1 **************************** There is nothing special in the code, it is almost what is shown in the tutorial (https://graphstream-project.org/doc/Tutorials/Reading-files-using-FileSource/) Can someone tell me what I should modify? Is it the graph creation? Using another type of graph or other parameters?
Should I modify the dot file? Have a nice day,
Sylvain LAVELLE |
Archives gérées par MHonArc 2.6.16.