This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Ordering of Blocks based on Input/Output
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: Re: [xsl] Ordering of Blocks based on Input/Output
- From: "Dave Gomboc" <dave at cs dot ualberta dot ca>
- Date: Wed, 9 May 2001 22:03:42 -0600
- Cc: <dandiebolt at yahoo dot com>
- References: <200105081804.OAA07796@biglist.com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
> From: Dan Diebolt <dandiebolt@yahoo.com>
[snip]
> Starting from B1, there are only two ways to order the
> blocks so that each Block's inputs are provided by a
> proceeding Block's output:
>
> B1 , B2 , B3 , B4 , B5
> B1 , B3 , B2 , B4 , B5
>
> My problem is to produce *one* such feasible ordering of
> the blocks.
[snip]
I'm not sure if you're aware that you're asking for what's known as a
"topological sort" (a web search on this will find you a lot of stuff on
it). I'll leave the XSLT implementation to others :-) but you should
know that an efficient solution has linear complexity: O(m+n) where m is
the number of edges and n is the number of nodes in the graph. In
English :-), if the problem size doubles, the time to find a topological
sort should only double as well.
Dave
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list