Interface IAlphabet
Common interface for an alphabet associated with a finite state automaton.
Namespace: Automata.Core
Assembly: Automata.Core.dll
Syntax
public interface IAlphabet
Properties
| Edit this page View SourceCount
Number of symbols in the alphabet.
Declaration
int Count { get; }
Property Value
Type | Description |
---|---|
int |
this[int]
Symbol at the specified index.
Declaration
string this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
int | index | Index of the symbol. |
Property Value
Type | Description |
---|---|
string | Symbol at the specified index. |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | Thrown when the index is out of range. |
this[string]
Index of the specified symbol.
Declaration
int this[string symbol] { get; }
Parameters
Type | Name | Description |
---|---|---|
string | symbol | Symbol to get the index of. |
Property Value
Type | Description |
---|---|
int | Index of the specified symbol, or InvalidSymbolIndex if the symbol does not exist. |
Symbols
Read-only collection of symbols in the alphabet.
Declaration
IReadOnlyCollection<string> Symbols { get; }
Property Value
Type | Description |
---|---|
IReadOnlyCollection<string> |
Methods
| Edit this page View SourceContains(string)
Indicates whether the alphabet contains the specified symbol.
Declaration
bool Contains(string symbol)
Parameters
Type | Name | Description |
---|---|---|
string | symbol | Symbol to check. |
Returns
Type | Description |
---|---|
bool | true
|
ToString()
String representation of the current alphabet.
Declaration
string ToString()
Returns
Type | Description |
---|---|
string | A string representation of the current alphabet. |
ToStringExpanded()
String with each symbol and its index, separated by a newline.
Declaration
string ToStringExpanded()
Returns
Type | Description |
---|---|
string | A string with each symbol and its index, separated by a newline. |