gaioguys / GAIO.jl

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

Beautify chain_recurrent_set #14

Closed gaioguy closed 2 years ago

gaioguy commented 4 years ago

Ideally, the function for the chain recurrent set should look like

function chain_recurrent_set(B::BoxSet, g::BoxMap, depth::Int)
    for k in 1:depth
        B = subdivide(B)
        G = transition_graph(B, g)  # whith G = (B,E), E \subset B x B
        B = strongly_connected_components(G)  # returns a subset of vertices(G)
    end
    return B
end

We might also directly construct the edge-weighted graph with the transition probabilities on the egdes, i.e.

G = transition_graph(B,g)  # with G=(B,E), E = { (src, hit, weight) }

which we then can transform into a matrix if required:

(T, no) = Matrix(G)

where T is an Array{Float64,2} and no is a map from 1:length(B) into B, i.e. provides a way to refer back to the boxes (for, e.g., plotting). This approach would postpone the explicit enumeration of the boxes in B until it is really required.

gaioguy commented 4 years ago

Awesome! I would only change to using a sparse matrix for the transition matrix.

FrederikSchnack commented 4 years ago

Do we want to make this the default or make it a option for the user?

gaioguy commented 4 years ago

👍 for default.

gaioguy commented 2 years ago

Closed by #20 .