Struct ConsiderationResult
A structure for a value and maximum value, representing a score for a consideration result.
Implements
Inherited Members
Namespace: Microsoft.XboxStudios.BotBrain.Considerations
Assembly: BotBrain.Core.dll
Syntax
public readonly struct ConsiderationResult : IEquatable<ConsiderationResult>
Remarks
Initializes a new instance of the ConsiderationResult struct.
Constructors
View SourceConsiderationResult(bool)
Initializes a new instance of the ConsiderationResult struct.
Declaration
public ConsiderationResult(bool value)
Parameters
Type | Name | Description |
---|---|---|
bool | value | The value to use to calculate urgency. |
ConsiderationResult(float, float, float?)
A structure for a value and maximum value, representing a score for a consideration result.
Declaration
public ConsiderationResult(float value, float maxValue, float? finalValue = null)
Parameters
Type | Name | Description |
---|---|---|
float | value | The value to use to calculate the urgency modifier. |
float | maxValue | The maximum possible value that can be returned. |
float? | finalValue | The final urgency modifier, if it has been calculated. |
Remarks
Initializes a new instance of the ConsiderationResult struct.
Properties
View SourceFinalValue
Gets the resulting urgency modifier calculated by evaluating this consideration.
Declaration
public float? FinalValue { get; }
Property Value
Type | Description |
---|---|
float? |
MaxValue
Gets the maximum possible value that can be returned.
Declaration
public float MaxValue { get; }
Property Value
Type | Description |
---|---|
float |
Value
Gets the value to use to calculate urgency.
Declaration
public float Value { get; }
Property Value
Type | Description |
---|---|
float |
Methods
View SourceEquals(ConsiderationResult)
Determines if the given objects are equal.
Declaration
public bool Equals(ConsiderationResult other)
Parameters
Type | Name | Description |
---|---|---|
ConsiderationResult | other | The other object. |
Returns
Type | Description |
---|---|
bool | True if the objects are equal. |
Equals(object?)
Indicates whether this instance and a specified object are equal.
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current instance. |
Returns
Type | Description |
---|---|
bool | true if |
Overrides
View SourceEvaluate(Curve, double, out float?)
Evaluates the consideration result on the given probability curve.
Declaration
public double? Evaluate(Curve curve, double significance, out float? probabilityValue)
Parameters
Type | Name | Description |
---|---|---|
Curve | curve | The probability curve. |
double | significance | The significance of the consideration, between 0 and 1. |
float? | probabilityValue | The value of the probability curve for this consideration result. |
Returns
Type | Description |
---|---|
double? | A value between 0 and 1. |
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
View SourceToString()
Returns the fully qualified type name of this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | The fully qualified type name. |
Overrides
Operators
View Sourceoperator ==(ConsiderationResult, ConsiderationResult)
Determines if the consideration results are equal to each other.
Declaration
public static bool operator ==(ConsiderationResult left, ConsiderationResult right)
Parameters
Type | Name | Description |
---|---|---|
ConsiderationResult | left | The first consideration result to compare. |
ConsiderationResult | right | The second consideration result to compare. |
Returns
Type | Description |
---|---|
bool | True if the consideration results are equal. |
operator !=(ConsiderationResult, ConsiderationResult)
Determines if the consideration results are not equal to each other.
Declaration
public static bool operator !=(ConsiderationResult left, ConsiderationResult right)
Parameters
Type | Name | Description |
---|---|---|
ConsiderationResult | left | The first consideration result to compare. |
ConsiderationResult | right | The second consideration result to compare. |
Returns
Type | Description |
---|---|
bool | True if the consideration results are not equal. |