DecomposeLattice

kofre.base.DecomposeLattice
See theDecomposeLattice companion object
trait DecomposeLattice[A] extends Lattice[A]

Decomposition tries to decompose a lattice into its smallest constituents. The only requirement is that merging the decomposed results produces the original state. Requires a bottom to enable automatic decomposition of Product types

Attributes

Companion:
object
Graph
Supertypes
trait Lattice[A]
class Object
trait Matchable
class Any
Known subtypes

Members list

Concise view

Value members

Abstract methods

def decompose(a: A): Iterable[A]

Decompose a state into smaller parts. Note that the goal here is small individual storage size at reasonable computational cost. Minimalism of returned results is not guaranteed. It is also not guaranteed that the result does not overlap.

Decompose a state into smaller parts. Note that the goal here is small individual storage size at reasonable computational cost. Minimalism of returned results is not guaranteed. It is also not guaranteed that the result does not overlap.

Attributes

Concrete methods

def diff(state: A, delta: A): Option[A]

computes delta without state

computes delta without state

Attributes

Inherited methods

def bimap[B](to: A => B, from: B => A): Lattice[B]

Attributes

Inherited from:
Lattice
def lteq(left: A, right: A): Boolean

Lattice order is derived from merge, but should be overridden for efficiency

Lattice order is derived from merge, but should be overridden for efficiency

Attributes

Inherited from:
Lattice
def merge(left: A, right: A): A

By assumption: associative, commutative, idempotent.

By assumption: associative, commutative, idempotent.

For use with Delta CRDTs, this function should be optimized for the case that left >> right, i.e., that left is the current state and right the delta

Attributes

Inherited from:
Lattice

Extensions

Extensions

extension (a: A)
def decomposed: Iterable[A]

Inherited extensions

extension (left: A)
def <=(right: A): Boolean

Lattice order is derived from merge, but should be overridden for efficiency

Lattice order is derived from merge, but should be overridden for efficiency

Attributes

Inherited from:
Lattice
def merge(right: A): A

Attributes

Inherited from:
Lattice