KernelAPI reference
Class StateDivergence
Namespace: MicroEngine.Kernel
Assembly: MicroEngine.Kernel.dll
Guide: Modules and the frame schedule
Where two traces first differ (FirstDivergence).
public sealed record StateDivergence : IEquatable<StateDivergence>Inheritance
Implements
Constructors
StateDivergence(long, string?, StepHash?, StepHash?)
Where two traces first differ (FirstDivergence).
public StateDivergence(long Update, string? Section, StepHash? First, StepHash? Second)Parameters
Update long
The update of the first step that differs.
Section string?
The first section whose hash differs, or null when the steps carry no section hashes or one trace has no such step.
First StepHash?
The step of the first trace, or null when it ended earlier.
Second StepHash?
The step of the second trace, or null when it ended earlier.
Properties
First
The step of the first trace, or null when it ended earlier.
public StepHash? First { get; init; }Property Value
Second
The step of the second trace, or null when it ended earlier.
public StepHash? Second { get; init; }Property Value
Section
The first section whose hash differs, or null when the steps carry no section hashes or one trace has no such step.
public string? Section { get; init; }Property Value
Update
The update of the first step that differs.
public long Update { get; init; }Property Value
Methods
<Clone>$()
public StateDivergence <Clone>$()Returns
Deconstruct(out long, out string?, out StepHash?, out StepHash?)
public void Deconstruct(out long Update, out string? Section, out StepHash? First, out StepHash? Second)Parameters
Update long
Section string?
First StepHash?
Second StepHash?
Equals(object?)
public override bool Equals(object? obj)Parameters
obj object?
Returns
Equals(StateDivergence?)
public bool Equals(StateDivergence? other)Parameters
other StateDivergence?
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
A one-line description: the update, the section and both hashes.
public override string ToString()Returns
Operators
operator ==(StateDivergence?, StateDivergence?)
public static bool operator ==(StateDivergence? left, StateDivergence? right)Parameters
left StateDivergence?
right StateDivergence?
Returns
operator !=(StateDivergence?, StateDivergence?)
public static bool operator !=(StateDivergence? left, StateDivergence? right)Parameters
left StateDivergence?
right StateDivergence?