Non-Enumeration Example
This example shows the use of a non-enumerable type for the generic STATE
type of a transition system.
StateMachine<double> stateMachine = new(double.NaN);
The type double
has 6 public static fields: NegativeInfinity
, MinValue
, Epsilon
, MaxValue
, PositiveInfinity
, and NaN
. They are used as the states.
Note that the default double
value is not usable, because this is 0
, not corresponding to any of the double
public static fields. Therefore, the call to the constructor specifies NaN
as an initial state.
State transition graph:
−∞ ⇔ MinValue ⇔ Epsilon ⇔ MaxValue ⇔ +∞; MinValue ⇔ MaxValue NaN ⇒ to any other state, but all the transitions to NaN are invalid
This documentation is generated from the extended Markdown documentation using Extensible Markdown for Visual Studio Code.