From: John S. <js...@gm...> - 2012-11-08 01:41:54
|
Thanks, I've fixed the links on the home page. For StoerWagnerMinimumCut, do you want to send a pull request with a fix? JVS On Thu, Nov 1, 2012 at 9:43 AM, Joris Kinable <de...@gm...> wrote: > Dear, > > It seems that the StoerWagnerMinimumCut is bugged in jgrapht 0.8.3. > Attached are two small code samples, both resulting in a runtime > error. > > Sample Test2. The graph contains just 2 vertices, joined with an edge. > StoerWagner fails to return a minimum cut for this trivial case. When > a third vertex+edge is added, StoerWagner works correctly. > Suggestion: either verify that this is a bug, or specify in the > documentation that the graph requires at least 3 vertices and 2 edges. > > Sample Test. StoerWagner's constructor takes a WeightedGraph<V,E> > graph. So per definition, I should be able to run it on a > DefaultDirectedWeightedGraph. This however results in a runtime error: > Exception in thread "main" java.lang.NullPointerException > at org.jgrapht.graph.AbstractBaseGraph.setEdgeWeight(Unknown Source) > at org.jgrapht.alg.StoerWagnerMinimumCut.<init>(Unknown Source) > at algorithms.mip.Test.<init>(Test.java:37) > at algorithms.mip.Test.main(Test.java:44) > > When I however switch the DefaultDirectedWeightedGraph to a > SimpleWeightedGraph, everything works fine again. Suggestion: either > verify that this is a bug, or change the constructor of the class such > that it only accepts a SimpleWeightedGraph. > > br, > > Joris > > Ps. The bug report link on the home page of jgrapht returns an error: > Permission Denied > Access to this page is restricted (either to project members or to > project administrators) and you do not meet the requirements to access > this page. Please contact the administrator of this project for > further assistance. > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_sfd2d_oct > _______________________________________________ > jgrapht-users mailing list > jgr...@li... > https://lists.sourceforge.net/lists/listinfo/jgrapht-users > |