Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Eliminating Recursive Tree Walking by using MJD-style Infinite Streams?

by jryan (Vicar)
on Jun 16, 2008 at 20:45 UTC ( [id://692364]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub follow_paths {
        my ($x_s,$y_s,$s_s,$paths,$regs) = @_;
    ...
        }
        return \@current;
    }
    
  2. or download this
    regs = 
    1,0,0
    ...
    3,0,0 =>
         0,1,0
         1,0,0
    
  3. or download this
      [[3,0,0]
       [0,1,0]
    ...
      [[3,0,0]
       [1,0,0,'reg']
      ]
    
  4. or download this
    sub follow_paths_unrolled {
        my ($x_s,$y_s,$s_s,$paths,$regs) = @_;
    ...
            ($cur_x,$cur_y,$cur_s,$index,$current,$BRANCH) = @{pop @STACK}
    +;
        }    
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://692364]
Approved by moritz
Front-paged by sgifford
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-20 16:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found