Tcl Library Source Code

View Ticket
Login
Ticket UUID: 724822
Title: graph - simply increased functionality in walk
Type: RFE Version: None
Submitter: coldstore Created on: 2003-04-21 01:40:16
Subsystem: struct :: graph Assigned To: andreas_kupries
Priority: 7 High Severity:
Status: Open Last Modified: 2005-10-01 02:31:09
Resolution: Closed By:
    Closed on:
Description:
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.
User Comments: svenn added on 2005-03-05 23:56:28:
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 added on 2004-02-05 16:39:06:
Logged In: YES 
user_id=75003

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

coldstore added on 2003-04-21 08:51:24:
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.