|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.deri.iris.utils.equivalence.TermEquivalence
public class TermEquivalence
An utility class to define equivalence between terms. Uses the disjoint-set data structure.
DisjointSets| Constructor Summary | |
|---|---|
TermEquivalence()
Creates a new term equivalence relation. |
|
| Method Summary | |
|---|---|
boolean |
areEquivalent(ITerm x,
ITerm y)
Checks if the specified terms are equivalent. |
boolean |
equals(Object obj)
|
ITerm |
findRepresentative(ITerm term)
Returns a representative term for the specified terms. |
Set<ITerm> |
getEquivalent(ITerm term)
Returns the set of terms which are equivalent to the specified term. |
int |
hashCode()
|
void |
setEquivalent(ITerm x,
ITerm y)
Defines the specified terms as equivalent. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TermEquivalence()
| Method Detail |
|---|
public boolean areEquivalent(ITerm x,
ITerm y)
IEquivalentTerms
areEquivalent in interface IEquivalentTermsx - The first term.y - The second term.
true if the two given terms are equivalent,
false otherwise.
public void setEquivalent(ITerm x,
ITerm y)
IEquivalentTerms
setEquivalent in interface IEquivalentTermsx - The first term.y - The second term.public ITerm findRepresentative(ITerm term)
IEquivalentTerms
findRepresentative in interface IEquivalentTermsterm - The term.
public Set<ITerm> getEquivalent(ITerm term)
IEquivalentTerms
getEquivalent in interface IEquivalentTermsterm - The term.
public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||