module Span: sig
.. end
spans: sparse polymorphic maps indexed by 'v
these maps are used to represent explicit part of the
transitions of guarded string automata
type ('v, 'a)
t
empty z
is the constant to z
map
val empty : 'a -> ('v, 'a) t
single p x z
is map whose value is x
on p
and z
everywhere else
val single : 'v -> 'a -> 'a -> ('v, 'a) t
merge f m n
applies f
pointwise to m
and n
,
assume that m
and z
share the same default value z
,
and that f z z = z
val merge : ('a -> 'a -> 'a) ->
('v, 'a) t -> ('v, 'a) t -> ('v, 'a) t
pointwise application of a function
val map : ('a -> 'b) -> ('v, 'a) t -> ('v, 'b) t
simple iterator
val iter : ('v -> 'a -> unit) -> ('v, 'a) t -> unit
iter2 f m n
applies f
to all non-trivial pairs obtained by zipping m
and n
val iter2 : ('v -> 'a -> 'a -> unit) ->
('v, 'a) t -> ('v, 'a) t -> unit
get m p
returns the value of the map m
on p
val get : ('v, 'a) t -> 'v -> 'a