Crystal AI  1.0.0
Crystal.ConstantUtilityOption Class Reference

This option always returns the same utility irrespective of the context.

See also
T:Crystal.Option
More...

Inheritance diagram for Crystal.ConstantUtilityOption:
Crystal.Option Crystal.CompositeConsideration Crystal.IOption Crystal.ICompositeConsideration Crystal.ICompositeConsideration Crystal.IConsideration Crystal.IConsideration Crystal.IAiPrototype< IConsideration > Crystal.IAiPrototype< IConsideration >

Public Member Functions

override void Consider (IContext context)
 Calculates the utility given the specified context. More...
 
override IConsideration Clone ()
 Clones this instance. More...
 
 ConstantUtilityOption ()
 Initializes a new instance of the T:Crystal.ConstantUtilityOption class. More...
 
 ConstantUtilityOption (string nameId, IOptionCollection collection)
 Initializes a new instance of the ConstantUtilityOption class. More...
 
- Public Member Functions inherited from Crystal.Option
bool SetAction (IAction action)
 Sets the action. More...
 
bool SetAction (string actionId)
 Sets the action to be executed when this option is selected to the action associated with actionId. More...
 
override void Consider (IContext context)
 Calculates the utility for this option given the provided context. More...
 
override 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...
 
 Option ()
 Initializes a new instance of the T:Crystal.Option class. More...
 
 Option (string nameId, IOptionCollection collection)
 Initializes a new instance of the T:Crystal.Option class. More...
 
- Public Member Functions inherited from Crystal.CompositeConsideration
bool AddConsideration (IConsideration consideration)
 Add the specified consideration. More...
 
bool AddConsideration (string considerationId)
 Add the consideration associated with the given Id. 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...
 
- Public Member Functions inherited from Crystal.IAiPrototype< 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...
 

Additional Inherited Members

- Protected Member Functions inherited from Crystal.Option
 Option (Option other)
 Initializes a new instance of the T:Crystal.Option class. More...
 
- Protected Member Functions inherited from Crystal.CompositeConsideration
 CompositeConsideration (CompositeConsideration other)
 Initializes a new instance of the T:Crystal.CompositeConsideration class. More...
 
 CompositeConsideration (IConsiderationCollection collection)
 Initializes a new instance of the T:Crystal.CompositeConsideration class. More...
 
- Properties inherited from Crystal.Option
IAction Action [get]
 The action to be executed when this option is selected. More...
 
- Properties inherited from Crystal.CompositeConsideration
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...
 
- Properties inherited from Crystal.ICompositeConsideration
IMeasure Measure [get, set]
 The measure to be used to evaluate the utility of this consideration. More...
 
- Properties inherited from Crystal.IConsideration
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...
 
- Properties inherited from Crystal.IOption
IAction Action [get]
 The action to be executed when this option is selected. More...
 

Detailed Description

This option always returns the same utility irrespective of the context.

See also
T:Crystal.Option

Constructor & Destructor Documentation

Crystal.ConstantUtilityOption.ConstantUtilityOption ( )
inline

Initializes a new instance of the T:Crystal.ConstantUtilityOption class.

Crystal.ConstantUtilityOption.ConstantUtilityOption ( string  nameId,
IOptionCollection  collection 
)
inline

Initializes a new instance of the ConstantUtilityOption class.

Parameters
nameIdThe name identifier.
collectionThe collection.

Member Function Documentation

override IConsideration Crystal.ConstantUtilityOption.Clone ( )
inlinevirtual

Clones this instance.

Returns

Reimplemented from Crystal.CompositeConsideration.

override void Crystal.ConstantUtilityOption.Consider ( IContext  context)
inlinevirtual

Calculates the utility given the specified context.

Parameters
contextThe context.
Returns
The utility.

Reimplemented from Crystal.CompositeConsideration.


The documentation for this class was generated from the following file: