Skip to content

Commit

Permalink
Docs: completed documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
SAKryukov committed Dec 21, 2024
1 parent 97cc6e6 commit bd61fe7
Show file tree
Hide file tree
Showing 11 changed files with 128 additions and 82 deletions.
6 changes: 3 additions & 3 deletions docs/Example.Door.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="utf-8"/>
<style type="text/css">
@import url(https://SAKryukov.github.io/publications/code/documentation.css);
code { color: darkGreen; }
code { color: green; }
p.title { margin-top: 0; }
p.author { text-align: right; }
pre { margin-top: 0; margin-bottom: 0; }
Expand All @@ -17,8 +17,8 @@
</head>
<body>

<p class="title">Room Door</p><p><a href="https://github.com/SAKryukov/generic-state-machine/tree/main/code/Tests/TestDoor">Source code</a></p><p>Basic state machine example with 6 states forming a linear transition graph. Demonstrates valid transitions and the attempts to perform an invalid transition.</p><p>The state machine can be represented as</p><pre>Locked &#x21D4; Closed &#x21D4; Opened &#x21D4; Opened Inside &#x21D4; Closed Inside &#x21D4; Locked Inside
</pre><p class="extensible-markdown">This documentaton is generated from the extended Markdown documentation using <a href="https://marketplace.visualstudio.com/items?itemName=sakryukov.extensible-markdown">Extensible Markdown</a>
<p class="title">Room Door</p><p><a href="https://github.com/SAKryukov/generic-state-machine/tree/main/code/Tests/TestDoor">Source code</a></p><p>Basic state machine example with 6 states forming a linear transition graph. Demonstrates valid transitions and attempts to perform an invalid transition.</p><p>The state machine can be represented as</p><pre>Locked &#x21D4; Closed &#x21D4; Opened &#x21D4; Opened Inside &#x21D4; Closed Inside &#x21D4; Locked Inside
</pre><p class="extensible-markdown">This documentation is generated from the extended Markdown documentation using <a href="https://marketplace.visualstudio.com/items?itemName=sakryukov.extensible-markdown">Extensible Markdown</a>
for Visual Studio Code.</p>

</body>
Expand Down
4 changes: 2 additions & 2 deletions docs/Example.Door.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ Room Door{title}

[Source code](https://github.com/SAKryukov/generic-state-machine/tree/main/code/Tests/TestDoor)

Basic state machine example with 6 states forming a linear transition graph. Demonstrates valid transitions and the attempts to perform an invalid transition.
Basic state machine example with 6 states forming a linear transition graph. Demonstrates valid transitions and attempts to perform an invalid transition.

The state machine can be represented as

~~~
Locked &#x21D4; Closed &#x21D4; Opened &#x21D4; Opened Inside &#x21D4; Closed Inside &#x21D4; Locked Inside
~~~

This documentaton is generated from the extended Markdown documentation using [Extensible Markdown](https://marketplace.visualstudio.com/items?itemName=sakryukov.extensible-markdown)
This documentation is generated from the extended Markdown documentation using [Extensible Markdown](https://marketplace.visualstudio.com/items?itemName=sakryukov.extensible-markdown)
for Visual Studio Code.{.extensible-markdown}

9 changes: 6 additions & 3 deletions docs/Example.Grid.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="utf-8"/>
<style type="text/css">
@import url(https://SAKryukov.github.io/publications/code/documentation.css);
code { color: darkGreen; }
code { color: green; }
p.title { margin-top: 0; }
p.author { text-align: right; }
pre { margin-top: 0; margin-bottom: 0; }
Expand All @@ -17,11 +17,14 @@
</head>
<body>

<p class="title">Grid</p><p><a href="https://github.com/SAKryukov/generic-state-machine/tree/main/code/Tests/TestGrid">Source code</a></p><p>State transition graph can be represented as a matrix 6x4 with each neigboring states connected with an undirected valid state transition:</p><pre>n00 n01 n02 n03 n04 n05
<p class="title">Grid</p><p><a href="https://github.com/SAKryukov/generic-state-machine/tree/main/code/Tests/TestGrid">Source code</a></p><p>The state transition graph can be represented as a matrix 6x4 with each neighboring state connected with an undirected valid state transition:</p><pre>n00 n01 n02 n03 n04 n05
n10 n11 n12 n13 n14 n15
n20 n21 n22 n23 n24 n25
n30 n31 n32 n33 n34 n35
</pre><p>SA???</p><p class="extensible-markdown">This documentaton is generated from the extended Markdown documentation using <a href="https://marketplace.visualstudio.com/items?itemName=sakryukov.extensible-markdown">Extensible Markdown</a>
</pre><p>This example demonstrates that NP-hard problems can be pretty hard even for the 24 states. The states in this
example form a 6x4 grid with permitted undirected transitions between all neighboring cells.
The example demonstrates the calculation of the longest path between two states and the maximum number of possible paths.</p><p>Maximum number of paths between a pair of states is 5493.
Total number of paths: 1603536, longest path length: 23.</p><p class="extensible-markdown">This documentation is generated from the extended Markdown documentation using <a href="https://marketplace.visualstudio.com/items?itemName=sakryukov.extensible-markdown">Extensible Markdown</a>
for Visual Studio Code.</p>

</body>
Expand Down
11 changes: 8 additions & 3 deletions docs/Example.Grid.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Grid{title}

[Source code](https://github.com/SAKryukov/generic-state-machine/tree/main/code/Tests/TestGrid)

State transition graph can be represented as a matrix 6x4 with each neigboring states connected with an undirected valid state transition:
The state transition graph can be represented as a matrix 6x4 with each neighboring state connected with an undirected valid state transition:

~~~
n00 n01 n02 n03 n04 n05
Expand All @@ -11,8 +11,13 @@ n20 n21 n22 n23 n24 n25
n30 n31 n32 n33 n34 n35
~~~

SA???
This example demonstrates that NP-hard problems can be pretty hard even for the 24 states. The states in this
example form a 6x4 grid with permitted undirected transitions between all neighboring cells.
The example demonstrates the calculation of the longest path between two states and the maximum number of possible paths.

This documentaton is generated from the extended Markdown documentation using [Extensible Markdown](https://marketplace.visualstudio.com/items?itemName=sakryukov.extensible-markdown)
Maximum number of paths between a pair of states is 5493.
Total number of paths: 1603536, longest path length: 23.

This documentation is generated from the extended Markdown documentation using [Extensible Markdown](https://marketplace.visualstudio.com/items?itemName=sakryukov.extensible-markdown)
for Visual Studio Code.{.extensible-markdown}

10 changes: 5 additions & 5 deletions docs/Example.Non-Emumeration.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="utf-8"/>
<style type="text/css">
@import url(https://SAKryukov.github.io/publications/code/documentation.css);
code { color: darkGreen; }
code { color: green; }
p.title { margin-top: 0; }
p.author { text-align: right; }
pre { margin-top: 0; margin-bottom: 0; }
Expand All @@ -17,11 +17,11 @@
</head>
<body>

<p class="title">Non-Enumeration Example</p><p><a href="https://github.com/SAKryukov/generic-state-machine/tree/main/code/Tests/Test.Non-Emumeration">Source code</a></p><p>The example demonstrate the case of using a non-enumeration type for the generic <code>STATE</code> type of a state machine.</p><pre lang="C#"><span class="_custom-word_ highlighter">StateMachine</span>&lt;<span class="type keyword highlighter">double</span>&gt; stateMachine = <span class="keyword highlighter">new</span>(<span class="type keyword highlighter">double</span>.<span class="literal keyword highlighter">NaN</span>);
</pre><p>The type <code>double</code> has 6 public static fields: <code>NegativeInfinity</code>, <code>MinValue</code>, <code>Epsilon</code>, <code>MaxValue</code>, <code>PositiveInfinity</code>, and <code>NaN</code>. They are used as the states.</p><p>Note that the default <code>double</code> value is not usable, because this is <code>0</code>, not corresponding the any of the <code>double</code> public static fields. Therefore, the call to the <a href="index.html#heading-public-constructor">constructor</a> specifies <code>NaN</code> as an initial state.</p><p>State transition graph:</p><pre>&minus;&#x221E; &#x21D4; MinValue &#x21D4; Epsilon &#x21D4; MaxValue &#x21D4; +&#x221E;;
<p class="title">Non-Enumeration Example</p><p><a href="https://github.com/SAKryukov/generic-state-machine/tree/main/code/Tests/Test.Non-Emumeration">Source code</a></p><p>This example shows the use of a non-enumerable type for the generic <code>STATE</code> type of a state machine.</p><pre lang="C#"><span class="_custom-word_ highlighter">StateMachine</span>&lt;<span class="type keyword highlighter">double</span>&gt; stateMachine = <span class="keyword highlighter">new</span>(<span class="type keyword highlighter">double</span>.<span class="literal keyword highlighter">NaN</span>);
</pre><p>The type <code>double</code> has 6 public static fields: <code>NegativeInfinity</code>, <code>MinValue</code>, <code>Epsilon</code>, <code>MaxValue</code>, <code>PositiveInfinity</code>, and <code>NaN</code>. They are used as the states.</p><p>Note that the default <code>double</code> value is not usable, because this is <code>0</code>, not corresponding to any of the <code>double</code> public static fields. Therefore, the call to the <a href="index.html#heading-public-constructor">constructor</a> specifies <code>NaN</code> as an initial state.</p><p>State transition graph:</p><pre>&minus;&#x221E; &#x21D4; MinValue &#x21D4; Epsilon &#x21D4; MaxValue &#x21D4; +&#x221E;;
MinValue &#x21D4; MaxValue
NaN &#x21D2; to any other state, but all the transition to NaN are invalid
</pre><p class="extensible-markdown">This documentaton is generated from the extended Markdown documentation using <a href="https://marketplace.visualstudio.com/items?itemName=sakryukov.extensible-markdown">Extensible Markdown</a>
NaN &#x21D2; to any other state, but all the transitions to NaN are invalid
</pre><p class="extensible-markdown">This documentation is generated from the extended Markdown documentation using <a href="https://marketplace.visualstudio.com/items?itemName=sakryukov.extensible-markdown">Extensible Markdown</a>
for Visual Studio Code.</p><script src="https://SAKryukov.github.io/publications/code/source-code-decorator.js"></script>


Expand Down
9 changes: 4 additions & 5 deletions docs/Example.Non-Emumeration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,25 @@ Non-Enumeration Example{title}

[Source code](https://github.com/SAKryukov/generic-state-machine/tree/main/code/Tests/Test.Non-Emumeration)

The example demonstrate the case of using a non-enumeration type for the generic `STATE` type of a state machine.
This example shows the use of a non-enumerable type for the generic `STATE` type of a state machine.

~~~{lang=C#}
<span class="_custom-word_ highlighter">StateMachine</span>&lt;<span class="type keyword highlighter">double</span>&gt; stateMachine = <span class="keyword highlighter">new</span>(<span class="type keyword highlighter">double</span>.<span class="literal keyword highlighter">NaN</span>);
~~~

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 the any of the `double` public static fields. Therefore, the call to the [constructor](index.html#heading-public-constructor) specifies `NaN` as an initial state.
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](index.html#heading-public-constructor) specifies `NaN` as an initial state.

State transition graph:

~~~
&minus;&#x221E; &#x21D4; MinValue &#x21D4; Epsilon &#x21D4; MaxValue &#x21D4; +&#x221E;;
MinValue &#x21D4; MaxValue
NaN &#x21D2; to any other state, but all the transition to NaN are invalid
NaN &#x21D2; to any other state, but all the transitions to NaN are invalid
~~~

This documentaton is generated from the extended Markdown documentation using [Extensible Markdown](https://marketplace.visualstudio.com/items?itemName=sakryukov.extensible-markdown)
This documentation is generated from the extended Markdown documentation using [Extensible Markdown](https://marketplace.visualstudio.com/items?itemName=sakryukov.extensible-markdown)
for Visual Studio Code.{.extensible-markdown}

<script src="https://SAKryukov.github.io/publications/code/source-code-decorator.js"></script>

4 changes: 2 additions & 2 deletions docs/Example.Zoo.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="utf-8"/>
<style type="text/css">
@import url(https://SAKryukov.github.io/publications/code/documentation.css);
code { color: darkGreen; }
code { color: green; }
p.title { margin-top: 0; }
p.author { text-align: right; }
pre { margin-top: 0; margin-bottom: 0; }
Expand All @@ -17,7 +17,7 @@
</head>
<body>

<p class="title">Zoo</p><p><a href="https://github.com/SAKryukov/generic-state-machine/tree/main/code/Tests/TestZoo">Source code</a></p><p>The Zoo example represents the state machine representing the visitor location at the zoo. This is the transition graph:</p><p><img src="zoo.svg" alt="Zoo" /></p><p>Note that all the transitions are <em>undirected</em> except the transition between Flamingo and Exit, because entering the zoo area using the exit is not allowed.</p><p>The example demonstrates valid transitions and the attemp to perform some invalid transitions. In particular, each attemt to enter the Chimpanzee area shows the message “Chimpanzee area is temporarily closed”.</p><p>The example also demonstrates <a href="index.html#heading-labyrinth">StateMachine.Labyrinth</a>, <a href="index.html#heading-longestpaths">StateMachine.LongestPaths</a> (<a href="https://en.wikipedia.org/wiki/NP-hardness">NP-hard</a>), <a href="index.html#heading-maximumpaths">StateMachine.MaximumPaths</a> (<a href="https://en.wikipedia.org/wiki/NP-hardness">NP-hard</a>), and <a href="index.html#heading-finddeadends">StateMachine.FindDeadEnds</a>.</p><p class="extensible-markdown">This documentaton is generated from the extended Markdown documentation using <a href="https://marketplace.visualstudio.com/items?itemName=sakryukov.extensible-markdown">Extensible Markdown</a>
<p class="title">Zoo</p><p><a href="https://github.com/SAKryukov/generic-state-machine/tree/main/code/Tests/TestZoo">Source code</a></p><p>The Zoo example represents the state machine representing the visitor location at the zoo. This is the transition graph:</p><p><img src="zoo.svg" alt="Zoo" /></p><p>Note that all the transitions are <em>undirected</em> except the transition between Flamingo and Exit, because entering the zoo area using the exit is not allowed.</p><p>The example demonstrates valid transitions and the attempt to perform some invalid transitions. In particular, each attempt to enter the Chimpanzee area shows the message “Chimpanzee area is temporarily closed”.</p><p>The example also demonstrates <a href="index.html#heading-labyrinth">StateMachine.Labyrinth</a>, <a href="index.html#heading-longestpaths">StateMachine.LongestPaths</a> (<a href="https://en.wikipedia.org/wiki/NP-hardness">NP-hard</a>), <a href="index.html#heading-maximumpaths">StateMachine.MaximumPaths</a> (<a href="https://en.wikipedia.org/wiki/NP-hardness">NP-hard</a>), and <a href="index.html#heading-finddeadends">StateMachine.FindDeadEnds</a>.</p><p class="extensible-markdown">This documentation is generated from the extended Markdown documentation using <a href="https://marketplace.visualstudio.com/items?itemName=sakryukov.extensible-markdown">Extensible Markdown</a>
for Visual Studio Code.</p>

</body>
Expand Down
4 changes: 2 additions & 2 deletions docs/Example.Zoo.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ The Zoo example represents the state machine representing the visitor location a

Note that all the transitions are *undirected* except the transition between Flamingo and Exit, because entering the zoo area using the exit is not allowed.

The example demonstrates valid transitions and the attemp to perform some invalid transitions. In particular, each attemt to enter the Chimpanzee area shows the message "Chimpanzee area is temporarily closed".
The example demonstrates valid transitions and the attempt to perform some invalid transitions. In particular, each attempt to enter the Chimpanzee area shows the message "Chimpanzee area is temporarily closed".

The example also demonstrates [StateMachine.Labyrinth](index.html#heading-labyrinth), [StateMachine.LongestPaths](index.html#heading-longestpaths) ([NP-hard](https://en.wikipedia.org/wiki/NP-hardness)), [StateMachine.MaximumPaths](index.html#heading-maximumpaths) ([NP-hard](https://en.wikipedia.org/wiki/NP-hardness)), and [StateMachine.FindDeadEnds](index.html#heading-finddeadends).

This documentaton is generated from the extended Markdown documentation using [Extensible Markdown](https://marketplace.visualstudio.com/items?itemName=sakryukov.extensible-markdown)
This documentation is generated from the extended Markdown documentation using [Extensible Markdown](https://marketplace.visualstudio.com/items?itemName=sakryukov.extensible-markdown)
for Visual Studio Code.{.extensible-markdown}
Loading

0 comments on commit bd61fe7

Please sign in to comment.