Some fixes

This commit is contained in:
Alexandre 2024-06-09 23:06:09 +02:00
parent 33ae91758b
commit ab7435f7d7
4 changed files with 2 additions and 0 deletions

BIN
a.out

Binary file not shown.

BIN
trees.cmi

Binary file not shown.

BIN
trees.cmo

Binary file not shown.

View File

@ -556,6 +556,8 @@ let update_col tr path v = match path with
| Node (x, p, l, r) -> begin
match pth with
| [] -> if isf then Node (x, {x = p.x; y = p.y}, aux l [] false, aux r [] false) else Node (x, {x = p.x + v; y = p.y}, aux l [] false, aux r [] false)
| Left::[] -> if isf then Node (x, {x = p.x; y = p.y}, aux l [] false, aux r [] false) else Node (x, {x = p.x + v; y = p.y}, aux l [] false, aux r [] false)
| Right::[] -> if isf then Node (x, {x = p.x; y = p.y}, aux l [] false, aux r [] false) else Node (x, {x = p.x + v; y = p.y}, aux l [] false, aux r [] false)
| Left::t -> if isf then Node (x, {x = p.x + v/2; y = p.y}, aux l t false, r) else Node (x, {x = p.x + v; y = p.y}, aux l t false, r)
| Right::t -> if isf then Node (x, {x = p.x + v/2; y = p.y}, l, aux r t false) else Node (x, {x = p.x + v; y = p.y}, l, aux r t false)
| _ -> failwith "Not possible"