Loom.Dots

A generic structure for associating values with dots (version vector pairs).

They reflect work from ORSWOT (optimized observed-remove set without tombstones).

Summary

add(arg1, actor, value)

Adds and associates a value with a new dot for an actor

compact(dots)

Compact the dots

dotin(dots, dot)

Checks for a dot’s membership

dots(dots)

Return the dots

join(dots1, dots2)

Joins any 2 dots together

new()

Create a new Dots manager

remove(arg1)

Removes all values from the set

remove(dots, pred)

Removes a value from the set

Types

t

actor :: term

clock :: pos_integer

dot :: {actor, clock}

value :: term

Functions

add(arg1, actor, value)

Specs:

Adds and associates a value with a new dot for an actor.

compact(dots)

Specs:

  • compact(t) :: t

Compact the dots.

This merges any newly-contiguously-joined deltas. This is usually called automatically as needed.

dotin(dots, dot)

Specs:

  • dotin(t, dot) :: boolean

Checks for a dot’s membership

dots(dots)

Specs:

Return the dots

join(dots1, dots2)

Specs:

  • join(t, t) :: t

Joins any 2 dots together.

Automatically compacts any contiguous dots.

new()

Specs:

  • new :: t

Create a new Dots manager

remove(arg1)

Specs:

  • remove({t, t}) :: {t, t}

Removes all values from the set

remove(dots, pred)

Specs:

Removes a value from the set