Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convergence timeseries for lyapunov functions #15

Closed
Datseris opened this issue Jan 24, 2018 · 1 comment
Closed

Convergence timeseries for lyapunov functions #15

Datseris opened this issue Jan 24, 2018 · 1 comment

Comments

@Datseris
Copy link
Member

After Julia 0.7 with IPO we will be able to return convergence timeseries instead of final values without having to re-write code, while still ensuring type stability only by function arguments.

At the moment it is trivial to get the lyapunov convergence timeseries, by duplicating the main function lyapunovs and change this: λ += log.(abs.(diag(R)))
to this: push!(λ, λ[end] + log.(abs.(diag(R)))
and add 2 more lines:
λ = T[]; tvec = T[];
and inside the loop put push!(tvec, t).

It is literally 3 lines of code but it is very not elegant. With the new version it may be possible to do this changes without duplicating code and while still keeping things transparent and concise.

@Datseris
Copy link
Member Author

I am also wondering on what is the take on always returning convergence timeseries, instead of final value.

What is the consencous on that? I have not done it like this because it is a tiiiiiiiiny bit faster to not create vectors, in case the user doesn't want them. But apparently most users actually want the lyapunov convergence timeseries instead of just a final value.

So maybe it is not worth it to support both options, and just go on and always return convergence timeseries instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant