The base class for parametrized objects (objects with parameters) used by the planning algorithm for state representation.
More...
|
| void | MergeParameters (ParametrizedObject other) |
| | Adds parameters from the other object to the own one, replacing parameters with those of other in case of conflict. More...
|
| |
|
int | GetParametersSize () |
| | - Returns
- The number of parameters assigned to this object
|
| |
|
bool | Contains (string name) |
| | - Returns
- true if the object contains a parameter with the given name, false otherwise
|
| |
| void | SetParameter< ParameterType > (string name, ParameterType value) |
| | Sets a value of a parameter identified by the given name. More...
|
| |
| ParameterType | GetParameterValue< ParameterType > (string name) |
| | Fetches the value of a parameter identified with the given name as a given ParameterType. Make sure to provide the correct ParameterType. More...
|
| |
| bool | CollectionContains (string collectionName, int objectIndex) |
| |
| void | AddCollection (string collectionName) |
| | Creates a named collection object, which can be used to group many IDs of objects together.
The name should be unique or you will otherwise override an existing collection. More...
|
| |
| SortedSet< int > | GetCollection (string collectionName) |
| |
|
bool | HasEqualParams (ParametrizedObject other) |
| | - Returns
true if the other object contains identical set of parameters (including the contents of collections)
|
| |
The base class for parametrized objects (objects with parameters) used by the planning algorithm for state representation.
◆ AddCollection()
| void Grail.Planners.ParametrizedObject.AddCollection |
( |
string |
collectionName | ) |
|
|
inline |
Creates a named collection object, which can be used to group many IDs of objects together.
The name should be unique or you will otherwise override an existing collection.
- Parameters
-
| collectionName | The name of the collection that will be created. |
◆ CollectionContains()
| bool Grail.Planners.ParametrizedObject.CollectionContains |
( |
string |
collectionName, |
|
|
int |
objectIndex |
|
) |
| |
|
inline |
- Parameters
-
| collectionName | Collection to check. See AddCollection. |
| objectIndex | The ID of an object. |
- Returns
true if the object with the given ID is present in the given collection
◆ GetCollection()
| SortedSet<int> Grail.Planners.ParametrizedObject.GetCollection |
( |
string |
collectionName | ) |
|
|
inline |
- Parameters
-
| collectionName | The name of the collection to retrieve. See AddCollection. |
- Returns
- The collection with the given name or
null if such does not exist.
◆ GetParameterValue< ParameterType >()
| ParameterType Grail.Planners.ParametrizedObject.GetParameterValue< ParameterType > |
( |
string |
name | ) |
|
|
inline |
Fetches the value of a parameter identified with the given name as a given ParameterType. Make sure to provide the correct ParameterType.
- Parameters
-
| name | The name of the parameter. |
- Returns
- The current value of the parameter or the default value if the name has not been found.
◆ MergeParameters()
Adds parameters from the other object to the own one, replacing parameters with those of other in case of conflict.
- Parameters
-
| other | Object to merge parameters from. |
◆ SetParameter< ParameterType >()
| void Grail.Planners.ParametrizedObject.SetParameter< ParameterType > |
( |
string |
name, |
|
|
ParameterType |
value |
|
) |
| |
|
inline |
Sets a value of a parameter identified by the given name.
- Parameters
-
| name | The name of the parameter. |
| value | The value of the parameter. |
- Template Parameters
-
| ParameterType | Has to implement IComparable interface |
- Type Constraints
-
| ParameterType | : | IComparable | |
The documentation for this class was generated from the following file:
- GrailPlanners/source/Planner/WorldState/ParametrizedObject.cs