CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2010
    Posts
    1

    Question Implementing Makefile-Style Algorithm in Python

    How can I implement a makefile-style algorithm in python?

    Can anyone help me with this? Any help would be appreciated.


    Thanks,
    Sandy

  2. #2
    Join Date
    Sep 2010
    Location
    Bangalore
    Posts
    2

    Lightbulb Re: Implementing Makefile-Style Algorithm in Python

    Quote Originally Posted by sandygrdn View Post
    How can I implement a makefile-style 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 makefile-style 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 google-fu appears to be not-very-helpful 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.

  3. #3
    Join Date
    Sep 2010
    Location
    Bangalore
    Posts
    2

    Smile Re: Implementing Makefile-Style Algorithm in Python

    Quote Originally Posted by sandygrdn View Post
    How can I implement a makefile-style 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 makefile-style 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 google-fu appears to be not-very-helpful 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
  •  





Click Here to Expand Forum to Full Width

Featured