This struct is used throughout Crystal AI to communicate the utility (or usefulness) of a particular option, consideration or behaviour.
More...
|
| bool | Equals (Utility other) |
| | Determines whether the specified T:Crystal.Utility is equal to the current T:Crystal.Utility. More...
|
| |
| override bool | Equals (object obj) |
| | Determines whether the specified T:System.Object, is equal to this instance. More...
|
| |
| override int | GetHashCode () |
| | Returns a hash code for this instance. More...
|
| |
| int | CompareTo (Utility other) |
| | Compares to. More...
|
| |
| override string | ToString () |
| | Returns a string that represents the current T:Crystal.Utility. More...
|
| |
| | Utility (float value) |
| | Initializes a new instance of the T:Crystal.Utility struct. More...
|
| |
| | Utility (float value, float weight) |
| | Initializes a new instance of the T:Crystal.Utility struct. More...
|
| |
|
|
float | _value |
| |
|
float | _weight |
| |
|
| float | Value [get, set] |
| | The value of the option associated with this Utility. This parameter is normalized to the interval [0,1]. More...
|
| |
| float | Weight [get, set] |
| | The weighting of the option associated with this Utility. This parameter is normalized to the interval [0,1]. More...
|
| |
| float | Combined [get] |
| | Returns the Value*Weight of this Utility. More...
|
| |
| bool | IsZero [get] |
| | Gets a value indicating whether the combined utility is zero. More...
|
| |
| bool | IsOne [get] |
| | Gets a value indicating whether the combined utility is one. More...
|
| |
This struct is used throughout Crystal AI to communicate the utility (or usefulness) of a particular option, consideration or behaviour.
- See also
- T:System.IEquatable`1, T:System.IComparable`1
| Crystal.Utility.Utility |
( |
float |
value | ) |
|
|
inline |
Initializes a new instance of the T:Crystal.Utility struct.
- Parameters
-
| Crystal.Utility.Utility |
( |
float |
value, |
|
|
float |
weight |
|
) |
| |
|
inline |
Initializes a new instance of the T:Crystal.Utility struct.
- Parameters
-
| value | Value. |
| weight | Weight. |
| int Crystal.Utility.CompareTo |
( |
Utility |
other | ) |
|
|
inline |
Compares to.
- Returns
- The to.
- Parameters
-
| bool Crystal.Utility.Equals |
( |
Utility |
other | ) |
|
|
inline |
Determines whether the specified T:Crystal.Utility is equal to the current T:Crystal.Utility.
- Parameters
-
| other | The T:Crystal.Utility to compare with the current T:Crystal.Utility. |
- Returns
true if the specified T:Crystal.Utility is equal to the current T:Crystal.Utility; otherwise, false.
| override bool Crystal.Utility.Equals |
( |
object |
obj | ) |
|
|
inline |
Determines whether the specified T:System.Object, is equal to this instance.
- Parameters
-
| obj | The T:System.Object to compare with this instance. |
- Returns
true if the specified T:System.Object is equal to this instance; otherwise, false.
| override int Crystal.Utility.GetHashCode |
( |
| ) |
|
|
inline |
Returns a hash code for this instance.
- Returns
- A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
- Parameters
-
| a | The alpha component. |
| b | The blue component. |
- Parameters
-
| a | The alpha component. |
| b | The blue component. |
- Parameters
-
| a | The alpha component. |
| b | The blue component. |
- Parameters
-
| a | The alpha component. |
| b | The blue component. |
- Parameters
-
| a | The alpha component. |
| b | The blue component. |
- Parameters
-
| a | The alpha component. |
| b | The blue component. |
| override string Crystal.Utility.ToString |
( |
| ) |
|
|
inline |
Returns a string that represents the current T:Crystal.Utility.
- Returns
- A string that represents the current T:Crystal.Utility.
| float Crystal.Utility.Combined |
|
get |
Returns the Value*Weight of this Utility.
| bool Crystal.Utility.IsOne |
|
get |
Gets a value indicating whether the combined utility is one.
true if the combined utility is one; otherwise, false.
| bool Crystal.Utility.IsZero |
|
get |
Gets a value indicating whether the combined utility is zero.
true if the combined utility is zero; otherwise, false.
| float Crystal.Utility.Value |
|
getset |
The value of the option associated with this Utility. This parameter is normalized to the interval [0,1].
| float Crystal.Utility.Weight |
|
getset |
The weighting of the option associated with this Utility. This parameter is normalized to the interval [0,1].
The weight.
The documentation for this struct was generated from the following file:
- Source/General/Utility.cs