[guest - Wed Nov 5 12:58:07 2003]:
Show quoted text> The function &kruskal() retruns a forest of trees instead of returning
> an error when a minimal spanning tree is not found.
>
> If the algorithm did not terminate gracefully (i.e |V|-1 edges are not
> contained in the result V=number of vertices) then an error should be
> reported saying spanning tree is not defined.
IMHO this (error) condition can easily be detected the way you described
- by checking whether the number of edges in the result is == |V|-1.
So I think this is not a big problem in practice.
Moreover, the module was intended more to be a proof of concept than a
module for "real work".
And unfortunately I won't have the time to deal with this issue anytime
soon.
But you are of course free to submit a new, fixed version to CPAN
yourself. You can also take over the maintenance of this module if you
so like.
Hope this helps (somewhat)! :-)
Best regards,
Steffen Beyer