Skip to content

Drup/tree_layout

Repository files navigation

Tree_layout Build Status docs

Algorithms to layout trees in a pretty manner.

A tree

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