Skip to content
Snippets Groups Projects
Commit 2826a324 authored by Tomáš Pecka's avatar Tomáš Pecka
Browse files

RandNFA: Correctly create char alphabet

parent f9d832bb
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,7 @@ automaton::NFA < > RandomAutomatonFactory::generateNFA( size_t statesCount, size
throw exception::CommonException("Too big alphabet.");
 
std::vector<alphabet::Symbol> symbols;
for(int i = 0; i < 26; i++) symbols.push_back(alphabet::symbolFrom(i + 'a'));
for(int i = 0; i < 26; i++) symbols.push_back(alphabet::symbolFrom((char)(i + 'a')));
if(randomizedAlphabet) shuffle(symbols.begin(), symbols.end(), std::random_devices::semirandom);
std::deque<alphabet::Symbol> alphabet(symbols.begin(), symbols.begin() + alphabetSize);
 
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment