commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simone Tripodi <simonetrip...@apache.org>
Subject Re: [Graph] Kruskal's algorithm doesn't accept sparse graph
Date Tue, 31 Jan 2012 09:56:39 GMT
Hi Marco,

great. I'm going to review the patch right now, let's keep updated!

-Simo

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/



On Mon, Jan 30, 2012 at 11:38 PM, Marco Speranza
<marco.speranza79@gmail.com> wrote:
> Hi guys,
>
> I found a little problem into Kruskal's algorithm when the input graph is
> not connected and/or  it's a graph without the edges.
> I created  atest case that produces this error:
>
> Running org.apache.commons.graph.spanning.KruskalTestCase
> Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.096 sec
> <<< FAILURE!
> verifyNotConnectedMinimumSpanningTree(org.apache.commons.graph.spanning.KruskalTestCase)
>  Time elapsed: 0.007 sec  <<< ERROR!
> java.util.NoSuchElementException
>        at java.util.AbstractQueue.remove(AbstractQueue.java:90)
>        at
> org.apache.commons.graph.spanning.DefaultSpanningTreeAlgorithmSelector.applyingKruskalAlgorithm(DefaultSpanningTreeAlgorithmSelector.java:87)
>
> I created a issue into Jira (SANDBOX-374)  and I attached a patch that
> resolves the problem.
>
> heve a nice day :)
>
> --
> Marco Speranza <marco.speranza79@gmail.com>
>
> Flickr: http://www.flickr.com/photos/marcosperanza79/
> Google Code: http://code.google.com/u/marco.speranza79/
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message