A lattice describes a set of values where we always can merge two values and get a “consistent” result. Technically, this is a join semilattice. See also Bottom.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class ProductLattice[T]class SumLattice[T]class GenericLastWriterWinsLattice[A]object latticeInstance
Members list
Value members
Abstract methods
By assumption: associative, commutative, idempotent.
By assumption: associative, commutative, idempotent.
Implementation note: If it matters, assume that left
is the current state and right
is an added delta. All code should assume that left
is the larger state (and optimize for this). If left == right
, prefer to return left
.
Attributes
Concrete methods
Decompose a state into potentially smaller parts. Guarantees for any two states a and b that decompose(a).fold(b)(merge) == b merge a
, i.e., merging the decomposed values into b has the same result as merging the full a into b (assuming b is normalized).
Decompose a state into potentially smaller parts. Guarantees for any two states a and b that decompose(a).fold(b)(merge) == b merge a
, i.e., merging the decomposed values into b has the same result as merging the full a into b (assuming b is normalized).
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. The result may be the empty sequence.
Attributes
Computes delta without state. Overriding this is discouraged.
Computes delta without state. Overriding this is discouraged.
Attributes
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
Some types have multiple structural representations for semantically the same value, e.g., they may contain redundant or replaced parts. This can lead to semantically equivalent values that are not structurally equal. Normalize tries to fix this. Overriding this is discouraged.
Some types have multiple structural representations for semantically the same value, e.g., they may contain redundant or replaced parts. This can lead to semantically equivalent values that are not structurally equal. Normalize tries to fix this. Overriding this is discouraged.
Attributes
Extensions
Extensions
Convenience extensions for the above.
Convenience extensions for the above.
Attributes
Convenience extensions for the above.
Convenience extensions for the above.
Attributes
Convenience extensions for the above.
Convenience extensions for the above.