Table of Contents

Class InputPort

Namespace
DotFly
Assembly
DotFly.Engine.dll

K floats in: one value per neuron of a NeuronSet, in set order. Writes are thread-safe and take effect from the next simulation step; converting sensor data (pixels, sound, game state) into these values is the caller's encoder.

public sealed class InputPort
Inheritance
InputPort
Inherited Members

Properties

Applied

Values currently applied to the backend (simulation thread's view).

public ReadOnlySpan<float> Applied { get; }

Property Value

ReadOnlySpan<float>

Count

Number of values (= neurons).

public int Count { get; }

Property Value

int

Id

Port id within the simulation (used by recordings).

public int Id { get; }

Property Value

int

Kind

Kind of input.

public InputKind Kind { get; }

Property Value

InputKind

Set

The neurons this port drives.

public NeuronSet Set { get; }

Property Value

NeuronSet

Writes

Number of writes so far (diagnostic).

public long Writes { get; }

Property Value

long

Methods

Fill(float)

Sets every value to value.

public void Fill(float value)

Parameters

value float

Set1(int, float)

Sets one value by position in the set.

public void Set1(int position, float value)

Parameters

position int
value float

Write(ReadOnlySpan<float>)

Sets all values (length must equal Count).

public void Write(ReadOnlySpan<float> values)

Parameters

values ReadOnlySpan<float>