Lattice

rdts.base.Lattice
See theLattice companion trait
object Lattice

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Lattice.type

Members list

Type members

Classlikes

object Derivation

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Derivation.type
object syntax

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
syntax.type

Value members

Concrete methods

def apply[A](using ev: Lattice[A]): Lattice[A]
def assertEquals[A]: Lattice[A]
def assertEqualsOrdering[A]: Ordering[A]
inline def derived[T <: Product](using pm: ProductOf[T]): Lattice[T]
def diff[A : Decompose](state: A, delta: A): Option[A]
def fromOrdering[A : Ordering]: Lattice[A]
def latticeOrder[A : Lattice]: PartialOrdering[A]
def lteq[A : Lattice](left: A, right: A): Boolean
def merge[A : Lattice](left: A, right: A): A
def normalize[A : Lattice](v: A): A

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

inline def sumLattice[T](using sm: SumOf[T]): Lattice[T]

Givens

Givens

given functionLattice[K, V : Lattice]: Lattice[K => V]
given iterableLattice[A, It <: (IterableOps)](using Lattice[A]): Lattice[It[A]]
given mapLattice[K, V : Lattice, Mp <: (MapOps)]: Lattice[Mp[K, V]]
given optionLattice[A : Lattice]: Lattice[Option[A]]
given setLattice[A]: setLattice[A]
given syntax: syntax
inline given tupleLattice[T <: Tuple](using pm: ProductOf[T]): Lattice[T]

This causes tuple lattices to be generally derivable implicitly, without making all products derivable implicitly.

This causes tuple lattices to be generally derivable implicitly, without making all products derivable implicitly.

Attributes