package crdt-ml
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=c9be2ec006cd4f65e6a9bddbcedf024f876134afc1ddf4fb689dd0167de25b73
md5=b8337dcb24a3220a3c35bd5bae5c8f12
doc/crdt_mutable/M_IntVector/index.html
Module M_IntVector
Vector Clocks.
An integer vector where each replica is restricted to incrementing its own index i. This index is generated at random and assigned to a numsite value when calling make () or make_in_range n. All subsequent calls to update operations will only act on the position noted by numsite.
By default, Mutable_types.Mergeable.make just calls Mutable_types.IVector.make_in_range n with n = 11. You can override this by calling make_in_range directly.
A Vector Clock is a Mutable_types.IVector with type elt = int list
include Mutable_types.IVector with type elt = int list
include Mutable_types.Mergeable
val make : unit -> tCreate a new mergeable element.
val make_in_range : int -> tmake_in_range n creates a new IVector of size ranging from 0 to n. being n greater than 0 and smaller than 2^30.
When merging two CRDTs of different sizes, the smaller one grows and pads the remaining space with zeros.
val incr : t -> unitincr t increments the position associated with the numsite of t. See M_IntVector for more information on numsites.