I tried the Graph module. I had a deep look at the SPT_Dijkstra algorithm and tried it with some sample data.

I think that I now understand the algorithm. It takes a start vertex and the result are the paths from the start vertex to all other vertices.

But this is not what I need. I need only one path from the start to the end which takes all vertices between into account.

I see no way how to solve my problem with the graph module. Or do I see something wrong? I'll now try another way. Nevertheless thank you. It was interesting to play with this Graph module.

Update:

The Graph module does not seem to be the problem, but my lack of knowledge about graph algorithms. I'm reading now about these algorithms. When I understood them, then I'll start my implementation.


In reply to Re^3: Travelling problem by Dirk80
in thread Travelling problem by Dirk80

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.