Package it.unimi.dsi.lama4j
Class Trivial
java.lang.Object
it.unimi.dsi.lama4j.AbstractLattice
it.unimi.dsi.lama4j.AbstractDistributiveLattice
it.unimi.dsi.lama4j.Trivial
- All Implemented Interfaces:
Lattice
public class Trivial extends AbstractDistributiveLattice
The trivial distributive lattice of just one element.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Trivial()
-
Method Summary
Modifier and Type Method Description Collection<Element>
generators()
Return a collection of generators for the lattice.Element
join(Element... elements)
Return the join of the provided elements.Element
meet(Element... elements)
Return the meet of the provided elements.Element
one()
Return the one of this lattice.String
toString()
Element
valueOf(String name)
Return an element of this lattice, given its name.Element
zero()
Return the zero of this lattice.Methods inherited from class it.unimi.dsi.lama4j.AbstractLattice
comp, coveringRelation, elements, ensureElementsInLattice, ensureElementsInLattice, ensureElementsInLattice, leq, pscomp, psdiff, symdiff, valueOfZeroOrOne
-
Constructor Details
-
Trivial
public Trivial()
-
-
Method Details
-
valueOf
Description copied from interface:Lattice
Return an element of this lattice, given its name.Certain lattices make it possible to define names for elements. This method returns the element corresponding to the provided name.
- Parameters:
name
- the name of an element of this lattice.- Returns:
- the element of this lattice named
name
.
-
generators
Description copied from interface:Lattice
Return a collection of generators for the lattice. The set will not includezero
orone
. There is no guarantee of freeness or minimality.- Returns:
- a collection of generators.
-
one
Description copied from interface:Lattice
Return the one of this lattice.Note that there is no guarantee that the returned element is the only element representing one in this lattice. Other ones may arise from computations, but they will always be equal to the element returned by this method.
- Returns:
- the one of this lattice.
-
zero
Description copied from interface:Lattice
Return the zero of this lattice.Note that there is no guarantee that the returned element is the only element representing zero in this lattice. Other zeroes may arise from computations, but they will always be equal to the element returned by this method.
- Returns:
- the zero of this lattice.
-
join
Description copied from interface:Lattice
Return the join of the provided elements. In particular, upon the empty list of arguments returnszero
, and upon a singleton list the only specified element.- Parameters:
elements
- the elements whose join has to be computed.- Returns:
- the join of the provided elements.
-
meet
Description copied from interface:Lattice
Return the meet of the provided elements. In particular, upon the empty list of arguments returnsone
, and upon a singleton list the only specified element.- Parameters:
elements
- the elements whose meet has to be computed.- Returns:
- the meet of the provided elements.
-
toString
-