graphstream/gs-core — Issue #52: APSP Bug
Author: jwalteros
Created: 2012-02-03 02:52:47+00:00
State: open

Hi,

I love your library. It is amazingly useful!

I found a bug, though.

I was trying to solve an APSP in a multigraph with parallel arcs with different costs (e.g., cost(0,1)=10 and cost(1,0)=10). What is happening is that your algorithm is giving the same cost to both arcs. Attached you can see an example.

Please let me know if you have any ideas about this. Thanks

Cheers.

-Jose

import org.graphstream.algorithm.APSP;
import org.graphstream.algorithm.APSP.APSPInfo;
import org.graphstream.graph.Graph;
import org.graphstream.graph.implementations.MultiGraph;

public class TestAPSPAlgoBug {

/**
* @param args
*/
public static void main(String[] args) {

int n=2;
Graph graph= new MultiGraph("Graph");

for(int i=0;i