annotate Implab/Automaton/IAlphabet.cs @ 254:12c00235b105 v3

Добавлена метка v3.0.1-beta для набора изменений 34df34841225
author cin
date Mon, 12 Feb 2018 17:03:49 +0300
parents 0f70905b4652
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
162
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
1 using System;
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
2 using System.Collections.Generic;
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
3 using System.Linq;
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
4 using System.Text;
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
5 using System.Threading.Tasks;
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
6
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
7 namespace Implab.Automaton {
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
8 /// <summary>
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
9 /// Алфавит. Множество символов, которые разбиты на классы, при этом классы имеют непрерывную нумерацию,
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
10 /// что позволяет использовать их в качестве индексов массивов.
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
11 /// </summary>
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
12 /// <remarks>
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
13 /// <para>Алфавит является сюрьективным отображением множества символов в множество индексов, это позволяет сократить размер таблицы переходов автомата
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
14 /// для входных символов, которые для него не различимы.</para>
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
15 /// </remarks>
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
16 /// <typeparam name="TSymbol">Тип символов.</typeparam>
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
17 public interface IAlphabet<TSymbol> {
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
18 /// <summary>
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
19 /// Количество классов символов в алфавите.
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
20 /// </summary>
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
21 int Count { get; }
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
22
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
23 /// <summary>
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
24 /// Преобразует входной символ в индекс символа из алфавита.
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
25 /// </summary>
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
26 /// <param name="symobl">Исходный символ</param>
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
27 /// <returns>Индекс в алфавите</returns>
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
28 int Translate(TSymbol symobl);
171
0f70905b4652 Working on regular DFA
cin
parents: 162
diff changeset
29
0f70905b4652 Working on regular DFA
cin
parents: 162
diff changeset
30 bool Contains(TSymbol symbol);
0f70905b4652 Working on regular DFA
cin
parents: 162
diff changeset
31
0f70905b4652 Working on regular DFA
cin
parents: 162
diff changeset
32 IEnumerable<TSymbol> GetSymbols(int cls);
162
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
33 }
0526412bbb26 DFA refactoring
cin
parents:
diff changeset
34 }