in reply to Calculating Shortest Paths with Graph::Directed

Try removing
if ( $i == $j ) { $APSP->add_weighted_edge( $iv, 0, $iv ); $APSP->set_attribute("path", $iv, $iv, [ $iv ]); next; }
from the APSP_Floyd_Warshall sub in Base.pm in the Graph package. Completly untested and without any kind of guarantee!

T I M T O W T D I

Replies are listed 'Best First'.
Re: Re: Calculating Shortest Paths with Graph::Directed
by arunhorne (Pilgrim) on Jul 19, 2002 at 16:05 UTC

    That nearly does it... its adds the 2 missing 1's, i.e. the self-referencing nodes... couldn't handle the 3 (E1-E1) part... will look into that. Thanks

    ____________
    Arun
Re: Re: Calculating Shortest Paths with Graph::Directed
by arunhorne (Pilgrim) on Jul 19, 2002 at 16:51 UTC

    I have managed to make all the necessary mods... more info here 183305

    ____________
    Arun