|Subject:||Re: TISEAN: decision about porting a function|
|Date:||Tue, 16 Jun 2015 13:03:58 -0600|
Basically this is emulating an event. Instead of terminating theOn Mon, Jun 15, 2015 at 8:17 PM, Piotr Held <address@hidden> wrote:
> Hi Juan,
> I encountered a problem (more like a decision) about some of the functions.
> The problem is that the output is dependent on time (that is execution
> time). The reason why the TISEAN programs were implemented this way was to
> get some results without waiting for the program to finish (which I assume
> could have taken a very long time). What happens is that when a certain
> amount of time passes the program outputs wherever it's at and then
> continues on computing. This applies to 'lyap_spec', 'd2' and maybe others.
> For further reading see:
> * 'Description of output' section of:
> * lines 429-442 of:
> * my discussion on github with 'heggus':
> The solution I thought of was to add an option to the program (similar to
> 'q' in 'more') that would terminate the program and return the latest output
> it had calculated.
> What do you propose to solve this issue?
program you can ask for a handle to a function that will plot/print
the data provided every time in a while (could be another parameter,
something like "ShowEvery" and an integer indicating the number of
iterations to wait before showing a result). This is how it is done in
the odepkg package, so you can continue with the calculation but
from time to time update a plot with the current values. How do you
You could implement this part in an m-file and have a call to the C++
code only to do the calculation.
Some thing like
(assume ShowEvery was given)
while (calculation is not finished)
L = __calculate_lyap__ (..., ShowEvery);
The last argument of calculate_lyap is just indicating how many
iterations should be calculated. This means that at each call all the
necessary data has to be provided. It would be easier if one could
have a reference to the variables being updated, but I do not know if
this is possible (that is updating a plot/print from within the C++
code). I will check and report back.
|[Prev in Thread]||Current Thread||[Next in Thread]|