Class PatternWeight

Namespace
Cratis.Chronicle.Concepts.Patterns
Assembly
Cratis.Chronicle.dll

Represents the recency-weighted strength of a pattern.

public record PatternWeight : ConceptAs<double>, IComparable<ConceptAs<double>>, IComparable<double>, IComparable, IEquatable<ConceptAs<double>>, IEquatable<PatternWeight>
Inheritance
PatternWeight
Implements
Inherited Members
Extension Methods

Remarks

Unlike PatternOccurrences, weight decays as a pattern goes unseen, so a behavior somebody stopped months ago sinks below the threshold and is pruned instead of competing forever with what they do now.

Constructors

PatternWeight(PatternWeight)

protected PatternWeight(PatternWeight original)

Parameters

original PatternWeight

PatternWeight(double)

Represents the recency-weighted strength of a pattern.

public PatternWeight(double Value)

Parameters

Value double

The actual value.

Remarks

Unlike PatternOccurrences, weight decays as a pattern goes unseen, so a behavior somebody stopped months ago sinks below the threshold and is pruned instead of competing forever with what they do now.

Fields

None

Represents no weight at all.

public static readonly PatternWeight None

Field Value

PatternWeight

Properties

EqualityContract

protected override Type EqualityContract { get; }

Property Value

Type

Methods

Deconstruct(out double)

public void Deconstruct(out double Value)

Parameters

Value double

Equals(PatternWeight?)

public virtual bool Equals(PatternWeight? other)

Parameters

other PatternWeight

Returns

bool

Equals(ConceptAs<double>?)

public override sealed bool Equals(ConceptAs<double>? other)

Parameters

other ConceptAs<double>

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected override bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

Operators

operator ==(PatternWeight?, PatternWeight?)

public static bool operator ==(PatternWeight? left, PatternWeight? right)

Parameters

left PatternWeight
right PatternWeight

Returns

bool

implicit operator PatternWeight(double)

Implicitly convert from a double to PatternWeight.

public static implicit operator PatternWeight(double value)

Parameters

value double

Value to convert from.

Returns

PatternWeight

operator !=(PatternWeight?, PatternWeight?)

public static bool operator !=(PatternWeight? left, PatternWeight? right)

Parameters

left PatternWeight
right PatternWeight

Returns

bool