Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,Attribute> |
attributeMap |
protected java.util.List<Attribute> |
attributes |
protected int |
debugCode |
protected java.util.List<ObjectClass> |
objectClasses |
protected java.util.Map<java.lang.String,ObjectClass> |
objectClassMap |
protected boolean |
objectIdentifierDependentDomain |
protected java.util.Map<java.lang.String,PropositionalFunction> |
propFunctionMap |
protected java.util.List<PropositionalFunction> |
propFunctions |
Constructor and Description |
---|
Domain()
Initializes the data structures for indexing the object classes, attributes, and propositional functions
|
Modifier and Type | Method and Description |
---|---|
abstract void |
addAction(Action act)
Add a single agent action that defines this domain.
|
void |
addAttribute(Attribute att)
Add an attribute that can be used to define object classes of this domain.
|
void |
addObjectClass(ObjectClass oc)
Add an object class to define this domain.
|
void |
addPropositionalFunction(PropositionalFunction prop)
Add a propositional function that can be used to evaluate objects that belong to object classes
of this domain.
|
abstract void |
addSingleAction(SingleAction sa)
Add a stochastic game action that defines this domain that can be executed by an agent in the game.
|
abstract Action |
getAction(java.lang.String name)
Returns the single agent action with the given name.
|
abstract java.util.List<Action> |
getActions()
Returns a list of the single agent actions that define this domain.
|
Attribute |
getAttribute(java.lang.String name)
Returns the attribute in this domain with the given name
|
java.util.List<Attribute> |
getAttributes()
Returns a list of the attributes that define this domain.
|
int |
getDebugCode()
Returns the debug code used for printing debug messages.
|
Domain |
getNewDomainWithCopiedObjectClasses()
This will return a new domain object populated with copies of this Domain's ObjectClasses.
|
ObjectClass |
getObjectClass(java.lang.String name)
Returns the object class in this domain with the given name.
|
java.util.List<ObjectClass> |
getObjectClasses()
Returns the list of object classes that define this domain.
|
PropositionalFunction |
getPropFunction(java.lang.String name)
Returns the propositional function in this domain with the given name
|
java.util.List<PropositionalFunction> |
getPropFunctions()
Returns a list of the propositional functions that define this domain.
|
java.util.Map<java.lang.String,java.util.Set<PropositionalFunction>> |
getPropositionlFunctionsFromObjectClass(java.lang.String objectClassName)
Returns a map of propositional function classes to the set of propositional functions that belong to that class, but
only includes propositional function classes that define propositional functions that operate on a given object
class parameter.
|
java.util.Map<java.lang.String,java.util.Set<PropositionalFunction>> |
getPropositionlFunctionsMap()
Returns a map of propositional function classes to the set of propositional functions that belong to that class.
|
abstract SingleAction |
getSingleAction(java.lang.String name)
Return the stochastic game action with the given name.
|
abstract java.util.List<SingleAction> |
getSingleActions()
Returns a list of the stochastic game actions that that can be taken by individual agents in this domain.
|
boolean |
isObjectIdentifierDependent()
Returns whether this domain's states are object identifier (name) dependent.
|
protected abstract Domain |
newInstance()
Will return a new instance of this Domain's class (either SADomain or SGDomain)
|
void |
setDebugCode(int debugCode)
Sets the debug code used for printing debug messages.
|
void |
setObjectIdentiferDependence(boolean objectIdentifierDependent)
Sets whether this domain's states are object identifier (name) dependent.
|
void |
toggleDebugPrinting(boolean debugPrintingOn)
Toggles whether debug messages are printed
|
protected java.util.List<ObjectClass> objectClasses
protected java.util.Map<java.lang.String,ObjectClass> objectClassMap
protected java.util.List<Attribute> attributes
protected java.util.Map<java.lang.String,Attribute> attributeMap
protected java.util.List<PropositionalFunction> propFunctions
protected java.util.Map<java.lang.String,PropositionalFunction> propFunctionMap
protected boolean objectIdentifierDependentDomain
protected int debugCode
public Domain()
public void setObjectIdentiferDependence(boolean objectIdentifierDependent)
objectIdentifierDependent
- sets whether this domain's states are object identifier dependent (true) or not (false).public boolean isObjectIdentifierDependent()
protected abstract Domain newInstance()
public Domain getNewDomainWithCopiedObjectClasses()
public void addObjectClass(ObjectClass oc)
oc
- the object class to add to this domain.public void addAttribute(Attribute att)
att
- the attribtue to add to this domain.public void addPropositionalFunction(PropositionalFunction prop)
prop
- the propositional function to add.public abstract void addAction(Action act)
act
- the single agent action to add.public abstract void addSingleAction(SingleAction sa)
sa
- the stochastic game action that can be executed by an agent in the game.public java.util.List<ObjectClass> getObjectClasses()
public ObjectClass getObjectClass(java.lang.String name)
name
- the name of the object class to returnpublic java.util.List<Attribute> getAttributes()
public Attribute getAttribute(java.lang.String name)
name
- the name of the attribute to returnpublic java.util.List<PropositionalFunction> getPropFunctions()
public PropositionalFunction getPropFunction(java.lang.String name)
name
- the name of the attribute to return.public abstract java.util.List<Action> getActions()
public abstract java.util.List<SingleAction> getSingleActions()
public abstract Action getAction(java.lang.String name)
name
- the name of the action to returnpublic abstract SingleAction getSingleAction(java.lang.String name)
name
- the name of the action to returnpublic java.util.Map<java.lang.String,java.util.Set<PropositionalFunction>> getPropositionlFunctionsMap()
public java.util.Map<java.lang.String,java.util.Set<PropositionalFunction>> getPropositionlFunctionsFromObjectClass(java.lang.String objectClassName)
objectClassName
- the name of the object class for which propositional function classes should be returnedpublic int getDebugCode()
public void setDebugCode(int debugCode)
debugCode
- the debug code used for printing debug messagespublic void toggleDebugPrinting(boolean debugPrintingOn)
debugPrintingOn
- if true debug messages are printed; messages will not be printed if false.