Commit 611029a9 authored by Philippe Veber's avatar Philippe Veber
Browse files

tk/Tdg09.Pack: added convergence_tree

parent b9d475c5
......@@ -446,6 +446,16 @@ module Pack = struct
let leaf_info i cond = (i, cond) in
let node_info = () in
Convergence_tree.pair_tree ~leaf_info ~node_info
let convergence_tree t =
let leaves =
Convergence_tree.leaves t
|> List.mapi ~f:(fun i (label, cond) -> label, (i, cond))
in
Tree.map t ~node:Fn.id ~branch:Fn.id ~leaf:(
List.Assoc.find_exn ~equal:String.equal leaves
)
end
module Implementation_check = struct
......
......@@ -142,6 +142,10 @@ module Pack : sig
branch_length2:float ->
npairs:int ->
(unit, leaf_info, Convergence_tree.branch_info) Tree.t
val convergence_tree :
Convergence_tree.t ->
(unit, leaf_info, Convergence_tree.branch_info) Tree.t
end
module Implementation_check : sig
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment