Up

Module Unordered_array_fold

Signature

type ('a, 'acc) t = ('a, 'acc) Types.Unordered_array_fold.t = {
main
: 'acc Types.Node.t ;
init
: 'acc ;
f
: 'acc -> 'a -> 'acc ;
f_inverse
: 'acc -> 'a -> 'acc ;
full_compute_every_n_changes
: int ;
children
: 'a Types.Node.t array ;
mutable fold_value
: 'acc Uopt.t ;
mutable num_changes_since_last_full_compute
: int ;
}
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> ('b -> Sexplib.Sexp.t) -> ('a, 'b) t -> Sexplib.Sexp.t
val create : init:'acc -> f:('acc -> 'a -> 'acc) -> f_inverse:('acc -> 'a -> 'acc) -> full_compute_every_n_changes:int -> children:'a Types.Node.t array -> main:'acc Types.Node.t -> ('a, 'acc) t
val compute : ('a, 'acc) t -> 'acc
val child_changed : ('a, 'b) t -> old_value_opt:'a Uopt.t -> new_value:'a -> unit
val force_full_compute : ('a, 'b) t -> unit