Lattice

algebra.lattice.Lattice
See theLattice companion object
trait Lattice[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.

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

Attributes

Companion:
object
Source:
Lattice.scala
Graph
Supertypes
class Any
Known subtypes
Self type

Members list

Concise view

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

Attributes

Source:
Lattice.scala

Inherited methods

def join(lhs: A, rhs: A): A

Attributes

Inherited from:
JoinSemilattice
Source:
JoinSemilattice.scala
def joinPartialOrder(implicit ev: Eq[A]): PartialOrder[A]

Attributes

Inherited from:
JoinSemilattice
Source:
JoinSemilattice.scala
def meet(lhs: A, rhs: A): A

Attributes

Inherited from:
MeetSemilattice
Source:
MeetSemilattice.scala
def meetPartialOrder(implicit ev: Eq[A]): PartialOrder[A]

Attributes

Inherited from:
MeetSemilattice
Source:
MeetSemilattice.scala