feat: a lot of stuff

This commit is contained in:
Henri Saudubray 2025-05-12 14:50:10 +02:00
parent dd6152833f
commit 6cec3d6c5d
Signed by: hms
GPG key ID: 7065F57ED8856128
22 changed files with 476 additions and 276 deletions

View file

@ -57,6 +57,7 @@ let sqrt () =
let yd = cmake 2 in
let zout = cmake 1 in
let zsize = 1 in
let csize = 2 in
let s_init =
{ s_encore = false;
s_auto = Good;
@ -64,15 +65,15 @@ let sqrt () =
s_zin = zmake 1 } in
let reset _ _ = s_init in
let jump _ = true in
HNode { state = s_init;
HNode { init = (fun _ -> s_init);
fder = (fun s _ y -> fder s y yd; yd);
fzer = (fun s _ y -> fzero s y zout; zout);
fout = (fun s _ y -> fout s y);
step = (fun s a -> fstep s a);
horizon = (fun s -> if s.s_encore then 0.0 else max_float);
cset; cget; zset; zsize; reset; jump }
cset; cget; zset; zsize; csize; reset; jump }
let errmsg = "Too many arguments to model (needed: 0)"
let sqrt = function
let init = function
| [] -> sqrt ()
| _ -> raise (Invalid_argument errmsg)