Package it.unimi.dsi.lama4j
Class AbstractElement
java.lang.Object
it.unimi.dsi.lama4j.AbstractElement
- All Implemented Interfaces:
Element
- Direct Known Subclasses:
IntervalAntichains.Antichain
,NamedElement
public abstract class AbstractElement extends Object implements Element
An abstract implementation of
Element
providing most operations by delegation to the
containing lattice.-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractElement(Lattice lattice)
Create a new abstract element, initialising its containing lattice. -
Method Summary
Modifier and Type Method Description boolean
comp(Element element)
Return whether this element is comparable with the provided element.Element
join(Element element)
Return the join of this element and of the provided element.Element
join(Element... element)
Return the join of this element and of the provided elements.Lattice
lattice()
Return the lattice containing this element.boolean
leq(Element element)
Return whether this element is less than or equal to the provided element in the order ofthe containing lattice
.Element
meet(Element element)
Return the meet of this element and of the provided element.Element
meet(Element... element)
Return the meet of this element and of the provided elements.Element
pscomp(Element element)
Return the pseudocomplement of this element relative to another element (optional operation).Element
psdiff(Element element)
Return the difference of this element with another element (optional operation).Element
symdiff(Element element)
Return the symmetric difference between this element and another element (optional operation).
-
Field Details
-
lattice
The containing lattice.
-
-
Constructor Details
-
AbstractElement
Create a new abstract element, initialising its containing lattice.- Parameters:
lattice
- the containing lattice of this abstract element.
-
-
Method Details
-
lattice
Description copied from interface:Element
Return the lattice containing this element. -
meet
Description copied from interface:Element
Return the meet of this element and of the provided elements. In particular, upon the empty list of arguments returns this element. -
meet
Description copied from interface:Element
Return the meet of this element and of the provided element. -
join
Description copied from interface:Element
Return the join of this element and of the provided elements. In particular, upon the empty list of arguments returns this element. -
join
Description copied from interface:Element
Return the join of this element and of the provided element. -
comp
Description copied from interface:Element
Return whether this element is comparable with the provided element.- Specified by:
comp
in interfaceElement
- Parameters:
element
- an element.- Returns:
- true if this element is comparable
with
element
, false otherwise.
-
leq
Description copied from interface:Element
Return whether this element is less than or equal to the provided element in the order ofthe containing lattice
.- Specified by:
leq
in interfaceElement
- Parameters:
element
- an element.- Returns:
- true if this element is
less than or equal to
element
, false otherwise.
-
psdiff
Description copied from interface:Element
Return the difference of this element with another element (optional operation).- Specified by:
psdiff
in interfaceElement
- Parameters:
element
- an element.- Returns:
- the difference between this element and
element
. - See Also:
Lattice.psdiff(Element, Element)
-
pscomp
Description copied from interface:Element
Return the pseudocomplement of this element relative to another element (optional operation).- Specified by:
pscomp
in interfaceElement
- Parameters:
element
- an element.- Returns:
- the pseudocomplement of this element relative to
element
. - See Also:
Lattice.pscomp(Element, Element)
-
symdiff
Description copied from interface:Element
Return the symmetric difference between this element and another element (optional operation).- Specified by:
symdiff
in interfaceElement
- Parameters:
element
- an element.- Returns:
- the symmetric difference of this element with
element
. - See Also:
Lattice.symdiff(Element, Element)
-