module type DASHTBL_OUTPUT =Output signature of dashtables.sig
..end
include Project.Computation.OUTPUT
self
value of a dashtbl into a
selection without also adding its dependencies.rehash
function (see Project.DATATYPE_OUTPUT.rehash
)type
key
type
data
val add : key ->
Project.Computation.t list -> data -> unit
key, data
in the tables.
The dependencies are the states required for computing the binding.
More precisely, a binding is a triple key --> state --> data
and add
k l d
adds as many bindings as the length of the list, but all these
bindings corresponds to the very same state.
Be aware that add k [ s1; s2 ] v
is NOT equivalent to add k [ s1
] v; add k [ s2 ] v
.
k, v
in the
table which requires both s1
and s2
to be computed. If you clear
the dependencies of s1
, this binding is removed from the table.k, v
in the table. The first one is computed by using s1
while the second
one (containing the same value) is computed by using s2
. If you clear
the dependencies of s1
, only the first binding is removed from the
table, but the second one is still present.val replace : reset:bool ->
key ->
Project.Computation.t list -> data -> unit
add
but replace the existing bindings if any (same
difference that Hashtbl.replace
wrt Hashtbl.add
.
If reset
to true
, all the dependencies of old bindings are cleared.
It is always safe to put reset
to true
, but it may be unsafe to
put it to false
.
reset
eraval memo : reset:bool ->
(data list -> data) ->
key ->
Project.Computation.t list -> data
memo f k l
replaces the bindings in the table by a new one computed
by applying f
. The argument of f
is the list of existing bindings
(the empty list if there is no binding).
If reset
to true
, all the dependencies of old bindings are cleared.
It is always safe to put reset
to true
, but it may be unsafe to
put it to false
.val clear : reset:bool -> unit -> unit
reset
is true
, all the dependencies of the table are also
cleared.
It is always safe to put reset
to true
, but it may be unsafe to
put it to false
.val remove : reset:bool -> key -> Project.Computation.t -> unit
reset
is true
, clear all athe dependencies of the removed
binding.
It is always safe to put reset
to true
, but it may be unsafe to
put it to false
.val remove_all : reset:bool -> key -> unit
reset
is true
, clear all the dependencies of each removed
binding.
It is always safe to put reset
to true
, but it may be unsafe to
put it to false
.val filter : reset:bool ->
(key ->
Project.Computation.t -> data -> bool) ->
key -> unit
reset
is true
, clear all the dependencies of each removed
binding.
It is always safe to put reset
to true
, but it may be unsafe to
put it to false
.val mem : key -> bool
true
if there is a binding with the given key.val find : ?who:Project.Computation.t list ->
key ->
Project.Computation.t ->
data * Project.Computation.t
who
is set, automatically adds dependency from the found state
to each of states of who
.Not_found
if there is no such bindingval find_data : ?who:Project.Computation.t list ->
key ->
Project.Computation.t -> data
who
is set, automatically adds dependency from the state
corresponding to the given data to each of states of who
.Not_found
if there is no such bindingval find_state : ?who:Project.Computation.t list ->
key ->
Project.Computation.t -> Project.Computation.t
who
is set, automatically adds dependency from the found state
to each of states of who
.Not_found
if there is no such bindingval find_all_local : ?who:Project.Computation.t list ->
key ->
Project.Computation.t ->
(data * Project.Computation.t) list
who
is set, automatically adds dependency from each found state
to each of states of who
.val find_all_local_data : ?who:Project.Computation.t list ->
key ->
Project.Computation.t -> data list
who
is set, automatically adds dependency from the state
corresponding to each data to each of states of who
.val find_all_local_state : ?who:Project.Computation.t list ->
key ->
Project.Computation.t -> Project.Computation.t list
who
is set, automatically adds dependency from each found state
to each of states of who
.val find_all : ?who:Project.Computation.t list ->
key ->
(data * Project.Computation.t) list
who
is set, automatically adds dependency from each found state
to each of states of who
.val find_all_data : ?who:Project.Computation.t list ->
key -> data list
who
is set, automatically adds dependency from the state
correspondin to of each found data to each of states of who
.val find_all_states : ?who:Project.Computation.t list ->
key -> Project.Computation.t list
who
is set, automatically adds dependency from each found state
to each of states of who
.val iter : (key ->
Project.Computation.t -> data -> unit) ->
unit
val iter_key : (Project.Computation.t -> data -> unit) ->
key -> unit
val fold : (key ->
Project.Computation.t -> data -> 'a -> 'a) ->
'a -> 'a
val fold_key : (Project.Computation.t -> data -> 'a -> 'a) ->
key -> 'a -> 'a
val length : unit -> int
val add_dependency : Project.Computation.t -> Project.Computation.t -> unit
self
(the state
of the dashtable) or the state of one binding of the table.