Table of Contents

Class SFC64.State

Namespace
NumSharp
Assembly
NumSharp.dll

The SFC64 state — NumPy's {'bit_generator': 'SFC64', 'state': {'state': uint64[4]}, 'has_uint32': int, 'uinteger': int} with the nested 'state' dict flattened.

public class SFC64.State : BitGeneratorState
Inheritance
SFC64.State
Inherited Members

Remarks

Unsealed, so a subclass engine that adds state of its own derives its snapshot from this class. Its GetStateCore() override returns the derived snapshot, which passes the typed state getter (a cast to SFC64.State) and SetStateCore(BitGeneratorState) (an is State test); its SetStateCore(BitGeneratorState) override restores its own fields and calls the base for the engine's. Footgun: the bit_generator label stays "SFC64" and the base SetStateCore(BitGeneratorState) takes any SFC64.State, where NumPy labels a subclass's state with the subclass's class name and refuses another class's state.

Constructors

State()

Creates an empty state (fill state before assigning it).

public State()

State(ulong[], int, uint)

Creates a state from its members.

public State(ulong[] state, int has_uint32 = 0, uint uinteger = 0)

Parameters

state ulong[]

The four state words a, b, c, counter (a single word broadcasts to all four, as NumPy's state_vec[:] = … does).

has_uint32 int

Non-zero when a buffered 32-bit half is pending.

uinteger uint

The buffered 32-bit half.

Properties

bit_generator

NumPy's 'bit_generator' key: the name of the bit generator class this state belongs to.

public override string bit_generator { get; }

Property Value

string

has_uint32

Non-zero when a buffered 32-bit half is pending.

public int has_uint32 { get; set; }

Property Value

int

state

The four state words (NumPy state['state']['state']); the last is the counter.

public ulong[] state { get; set; }

Property Value

ulong[]

uinteger

The buffered 32-bit half.

public uint uinteger { get; set; }

Property Value

uint