gaioguys / GAIO.jl

A Julia package for set oriented computations.
MIT License
9 stars 4 forks source link

Add transfer operator #33

Closed cafaxo closed 3 years ago

cafaxo commented 3 years ago

Initial implementation of https://github.com/gaioguys/GAIO.jl/pull/32#issuecomment-663098767. This PR is in a very early stage. (I'll add a TODO list later here.)

The code

using StaticArrays

function logistic_map_test()
    g = boxmap(x -> SVector(4*x[1]*(1-x[1])), LinRange(-0.99, 0.99, 15))
    boxset = RegularPartition(Box((0.5,), (0.5,)), 20)[:]

    gstar = TransferOperator(g, boxset)
    boxfun = eigs(gstar)[2][1]

    plot(abs ∘ boxfun)
end

produces the following output: lmspiky2

gaioguy commented 3 years ago

Awesome. I am going to put in some detailed comments.

gaioguy commented 3 years ago

Is this one ready for merging?

cafaxo commented 3 years ago

This PR depends on #34, so we should merge that one first. (We can merge #34 once someone takes quick look at it and approves it.)

Other than that, the main thing that is missing here is some tests. I'd also be ok with quick comparison with the output of MATLAB's GAIO. Just to check that nothing major is wrong with this implementation :)

On another note: I'm sorry for being so inactive here (master's thesis has been keeping me busy). In about a month, I'll hopefully have the time to work on this project again.

gaioguy commented 3 years ago

I tested this against MATLAB's GAIO with the logistic map and the Lorenz system - it gives the same eigenvalues and vectors up to 1e-12 accuracy. I guess this can be merged.

No problem - thanks for still having an eye on this.