Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Static Public Member Functions
automaton::generate::NumberOfSymbolsAutomaton Class Reference

#include <NumberOfSymbolsAutomaton.h>

Static Public Member Functions

template<class SymbolType >
static automaton::NFA< SymbolType, unsigned > generateNFA (size_t modulo, const ext::set< SymbolType > &alphabet, SymbolType symbol, size_t final_modulo)
 
static automaton::NFA< std::string, unsigned > generateNFA (size_t modulo, size_t alphabetSize, bool randomizedAlphabet, char symbol, size_t final_modulo)
 

Detailed Description

Algorithm NFA accepting strings with given number of symbols A modulo N.

Member Function Documentation

◆ generateNFA() [1/2]

template<class SymbolType >
automaton::NFA< SymbolType, unsigned > automaton::generate::NumberOfSymbolsAutomaton::generateNFA ( size_t  modulo,
const ext::set< SymbolType > &  alphabet,
SymbolType  symbol,
size_t  final_modulo 
)
static

Generates automaton accepting strings over alphabet where the number of symbol given by symbol is modulo modulo equal to final_modulo.

Template Parameters
SymbolTypethe type of terminal symbols of the random automaton
Parameters
modulonumber of symbols to modulo by
alphabetInput alphabet of the automaton
symbolthe counted symbol
final_modulonumber of symbols to recognise mod modulo
Returns
nondeterministic finite automaton
Here is the caller graph for this function:

◆ generateNFA() [2/2]

automaton::NFA< std::string, unsigned > automaton::generate::NumberOfSymbolsAutomaton::generateNFA ( size_t  modulo,
size_t  alphabetSize,
bool  randomizedAlphabet,
char  symbol,
size_t  final_modulo 
)
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Generates automaton accepting strings over alphabet where the number of symbol given by symbol is modulo modulo equal to final_modulo.

Parameters
modulonumber of symbols to modulo by
alphabetSizesize of the alphabet (1-26)
randomizedAlphabetselects random symbols from a-z range if true
symbolthe counted symbol
final_modulonumber of symbols to recognise mod modulo
Returns
nondeterministic finite automaton
Here is the call graph for this function:

The documentation for this class was generated from the following files: