public abstract class ConceptGraph extends java.lang.Object implements CPO<Concept>
CPO.BoundType
HIGHER, INCOMPARABLE, LOWER, SAME
Constructor and Description |
---|
ConceptGraph() |
Modifier and Type | Method and Description |
---|---|
abstract Concept |
bottom()
Return the least element of this concept graph.
|
abstract int |
compare(java.lang.Object e1,
java.lang.Object e2)
Compare two concepts in the ontology.
|
Concept[] |
downSet(java.lang.Object e)
Compute the down-set of an element in this concept graph.
|
Concept |
greatestElement(java.util.Set<Concept> subset)
Compute the greatest element of a subset.
|
Concept |
greatestLowerBound(java.lang.Object e1,
java.lang.Object e2)
Compute the greatest lower bound (GLB) of two elements.
|
Concept |
greatestLowerBound(java.util.Set<Concept> subset)
Compute the greatest lower bound (GLB) of a subset.
|
boolean |
isLattice()
Return whether this concept graph is a lattice.
|
Concept |
leastElement(java.util.Set<Concept> subset)
Compute the least element of a subset.
|
abstract Concept |
leastUpperBound(java.lang.Object e1,
java.lang.Object e2)
Compute the least upper bound (LUB) of two elements.
|
Concept |
leastUpperBound(java.util.Set<Concept> subset)
Compute the least upper bound (LUB) of a subset.
|
abstract NonLatticeCounterExample |
nonLatticeReason()
Return a human readable string as to why this graph is not a lattice.
|
abstract Concept |
top()
Return the greatest element in this concept graph.
|
Concept[] |
upSet(java.lang.Object e)
Compute the up-set of an element in this concept graph.
|
public abstract Concept bottom()
public abstract int compare(java.lang.Object e1, java.lang.Object e2)
Concept
, otherwise an exception will be thrown. This
method returns one of ptolemy.graph.CPO.LOWER, ptolemy.graph.CPO.SAME,
ptolemy.graph.CPO.HIGHER, ptolemy.graph.CPO.INCOMPARABLE, indicating
the first argument is lower than, equal to, higher than, or
incomparable with the second argument in the property hierarchy,
respectively.public Concept[] downSet(java.lang.Object e)
public Concept greatestElement(java.util.Set<Concept> subset)
greatestElement
in interface CPO<Concept>
subset
- A set of Objects representing the subset.null
if the greatest element does not exist.java.lang.IllegalArgumentException
- If at least one Object in the
specified array is not an element of this concept graph.leastElement(Set)
public Concept greatestLowerBound(java.lang.Object e1, java.lang.Object e2)
greatestLowerBound
in interface CPO<Concept>
e1
- An Object representing an element in this concept graph.e2
- An Object representing an element in this concept graph.null
if the GLB does not exist.java.lang.IllegalArgumentException
- Always thrown in this base class.public Concept greatestLowerBound(java.util.Set<Concept> subset)
greatestLowerBound
in interface CPO<Concept>
subset
- A set of Objects representing the subset.java.lang.IllegalArgumentException
- If at least one Object is not
an element of this concept graph, or greatestLowerBound is not
implemented.leastUpperBound(Set)
public boolean isLattice()
public Concept leastElement(java.util.Set<Concept> subset)
leastElement
in interface CPO<Concept>
subset
- A set of Objects representing the subset.java.lang.IllegalArgumentException
- If at least one Object in the
specified array is not an element of this concept graph.greatestElement(Set)
public abstract Concept leastUpperBound(java.lang.Object e1, java.lang.Object e2)
leastUpperBound
in interface CPO<Concept>
e1
- An Object representing a concept in this concept graph.e2
- An Object representing a concept in this concept graph.null
if the LUB does not exist.java.lang.IllegalArgumentException
- If at least one of the
specified Objects is not an element of this concept graph.public Concept leastUpperBound(java.util.Set<Concept> subset)
leastUpperBound
in interface CPO<Concept>
subset
- An set of Objects representing the subset.java.lang.IllegalArgumentException
- If at least one Object in the
specified array is not an element of this concept graph.greatestLowerBound(Set)
public abstract NonLatticeCounterExample nonLatticeReason()
public abstract Concept top()
public Concept[] upSet(java.lang.Object e)