From: Michał A. <ant...@gm...> - 2009-07-13 19:49:37
|
Oh, I think I missed somehow note to use attributes for arcs/nodes. I was writing test cases and now it appeared even more useful...e.g., when testing, if input is proper...So, I will change that and then update, so there will disappear that dictionary from input which contains throughputs (in Busacker Gowen). But I've got a question...I need to use dijkstra ( or later other path finding procedure ), but it finds the path using weights on edges ... And I need it to search for costs....It forces me to place costs on edge weights in graph G and throughputs as edge attributes... Or maybe I missed something and it's possible somehow to run dijkstra with set of attributes as weights? Another option could be just setting those weights (from attribute values) just before running Dijkstra....is that a good way? Then I could use only attributes in implementation, both for costs and throughputs ( arc weights would be set only for Dijkstra ). Please, tell me which version you consider better? So, I will correct it to get a final version. About Dijkstra....I created test cases where Dijkstra easily fails....so, BFS will be needed surely :) Regarding other mail....if we would want to use Dijkstra anyway, it would need creating separate version of it, or if we don't want any optimizations, just making sure it won't get any negative weights should do the trick ...but still BFS looks better.... Best Regards, Michał Antoniewski |