An aggregate of considerations. Although it is possible to create fully functioning AIs using only T:Crystal.IConsiderations, this class allows for such considerations to be combined. This is quite useful as it can reduce the complexity of individual considerations allowing them to be seen as building blocks.
More...
|
class | ConsiderationCollectionNullException |
|
class | NameIdAlreadyExistsInCollectionException |
|
class | NameIdIsNullOrEmptyException |
|
|
bool | AddConsideration (IConsideration consideration) |
| Add the specified consideration. More...
|
|
bool | AddConsideration (string considerationId) |
| Add the consideration associated with the given Id. More...
|
|
virtual void | Consider (IContext context) |
| Calculates the utility for this option given the provided context. More...
|
|
virtual IConsideration | Clone () |
| Creates a new instance of the implementing class. Note that the semantics here are somewhat vague, however, by convention the "Prototype Pattern" uses a "Clone" function. Note that this may have very different semantics when compared with either shallow or deep cloning. When implementing this remember to include only the defining characteristics of the class and not its state! More...
|
|
| CompositeConsideration () |
| Initializes a new instance of the T:Crystal.CompositeConsideration class. More...
|
|
| CompositeConsideration (string nameId, IConsiderationCollection collection) |
| Initializes a new instance of the CompositeConsideration class. More...
|
|
T | Clone () |
| Creates a new instance of the implementing class. Note that the semantics here are somewhat vague, however, by convention the "Prototype Pattern" uses a "Clone" function. Note that this may have very different semantics when compared with either shallow or deep cloning. When implementing this remember to include only the defining characteristics of the class and not its state! More...
|
|
|
string | NameId [get, set] |
| An identifier for this consideration. More...
|
|
IMeasure | Measure [get, set] |
| The measure to be used to evaluate the utility of this consideration. More...
|
|
Utility | DefaultUtility [get, set] |
| Gets or sets the default utility. More...
|
|
Utility | Utility [get, protected set] |
| Returns the combined utility for this consideration. More...
|
|
float | Weight [get, set] |
| Gets the weight of this consideration. More...
|
|
bool | IsInverted [get, set] |
| If true, then the output of the associated evaluator is inverted, in effect, inverting the consideration. More...
|
|
IMeasure | Measure [get, set] |
| The measure to be used to evaluate the utility of this consideration. More...
|
|
string | NameId [get] |
| A unique named identifier for this consideration. More...
|
|
Utility | DefaultUtility [get, set] |
| Gets or sets the default utility. More...
|
|
Utility | Utility [get] |
| Returns the utility for this consideration. More...
|
|
float | Weight [get, set] |
| The weight of this consideration. More...
|
|
bool | IsInverted [get, set] |
| If true, then the output of the associated evaluator is inverted, in effect, inverting the consideration. More...
|
|
An aggregate of considerations. Although it is possible to create fully functioning AIs using only T:Crystal.IConsiderations, this class allows for such considerations to be combined. This is quite useful as it can reduce the complexity of individual considerations allowing them to be seen as building blocks.
- See also
- T:Crystal.ICompositeConsideration, T:Crystal.Behaviour, T:Crystal.Option
Crystal.CompositeConsideration.CompositeConsideration |
( |
| ) |
|
|
inline |
Initializes a new instance of the T:Crystal.CompositeConsideration class.
Initializes a new instance of the T:Crystal.CompositeConsideration class.
- Parameters
-
Initializes a new instance of the T:Crystal.CompositeConsideration class.
- Parameters
-
collection | The collection. |
- Exceptions
-
T:Crystal.CompositeConsideration.ConsiderationCollectionNullException | |
Initializes a new instance of the CompositeConsideration class.
- Parameters
-
nameId | The name identifier. |
collection | The collection. |
- Exceptions
-
T:Crystal.CompositeConsideration.NameIdIsNullOrEmptyException | |
T:Crystal.CompositeConsideration.ConsiderationCollectionNullException | |
T:Crystal.CompositeConsideration.NameIdAlreadyExistsInCollectionException | |
bool Crystal.CompositeConsideration.AddConsideration |
( |
IConsideration |
consideration | ) |
|
|
inline |
bool Crystal.CompositeConsideration.AddConsideration |
( |
string |
considerationId | ) |
|
|
inline |
Creates a new instance of the implementing class. Note that the semantics here are somewhat vague, however, by convention the "Prototype Pattern" uses a "Clone" function. Note that this may have very different semantics when compared with either shallow or deep cloning. When implementing this remember to include only the defining characteristics of the class and not its state!
- Returns
Reimplemented in Crystal.Behaviour, Crystal.Option, and Crystal.ConstantUtilityOption.
virtual void Crystal.CompositeConsideration.Consider |
( |
IContext |
context | ) |
|
|
inlinevirtual |
Utility Crystal.CompositeConsideration.DefaultUtility |
|
getset |
Gets or sets the default utility.
The default utility.
bool Crystal.CompositeConsideration.IsInverted |
|
getset |
If true, then the output of the associated evaluator is inverted, in effect, inverting the consideration.
IMeasure Crystal.CompositeConsideration.Measure |
|
getset |
The measure to be used to evaluate the utility of this consideration.
string Crystal.CompositeConsideration.NameId |
|
getset |
An identifier for this consideration.
Utility Crystal.CompositeConsideration.Utility |
|
getprotected set |
Returns the combined utility for this consideration.
The utility.
float Crystal.CompositeConsideration.Weight |
|
getset |
Gets the weight of this consideration.
The documentation for this class was generated from the following file:
- Source/Considerations/CompositeConsideration.cs