module Overlays:sig..end
Tools for overlay aware trees
This module provides a type to associate an interval of time to a value, to control its visibility
type interval =
| |
Bet of |
(* | [|a,b|] | *) |
| |
Bef of |
(* | ]|-oo,a|] | *) |
| |
Aft of |
(* | [|a,+oo|[ | *) |
| |
Nev |
(* | emptyset | *) |
| |
Alw |
(* | N | *) |
This type describes an interval of discrete points of time
val in_interval : int -> interval -> booltest if an integer is in an interval
val min_interval : int -> interval -> intThe minimum between the integer argument and the beginning of the
interval; returns the integer argument in the cases Nev and Alw
val max_interval : int -> interval -> intThe dual of min_interval
val min_tree : ('a -> interval) -> 'a Tree_adv.t -> intThe first moment of the tree to appear, not considering Nev and
Alw
val max_tree : ('a -> interval) -> 'a Tree_adv.t -> intThe last moment of the tree to appear, not considering Nev and
Alw
type'aspec =(interval * 'a) list
A spec is a list of objects associated with a visibility interval
val assoq : int -> 'a spec -> 'areturns the first element which is visible in the specification;
raises Not_found if no element is visible
val max : ('a -> Num.t) -> ('b * 'a) list -> Num.tgiven a function to compute a numeric from an 'a, and a
list of objects ('b,'a), return the maximal numeric from
that list; intended to be used with width and height functions
for objects and with a 'a spec list
val set_pos : (Point.t -> 'a -> 'b) ->
Point.t ->
'a spec -> 'b specGiven a function to move objects of type 'a, return a
function to move functions of type 'a spec