annotate Implab/Formats/ByteAlphabet.cs @ 164:ec35731ae299 ref20160224

Almost complete DFA refactoring
author cin
date Thu, 25 Feb 2016 02:11:13 +0300
parents
children e227e78d72e4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
164
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
1 using System;
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
2 using System.Collections.Generic;
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
3 using System.Linq;
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
4
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
5 namespace Implab.Automaton {
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 public ByteAlphabet() : base(byte.MaxValue + 1){
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
8 }
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
9
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
10 #region implemented abstract members of IndexedAlphabetBase
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
11
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
12 public override int GetSymbolIndex(byte symbol) {
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
13 return (int)symbol;
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
14 }
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
15
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
16 public IEnumerable<byte> InputSymbols {
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
17 get {
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
18 return Enumerable.Range(byte.MinValue, byte.MaxValue).Cast<byte>();
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
19 }
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
20 }
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
21
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
22 #endregion
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
23 }
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
24 }
ec35731ae299 Almost complete DFA refactoring
cin
parents:
diff changeset
25