mirror of
https://github.com/c-cube/nanoev.git
synced 2025-12-06 03:05:32 -05:00
format
This commit is contained in:
parent
6e2d11384b
commit
90311ad4fa
2 changed files with 8 additions and 8 deletions
|
|
@ -22,10 +22,10 @@ open struct
|
||||||
| E -> 0
|
| E -> 0
|
||||||
| N (r, _, _, _) -> r
|
| N (r, _, _, _) -> r
|
||||||
|
|
||||||
(** Make a balanced node labelled with [x], and subtrees [a] and [b].
|
(** Make a balanced node labelled with [x], and subtrees [a] and [b]. We
|
||||||
We ensure that the right child's rank is ≤ to the rank of the
|
ensure that the right child's rank is ≤ to the rank of the left child
|
||||||
left child (leftist property). The rank of the resulting node
|
(leftist property). The rank of the resulting node is the length of the
|
||||||
is the length of the rightmost path. *)
|
rightmost path. *)
|
||||||
let[@inline] mk_node_ x a b =
|
let[@inline] mk_node_ x a b =
|
||||||
if rank_ a >= rank_ b then
|
if rank_ a >= rank_ b then
|
||||||
N (rank_ b + 1, x, a, b)
|
N (rank_ b + 1, x, a, b)
|
||||||
|
|
|
||||||
|
|
@ -22,10 +22,10 @@ open struct
|
||||||
| E -> 0
|
| E -> 0
|
||||||
| N (r, _, _, _) -> r
|
| N (r, _, _, _) -> r
|
||||||
|
|
||||||
(** Make a balanced node labelled with [x], and subtrees [a] and [b].
|
(** Make a balanced node labelled with [x], and subtrees [a] and [b]. We
|
||||||
We ensure that the right child's rank is ≤ to the rank of the
|
ensure that the right child's rank is ≤ to the rank of the left child
|
||||||
left child (leftist property). The rank of the resulting node
|
(leftist property). The rank of the resulting node is the length of the
|
||||||
is the length of the rightmost path. *)
|
rightmost path. *)
|
||||||
let[@inline] mk_node_ x a b =
|
let[@inline] mk_node_ x a b =
|
||||||
if rank_ a >= rank_ b then
|
if rank_ a >= rank_ b then
|
||||||
N (rank_ b + 1, x, a, b)
|
N (rank_ b + 1, x, a, b)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue