package tree_layout

  1. Overview
  2. Docs

Algorithms to layout trees in a pretty manner.

N-ary trees

type 'a tree =
  1. | Node of 'a * 'a tree array
    (*

    A n-ary tree.

    For correct usage in the next functions, the labels of the nodes should always contain a unique identifier.

    *)
val layered : ?m:(module Stdlib.Hashtbl.HashedType with type t = 'a) -> distance:('a tree -> 'a tree -> float) -> 'a tree -> ('a * Common.pos) tree

Layered trees

See Tree_layout.Layered for details.

val treemap : ?m:(module Stdlib.Hashtbl.HashedType with type t = 'a) -> area:('a tree -> float) -> Common.rectangle -> 'a tree -> ('a * Common.rectangle) tree

Treemaps

See Tree_layout.Treemaps for details.

Individual algorithms

module Common : sig ... end

Common types

module Layered : sig ... end

Layered trees

module Treemaps : sig ... end

Squarified Treemaps