1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
open Types
let step
(type a b c d)
(module Solver : SolverT
with type output = a
and type s = b
and type step_output = c
and type t = d)
(f : b -> float -> d)
~(dt : float)
(y0 : b)
(t0 : float)
=
Solver.step f ~dt y0 t0
let odeint
(type a b c d)
(module Solver : SolverT
with type output = a
and type s = b
and type step_output = c
and type t = d)
(f : b -> float -> d)
(y0 : b)
(tspec : tspec_t)
=
Solver.solve f y0 tspec