Skip to content

KernelAPI reference

Class StateDivergence

Namespace: MicroEngine.Kernel
Assembly: MicroEngine.Kernel.dll
Guide: Modules and the frame schedule

Where two traces first differ (FirstDivergence).

C#
public sealed record StateDivergence : IEquatable<StateDivergence>

Inheritance

object ← StateDivergence

Implements

IEquatable<StateDivergence>

Constructors

StateDivergence(long, string?, StepHash?, StepHash?)

Where two traces first differ (FirstDivergence).

C#
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.

C#
public StepHash? First { get; init; }

Property Value

StepHash?

Second

The step of the second trace, or null when it ended earlier.

C#
public StepHash? Second { get; init; }

Property Value

StepHash?

Section

The first section whose hash differs, or null when the steps carry no section hashes or one trace has no such step.

C#
public string? Section { get; init; }

Property Value

string?

Update

The update of the first step that differs.

C#
public long Update { get; init; }

Property Value

long

Methods

<Clone>$()

C#
public StateDivergence <Clone>$()

Returns

StateDivergence

Deconstruct(out long, out string?, out StepHash?, out StepHash?)

C#
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?)

C#
public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(StateDivergence?)

C#
public bool Equals(StateDivergence? other)

Parameters

other StateDivergence?

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

A one-line description: the update, the section and both hashes.

C#
public override string ToString()

Returns

string

Operators

operator ==(StateDivergence?, StateDivergence?)

C#
public static bool operator ==(StateDivergence? left, StateDivergence? right)

Parameters

left StateDivergence?

right StateDivergence?

Returns

bool

operator !=(StateDivergence?, StateDivergence?)

C#
public static bool operator !=(StateDivergence? left, StateDivergence? right)

Parameters

left StateDivergence?

right StateDivergence?

Returns

bool