Class Parts

All Implemented Interfaces:
Lattice

public class Parts
extends AbstractDistributiveLattice
The distributive lattice of subsets of an initial segment of the natural numbers.
  • Constructor Details

    • Parts

      public Parts​(int n)
  • Method Details

    • valueOf

      public Element valueOf​(String name)
      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.
    • valueOf

      public Element valueOf​(int... element)
      Return an element of this lattice corresponding to the specified subset.
      Parameters:
      element - a list of integers interpreted as a subset.
      Returns:
      an element of this lattice corresponding to the specified subset.
    • generators

      public Collection<Element> generators()
      Description copied from interface: Lattice
      Return a collection of generators for the lattice. The set will not include zero or one. There is no guarantee of freeness or minimality.
      Returns:
      a collection of generators.
    • one

      public Element 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

      public Element 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

      public Element join​(Element... elements)
      Description copied from interface: Lattice
      Return the join of the provided elements. In particular, upon the empty list of arguments returns zero, 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

      public Element meet​(Element... elements)
      Description copied from interface: Lattice
      Return the meet of the provided elements. In particular, upon the empty list of arguments returns one, 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.
    • psdiff

      public Element psdiff​(Element x, Element y)
      Compute the pseudo-difference of two elements.

      In the case of a Boolean algebra, xy = x ∧ ~y.

      Specified by:
      psdiff in interface Lattice
      Overrides:
      psdiff in class AbstractLattice
      Parameters:
      x - an element.
      y - another element.
      Returns:
      xy.
      See Also:
      Lattice.psdiff(Element, Element)
    • pscomp

      public Element pscomp​(Element x, Element y)
      Compute the set implication of two elements.

      In the case of a Boolean algebra, xy = ~xy.

      Specified by:
      pscomp in interface Lattice
      Overrides:
      pscomp in class AbstractLattice
      Parameters:
      x - an element.
      y - another element.
      Returns:
      xy.
      See Also:
      Lattice.pscomp(Element, Element)
    • toString

      public String toString()
      Overrides:
      toString in class Object