[PD-dev] loadbang order

Miller Puckette mpuckett at man104-1.ucsd.edu
Thu Aug 11 02:18:33 CEST 2005


Indeed, "C D B F G E A" (or one of the other 7) is the order loadbangs go off
in... so something in my explanation was confusing, but you and I do agree
on the meaning of "depth first"...

cheers
Miller

On Wed, Aug 10, 2005 at 06:13:13PM -0400, Mathieu Bouchard wrote:
> On Tue, 9 Aug 2005, Miller Puckette wrote:
> 
> > Loadbangs are "depth first", i.e., loadbangs in abstractions (and subpatches
> > in general) go off before loadbangs in the parent.
> >  This is so that abstactions can initialize themselves before receiving
> > messages coming from other loadbangs.
> 
> That's not the usual definition of depth-first. You mean post-order.
> 
> Suppose you have a tree like this:
> 
> A
> |-B
> | |-C
> | `-D
> `-E
>   |-F
>   `-G
> 
> Then here are a few example enumerations:
> 
> a   depth-first post-order may be: C D B F G E A
> a   depth-first  pre-order may be: A B C D E F G
> a breadth-first post-order may be: C D F G B E A
> a breadth-first  pre-order may be: A B E C D F G
> 
> ... but there are several of each of those because the order of the
> children of a node is not specified. (In this case there are eight
> possible depth-first post-orders, for example)
> 
> Depth-first is enumeration that uses a stack (or recursion or special 
> voodoo tricks).
> 
> Breadth-first is enumeration that uses a queue (or anything equivalent).
> 
> ____________________________________________________________________
> Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
> Freelance Digital Arts Engineer, Montréal QC Canada




More information about the Pd-dev mailing list