JuliaLang/ODE.jl — pull request #14 by acroy (2014-02-26 23:27:13+00:00)
Title: RFC: Duck typing and consistent return types for all solvers.

As discussed in #7 we want to allow more general types for `y0`. This PR removes the type declarations for the function arguments `F`, `y0` and `tspan`. All solvers return two arrays of values `Vector{eltype(tspan)}` and `Vector{typeof(y0)}`. **This will most certainly break existing codes.**

There is one issue I would like to mention: the present version of `oderosenbrock` will IMO only work with `y0::AbstractVector` or `y0::Number` (mainly due to `jacobi`).

Here is a simple example for the new possibilities:
```
using ODE
H = [[0. 1.]; [1. 0.]];
rho0 = zeros(2,2);
rho0[1,1]=1.;
t,y = ode23((t,y)->(-im*H*y + im*y*H), [0., 2pi], complex(rho0));

using Winston
plot(t, Float64[real(R[1,1]) for R in y], t, cos(t).^2, "bo")
oplot(t, Float64[real(R[2,2]) for R in y], "--", t, sin(t).^2, "rs")
```
This should work with all solvers except `oderosenbrock`.