Note that there are some explanatory texts on larger screens.

plurals
  1. POPlotting time against size of input for Longest Common Subsequence Problem
    primarykey
    data
    text
    <p>I wish to plot the time against size of input, for Longest common subsequence problem in recursive as well as dynamic programming approaches. Until now I've developed programs for evaluating lcs functions in both ways, a simple random string generator(with help from <a href="https://stackoverflow.com/questions/4237084/reading-from-a-file-and-storing-in-array">here</a>) and a <a href="https://stackoverflow.com/questions/4191658/analyzing-time-complexity-of-a-function-written-in-c/4192015#4192015">program</a> to plot the graph. Now I need to connect all these in the following way.</p> <p>Now I have to connect all these. That is, the two programs for calculating lcs should run about 10 times with output from simple random string generator given as command line arguments to these programs.</p> <p>The time taken for execution of these programs are calculated and this along with the length of strings used is stored in a file like</p> <pre><code>l=15, r=0.003, c=0.001 </code></pre> <p>This is parsed by the python program to populate the following lists</p> <pre><code>sequence_lengths = [] recursive_times = [] dynamic_times = [] </code></pre> <p>and then the graph is plotted. I've the following questions regarding above.</p> <p>1) How do I pass the output of one C program to another C program as command line arguments? </p> <p>2) Is there any function to evaluate the time taken to execute the function in microseconds? Presently the only option I have is time function in unix. Being a command-line utility makes it tougher to handle.</p> <p>Any help would be much appreciated.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload