tree_layout
tree_layout copied to clipboard
Algorithms to layout trees in a pretty manner.
trafficstars
Tree_layout

Algorithms to layout trees in a pretty manner.
This library contains layout algorithms for tree. Currently, two algorithms are implemented: layered trees and treemaps. See the documentation for details.
An easy-to-use rose tree API is provided by default:
(* Given a tree, ... *)
let tree : 'a Tree_layout.tree = ...
(* and a distance function. *)
let distance v1 v2 = ...
(* Get annotated tree ! *)
let annotated_tree : ('a, Tree_layout.Common.pos) tree =
Tree_layout.layered ~distance tree
Install
opam install tree_layout