Module type Tree_layout.S

module type S = sig .. end
The output signature for a certain layout engine.

type t 
A tree
type vertex 
A vertex of the tree.
module H: Hashtbl.S  with type key = vertex
val layered : distance:(vertex -> vertex -> float) ->
t -> vertex -> Tree_layout.pos H.t
tree_layout ~distance g v returns the layered layout for the tree g rooted in v. Layered layout are such that vertices with the same depth have the same vertical coordinate.

distance v1 v2 should return the horizontal distance between v1 and v2 placed at the same depth.

The returned hash table contains one binding per accessible vertex in g.
See also Improving Walker's Algorithm to Run in Linear Time

val boundaries : ?margins:Tree_layout.pos ->
Tree_layout.pos H.t -> Tree_layout.pos * Tree_layout.pos
boundaries ~margins positions returns a pair (pos, size) defining a rectangle containing the positions in positions.

The option argument margins add a margin around the rectangle.