Class GraphFactory
Static class for creating displayable graphs from finite state automata.
Inherited Members
Namespace: Automata.Visualization
Assembly: Automata.Visualization.dll
Syntax
public static class GraphFactory
Methods
| Edit this page View SourceCreateGraph(IFsa, bool, LayerDirection, bool)
Creates a displayable graph from a finite state automaton (FSA).
Declaration
public static Graph CreateGraph(this IFsa fsa, bool displayStateIDs = false, LayerDirection layerDirection = LayerDirection.LR, bool directed = true)
Parameters
Type | Name | Description |
---|---|---|
IFsa | fsa | Finite state automaton to represent as a graph. |
bool | displayStateIDs | Indicates whether to display state IDs. |
LayerDirection | layerDirection | Layout direction of the graph (default: left-to-right). |
bool | directed | Indicates whether the graph is directed (default: true). |
Returns
Type | Description |
---|---|
Graph | A graph representing the finite state automaton. |
CreateGraph(IEnumerable<IEnumerable<string>>, bool)
Creates a displayable graph from a collection of sequences.
Declaration
public static Graph CreateGraph(this IEnumerable<IEnumerable<string>> sequences, bool minimize = true)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IEnumerable<string>> | sequences | Collection of sequences to create the graph from. |
bool | minimize | Indicates whether to minimize the DFA. |
Returns
Type | Description |
---|---|
Graph | A graph representing the finite state automaton. |