Module s2_vclocks

Vector clocks.

Behaviours: s2_gen_lattice.

References

Description

Vector clocks.

Data Types

index()

index() = term()

vclock()

abstract datatype: vclock()

Function Index

compare/2compare(C1, C2) is C1's relation to C2.
increment/2Equivalent to update / 2.
is_vclock/1is_vclock(X) is true iff X is a vclock.
merge/2merge(C1, C2) is the LUB of C1 and C2.
new/0new() is a fresh vclock.
pp/1pp(C) is the string-representation of C.
prune/2prune(C, Pred) is C with all entries for which Pred returns true removed.
size/1size(C) is the number of entries in C.
update/2update(C, Idx) is C with Idx's entry incremented by one.
value/1value(C) is the sum of the entries in C.

Function Details

compare/2

compare(C1::vclock(), C2::vclock()) -> s2_gen_lattice:relation()

compare(C1, C2) is C1's relation to C2.

increment/2

increment(C::vclock(), Idx::index()) -> vclock()

Equivalent to update / 2.

is_vclock/1

is_vclock(X::term()) -> boolean()

is_vclock(X) is true iff X is a vclock.

merge/2

merge(C1::vclock(), C2::vclock()) -> vclock()

merge(C1, C2) is the LUB of C1 and C2.

new/0

new() -> vclock()

new() is a fresh vclock.

pp/1

pp(C::vclock()) -> string()

pp(C) is the string-representation of C.

prune/2

prune(C::vclock(), Pred::fun((index()) -> boolean())) -> vclock()

prune(C, Pred) is C with all entries for which Pred returns true removed.

size/1

size(C::vclock()) -> non_neg_integer()

size(C) is the number of entries in C.

update/2

update(T::vclock(), Idx::index()) -> vclock()

update(C, Idx) is C with Idx's entry incremented by one.

value/1

value(C::vclock()) -> no_return()

value(C) is the sum of the entries in C.


Generated by EDoc