The user's code would need to test it. My point is that a coinciding path may not be an error. As a designer you have a choice (1) throw an error and make those whose networks include coinciding paths handle the error or (2) don't throw an error and make those who do wish to exclude coinciding paths test for the situation in their code. For me (2) is preferable. It also has the advantage of being more general mathematically. There are lots of graphs that have legitimate coinciding paths. But you have a better feel for your users' preferences than I do. It is clearly your call. I just wanted to bring the issue to your attention.
Very best. On Sat Jan 03 2015 at 8:51:55 AM Matteo Fortini <[email protected]> wrote: > Hi Herb, I think I may not have been clear in my example. You were > suggesting to return an empty path instead of an error when there is no > path between source and destination node. I was asking if this was not > leading to ambiguity when source and destination node coincide, because as > per your proposal searching the shortest path between two unconnected nodes > would result in an empty return path, and the same would have been when > searching for the shortest path between a node and itself, so I was > wondering how to distinguish the two cases. > > Best regards > > Il giorno sab 3 gen 2015 14:43 Herb Roseman <[email protected]> ha > scritto: > > Source and destinations coinciding is not necessarily an error. There are >> lots of graphs that have this feature (See Trudeau) In the real world they >> can be used to represent self-referential events. Lots of stuff that goes >> on in the world is self-referential. >> >> But I get your point. It may be best for your user set (mostly in the >> social sciences?) to have this be an error. I am using your program in >> more of a logical/mathematical setting where source/destination coinciding >> is not only possible but likely. >> >> Very best. >> >> >> >> On Fri Jan 02 2015 at 5:23:44 PM Matteo Fortini <[email protected]> >> wrote: >> >>> I guess this would be ambiguous when source and destination coincide, in >>> which case the correct answer could be an empty path and not an impossible >>> path >>> >>> Il giorno ven 2 gen 2015 20:08 Herb Roseman <[email protected]> ha >>> scritto: >>> >>>> For the get_shortest_paths function it would be convenient if the >>>> function returned an empty list if the path was not possible. This would >>>> provide a simpler way of handling this situation than the runtime warning >>>> message. Suppressing this message seems complex to the new user of python. >>>> >>>> Very best for the new year. >>>> >>>> Herb >>>> >>> _______________________________________________ >>>> igraph-help mailing list >>>> [email protected] >>>> https://lists.nongnu.org/mailman/listinfo/igraph-help >>>> >>> _______________________________________________ >>> igraph-help mailing list >>> [email protected] >>> https://lists.nongnu.org/mailman/listinfo/igraph-help >>> >> _______________________________________________ >> igraph-help mailing list >> [email protected] >> https://lists.nongnu.org/mailman/listinfo/igraph-help >> > _______________________________________________ > igraph-help mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/igraph-help >
_______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
