log
graph
tags
bookmarks
branches
changeset
browse
file
latest
diff
comparison
annotate
file log
raw
help
Mercurial
>
pub
>
ImplabNet
annotate Implab/Formats/ByteAlphabet.cs @ 262:
f1696cdc3d7a
v3
v3.0.8
Find changesets by keywords (author, files, the commit message), revision number or hash, or
revset expression
.
Added IInitializable.Initialize() overload Added IRunnable.Start(), IRunnable.Start() overloads Fixed cancellation of the current operation when Stop() is called More tests
author
cin
date
Mon, 16 Apr 2018 02:12:39 +0300 (2018-04-15)
parents
a0ff6a0e9c44
children
Ignore whitespace changes -
Everywhere:
Within whitespace:
At end of lines:
rev
line source
165
e227e78d72e4
DFA refactoring
cin
parents:
164
diff
changeset
+
−
1
using System.Collections.Generic;
164
ec35731ae299
Almost complete DFA refactoring
cin
parents:
diff
changeset
+
−
2
using System.Linq;
165
e227e78d72e4
DFA refactoring
cin
parents:
164
diff
changeset
+
−
3
using Implab.Automaton;
164
ec35731ae299
Almost complete DFA refactoring
cin
parents:
diff
changeset
+
−
4
165
e227e78d72e4
DFA refactoring
cin
parents:
164
diff
changeset
+
−
5
namespace Implab.Formats {
164
ec35731ae299
Almost complete DFA refactoring
cin
parents:
diff
changeset
+
−
6
public class ByteAlphabet : IndexedAlphabetBase<byte> {
ec35731ae299
Almost complete DFA refactoring
cin
parents:
diff
changeset
+
−
7
ec35731ae299
Almost complete DFA refactoring
cin
parents:
diff
changeset
+
−
8
#region implemented abstract members of IndexedAlphabetBase
ec35731ae299
Almost complete DFA refactoring
cin
parents:
diff
changeset
+
−
9
ec35731ae299
Almost complete DFA refactoring
cin
parents:
diff
changeset
+
−
10
public override int GetSymbolIndex(byte symbol) {
ec35731ae299
Almost complete DFA refactoring
cin
parents:
diff
changeset
+
−
11
return (int)symbol;
ec35731ae299
Almost complete DFA refactoring
cin
parents:
diff
changeset
+
−
12
}
ec35731ae299
Almost complete DFA refactoring
cin
parents:
diff
changeset
+
−
13
ec35731ae299
Almost complete DFA refactoring
cin
parents:
diff
changeset
+
−
14
public IEnumerable<byte> InputSymbols {
ec35731ae299
Almost complete DFA refactoring
cin
parents:
diff
changeset
+
−
15
get {
ec35731ae299
Almost complete DFA refactoring
cin
parents:
diff
changeset
+
−
16
return Enumerable.Range(byte.MinValue, byte.MaxValue).Cast<byte>();
ec35731ae299
Almost complete DFA refactoring
cin
parents:
diff
changeset
+
−
17
}
ec35731ae299
Almost complete DFA refactoring
cin
parents:
diff
changeset
+
−
18
}
ec35731ae299
Almost complete DFA refactoring
cin
parents:
diff
changeset
+
−
19
ec35731ae299
Almost complete DFA refactoring
cin
parents:
diff
changeset
+
−
20
#endregion
ec35731ae299
Almost complete DFA refactoring
cin
parents:
diff
changeset
+
−
21
}
ec35731ae299
Almost complete DFA refactoring
cin
parents:
diff
changeset
+
−
22
}
ec35731ae299
Almost complete DFA refactoring
cin
parents:
diff
changeset
+
−
23