Show / Hide Table of Contents

Struct ConsiderationResult

A structure for a value and maximum value, representing a score for a consideration result.

Implements
IEquatable<ConsiderationResult>
Inherited Members
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
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 Source

ConsiderationResult(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.

View Source

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 Source

FinalValue

Gets the resulting urgency modifier calculated by evaluating this consideration.

Declaration
public float? FinalValue { get; }
Property Value
Type Description
float?
View Source

MaxValue

Gets the maximum possible value that can be returned.

Declaration
public float MaxValue { get; }
Property Value
Type Description
float
View Source

Value

Gets the value to use to calculate urgency.

Declaration
public float Value { get; }
Property Value
Type Description
float

Methods

View Source

Equals(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.

View Source

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 obj and this instance are the same type and represent the same value; otherwise, false.

Overrides
ValueType.Equals(object)
View Source

Evaluate(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.

View Source

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
ValueType.GetHashCode()
View Source

ToString()

Returns the fully qualified type name of this instance.

Declaration
public override string ToString()
Returns
Type Description
string

The fully qualified type name.

Overrides
ValueType.ToString()

Operators

View Source

operator ==(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.

View Source

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.

Implements

IEquatable<T>
  • View Source
In this article
Back to top Generated by DocFX