From 7c6b765da6902fac72bc2bb91a21fb7f86beed0d Mon Sep 17 00:00:00 2001 From: Sergey A Kryukov Date: Sat, 21 Dec 2024 16:40:08 -0500 Subject: [PATCH] Readme: references new documentation --- README.md | 40 +--------------------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/README.md b/README.md index 57a8af4..9bf050a 100644 --- a/README.md +++ b/README.md @@ -25,42 +25,4 @@ Note that both valid and some invalid transitions can be defined. The purpose of Both valid and invalid transitions can come with optional handlers accepting two arguments, the enumeration values representing starting and finishing states. In the case of a valid transition, the handler provides a side effect of transition. For example, in the hardware automation applications, it can operate the hardware. In the case of an invalid transition, the handler returns a comment string explaining why the transition is not permitted. -#### Constructor: - -~~~ -public StateMachine(STATE initialState = default); -~~~ - -#### Public methods: - -~~~ -void ResetState(); // jump to the initial state, ignoring the transition graph -void AddValidStateTransition(STATE startState, STATE finishState, - StateTransitionAction action, bool undirected = false); -void AddValidStateTransitionChain( - StateTransitionAction action, bool undirected = false, params STATE[] chain); -void AddInvalidStateTransition(STATE startState, STATE finishState, - InvalidStateTransitionAction action); -(bool isValid, string validityComment) IsTransitionValid(STATE startState, STATE finishState); -(bool success, string validityComment) TryTransitionTo(STATE state); - -// Find all permitted paths between two states: -STATE[][] Labyrinth(STATE start, STATE finish, bool shortest = false); - -// Find all states not visited along any of the paths between start and finish states: -(STATE[][] allPaths, STATE[] deadEnds) FindDeadEnds(STATE start, STATE finish); -STATE[] FindDeadEnds(STATE start, STATE[][] allPaths); -~~~ - -#### Public properties: - -~~~ -STATE CurrentState { get; private set; } - -// NP-hard: -(int numberOfPaths, int longestPathLength, STATE[][] longestPaths) LongestPaths; -(int maximumNumberOfPaths, (STATE start, STATE finish)[] pairsAtMax) MaximumPaths; -~~~ - -Here, the type `STATE` is a generic parameter of the class `StateMachine`. It can be any enumeration type, or, in principle, any type having some static public fields. -Every such field is determined through reflection and interpreted as a state, and its reflected name is interpreted as a state name. +Please see the comprehensive [API documentation](https://SAKryukov.GitHub.io/generic-state-machine).