Menu

#110 graph - simply increased functionality in walk

open
7
2005-09-30
2003-04-21
No

per http://mini.net/tcl/8787 there is some value in
being able to override walk's behavior, and allow
multiple visits of a node - particularly in the case
that the graph is a DAG (where no cycles can exist)

Moving the line graph.tcl 1884:

set visited($node) .

to before graph.tcl 1879 (in which the command is
invoked) would permit the command to unset
visited($node), and effectively override the visit-once
semantics of walk for those cases.

It's not exactly clean, but shouldn't change too much
behavior, and I can't think of a better way to permit
the desired behavior.

Discussion

  • Colin McCormack

    Colin McCormack - 2003-04-21

    Logged In: YES
    user_id=19214

    Oh, my error - analogous changes would need to be made for
    each setting of visited($node) in that function.

     
  • Andreas Kupries

    Andreas Kupries - 2003-04-23
    • summary: simply increased functionality in walk --> graph - simply increased functionality in walk
     
  • Andreas Kupries

    Andreas Kupries - 2003-08-06
    • priority: 5 --> 8
     
  • Andreas Kupries

    Andreas Kupries - 2004-02-05

    Logged In: YES
    user_id=75003

    Can you give me an example for a multiple-visit walk ?

     
  • Svenn Are Bjerkem

    Logged In: YES
    user_id=918049

    There is a complete example on http://mini.net/tcl/8787 with
    data and a picture of the wanted result.

     
  • Andreas Kupries

    Andreas Kupries - 2005-09-30
    • priority: 8 --> 7