JuliaDynamics / DynamicalSystems.jl

Award winning software library for nonlinear dynamics and nonlinear timeseries analysis
https://juliadynamics.github.io/DynamicalSystemsDocs.jl/dynamicalsystems/dev/
Other
852 stars 95 forks source link

StaticArrays not suitable for high dimensional systems #5

Closed RainerEngelken closed 7 years ago

RainerEngelken commented 7 years ago

StaticArrays.jl is great, but not useful for large arrays that are associated with high-dimensional systems, Maybe one could use StaticArrays only for low dimensional systems (say up to 10 variables) and use usual Base.Arrays for high dimensional systems? Also, I guess it might be worth mentioning that the computational cost involved in direct estimating entropies grows exponential in the degrees of freedom, so this is also rather limited to low dimensional systems.

Datseris commented 7 years ago

In general this package was intended to target only low-dimensional systems, since all the methods that at least I will write here will be really target towards there, and scale exponentially with the system dimension.

However, it could be a good thing to make different methods for higher dimensional systems that do use in-place operations and take advantage of mutable arrays. Fortunately this is not hard with the current set-up, because the system dimensionality is actually one of the parameters of the Parametric Types. For example, a discrete system is simply:

struct DiscreteDS{D, T<:Real, F, J} <: DiscreteDynamicalSystem
  state::SVector{D,T}
  eom::F
  jacob::J
end

which means that methods could be dispatched on D, or at least have a general method e.g. lyapunov which can dispatch do lyapunov_small when D<10 and to lyapunov_large otherwise.

I think this will not be hard to implement. I really hope some contributors will show up to do this, since it is easy and I would prefer to focus on writing new methods that require knowledge of dynamical systems besides coding.