Lattice

trait Lattice[@specialized(Int, Long, Float, Double) A] extends JoinSemilattice[A] with MeetSemilattice[A]

A lattice is a set A together with two operations (meet and join). Both operations individually constitute semilattices (join- and meet-semilattices respectively): each operation is commutative, associative, and idempotent.

A lattice is a set A together with two operations (meet and join). Both operations individually constitute semilattices (join- and meet-semilattices respectively): each operation is commutative, associative, and idempotent.

Join can be thought of as finding a least upper bound (supremum), and meet can be thought of as finding a greatest lower bound (infimum).

The join and meet operations are also linked by absorption laws:

meet(a, join(a, b)) = join(a, meet(a, b)) = a

Companion
object
trait Serializable
class Any

Value members

Concrete methods

def dual: Lattice[A]

This is the lattice with meet and join swapped

This is the lattice with meet and join swapped

Inherited methods

def join(lhs: A, rhs: A): A
Inherited from
JoinSemilattice
def joinPartialOrder(ev: Eq[A]): PartialOrder[A]
Inherited from
JoinSemilattice
def joinSemilattice: Semilattice[A]
Inherited from
JoinSemilattice
def meet(lhs: A, rhs: A): A
Inherited from
MeetSemilattice
def meetPartialOrder(ev: Eq[A]): PartialOrder[A]
Inherited from
MeetSemilattice
def meetSemilattice: Semilattice[A]
Inherited from
MeetSemilattice