
December 1st, 2010, 12:58 AM
#1
Implementing MakefileStyle Algorithm in Python
How can I implement a makefilestyle algorithm in python?
Can anyone help me with this? Any help would be appreciated.
Thanks,
Sandy

December 1st, 2010, 01:05 AM
#2
Re: Implementing MakefileStyle Algorithm in Python
Originally Posted by sandygrdn
How can I implement a makefilestyle algorithm in python?
Can anyone help me with this? Any help would be appreciated.
Thanks,
Sandy
I am implementing an acoustic feature extraction system in python, and I need to implement a makefilestyle algorithm to ensure that all blocks in the feature extraction system are run in the correct order, and without repeating any feature extractions stages.
The input to this feature extraction system will be a graph detailing the links between the feature extraction blocks, and I'd like to work out which functions to run when based upon the graph.
An example of such a system might be the following:
,> [b] > [D] +
input > [A] ^ v
`> [C] +> [E] > output
and the function calls (assuming each block X is a function of the form output = X(inputs) might be something like:
a = A(input)
b = B(a)
c = C(a)
d = D(b,c) # can't call D until both b and c are ready
output = E(d,c) # can't call E until both c and d are ready
I already have the function graph loaded in the form of a dictionary with each dictionary entry of the form (inputs, function) like so:
blocks = {'A' : (('input'), A),
'B' : (('A'), B),
'C' : (('A'), C),
'D' : (('B','C'), D),
'output' : (('D','C'), E)}
I'm just currently drawing a blank on what the makefile algorithm does exactly, and how to go about implementing it. My googlefu appears to be notveryhelpful here too. If someone at least can give me a pointer to a good discussion of the makefile algorithm that would probably be a good start.
Edit by admin: advertisement removed.

December 1st, 2010, 01:07 AM
#3
Re: Implementing MakefileStyle Algorithm in Python
Originally Posted by sandygrdn
How can I implement a makefilestyle algorithm in python?
Can anyone help me with this? Any help would be appreciated.
Thanks,
Sandy
I am implementing an acoustic feature extraction system in python, and I need to implement a makefilestyle algorithm to ensure that all blocks in the feature extraction system are run in the correct order, and without repeating any feature extractions stages.
The input to this feature extraction system will be a graph detailing the links between the feature extraction blocks, and I'd like to work out which functions to run when based upon the graph.
An example of such a system might be the following:
,> [b] > [D] +
input > [A] ^ v
`> [C] +> [E] > output
and the function calls (assuming each block X is a function of the form output = X(inputs) might be something like:
a = A(input)
b = B(a)
c = C(a)
d = D(b,c) # can't call D until both b and c are ready
output = E(d,c) # can't call E until both c and d are ready
I already have the function graph loaded in the form of a dictionary with each dictionary entry of the form (inputs, function) like so:
blocks = {'A' : (('input'), A),
'B' : (('A'), B),
'C' : (('A'), C),
'D' : (('B','C'), D),
'output' : (('D','C'), E)}
I'm just currently drawing a blank on what the makefile algorithm does exactly, and how to go about implementing it. My googlefu appears to be notveryhelpful here too. If someone at least can give me a pointer to a good discussion of the makefile algorithm that would probably be a good start.
Tags for this Thread
Posting Permissions
 You may not post new threads
 You may not post replies
 You may not post attachments
 You may not edit your posts

Forum Rules

Click Here to Expand Forum to Full Width
This a Codeguru.com survey!
