spacepaste

  1.  
  2. let rec aux tree =
  3. let i, solutions = match tree with
  4. | Leaf i -> i,
  5. [IntSet.empty, 0., infinity, 0., 0.;
  6. IntSet.singleton i, infinity, 0., 0., 0.]
  7. |> List.map soln_of_tuple
  8. | Node (i, subtrees) ->
  9. let closest_leaf = IntMap.find i cleafm in
  10. i,
  11. List.map aux subtrees
  12. |> combine_solutions ~verbose n_leaves
  13. |> cull ~verbose ~closest_leaf
  14. in
  15. List.iter (csvrow i) solutions;
  16. if i = top_id then solutions else (* ... *)
  17. let marks = bubbles_of i
  18. and masses = IntMap.get i [] mass |> List.enum
  19. and node_closest_leaf = IntMap.find i cleafm in
  20.