Interface IProcess<TState, TInput, TOutput>
Coalgebra shape for a stateful process: given the current state and an
input observation, produce the next state and an output. The domain
instantiations are IDecide<TState, TMarket, TPortfolio, TAction>
(decide) and IExecutor (execute), where the process
carries hidden state that must be exposed explicitly. Drive a process
over an observable stream of inputs with
Run<TState, TInput, TOutput>(IProcess<TState, TInput, TOutput>, IObservable<TInput>).
public interface IProcess<TState, TInput, TOutput>
Type Parameters
TStateThe process's internal state.
TInputThe input observation.
TOutputThe output emitted at this step.
- Extension Methods
Properties
Initial
The initial state.
TState Initial { get; }
Property Value
- TState
Methods
Step(TState, TInput)
Step the process forward by one input observation.
(TState NextState, TOutput Output) Step(TState state, TInput input)
Parameters
stateTStateCurrent state.
inputTInputObservation to apply.