|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ai.planning.strips.Grounding
public abstract class Grounding
A Substitution maps a set of Variables to a set of Terms. In the case of a Grounding the Terms must be Constants and no Variables can be unified with other Variables.
Constructor Summary | |
---|---|
Grounding()
|
Method Summary | |
---|---|
abstract boolean |
equals(Grounding s)
This function compares this and the given Grounding. |
abstract ai.krr.fol.Constant |
getValue(ai.krr.fol.Variable aVar)
This function returns the Term the given Variable is mapped to. |
abstract java.util.Set<ai.krr.fol.Variable> |
getVars()
This function returns a Set of all the Variables that are bound in this Grounding. |
abstract int |
size()
This function returns the number of variables bound by this Grounding. |
boolean |
unify(ai.krr.fol.Term aTerm,
ai.krr.fol.Variable aVar)
This function attempts to extend this Substitution such that the given Variable (from the "right" expression) and the given Term (from the "left") are unified and returns whether this succeeded. |
boolean |
unify(ai.krr.fol.Variable leftVar,
ai.krr.fol.Variable rightVar)
This function attempts to extend this Substitution such that the given Variables will be unified and returns true if this was possible. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface ai.krr.fol.Substitution |
---|
contains, unify |
Constructor Detail |
---|
public Grounding()
Method Detail |
---|
public abstract int size()
This function returns the number of variables bound by this Grounding.
public abstract java.util.Set<ai.krr.fol.Variable> getVars()
This function returns a Set of all the Variables that are bound in this Grounding.
public abstract ai.krr.fol.Constant getValue(ai.krr.fol.Variable aVar)
This function returns the Term the given Variable is mapped to. More specifically, if there is an associated Term it returns a Term that is the instantiation of the associated Term under this Substitution. Otherwise it returns null.
getValue
in interface ai.krr.fol.Substitution
aVar
- the Variable the Term is being sought for
public boolean unify(ai.krr.fol.Term aTerm, ai.krr.fol.Variable aVar)
This function attempts to extend this Substitution such that the given Variable (from the "right" expression) and the given Term (from the "left") are unified and returns whether this succeeded. For a Grounding this must always fail.
unify
in interface ai.krr.fol.Substitution
aTerm
- the Term the given Variable will be mapped toaVar
- the Variable the given Term is to be unified with
public boolean unify(ai.krr.fol.Variable leftVar, ai.krr.fol.Variable rightVar)
This function attempts to extend this Substitution such that the given Variables will be unified and returns true if this was possible. Where this matters, the first variable is considered to come from the "left" expression and the second from the "right". For a Grounding this must always fail.
unify
in interface ai.krr.fol.Substitution
leftVar
- a Variable to be associated with the other given VariablerightVar
- a Variable to be associated with the other given Variable
public abstract boolean equals(Grounding s)
This function compares this and the given Grounding. Two Groundings are equal if they map the same Variables to the same Constants.
s
- the Grounding this one is to be compared to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |