|
Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
#include <RandomAutomatonFactory.h>
Static Public Member Functions | |
| template<class SymbolType > | |
| static automaton::NFA< SymbolType, unsigned > | generateNFA (size_t statesCount, const ext::set< SymbolType > &alphabet, double density) |
| static automaton::NFA< std::string, unsigned > | generateNFA (size_t statesCount, size_t alphabetSize, bool randomizedAlphabet, double density) |
Generator of random automata.
The underlying generation algorithm is from Leslie, T: Efficient Approaches to Subset Construction, 1995.
|
static |
Generates a random finite automaton.
| SymbolType | the type of terminal symbols of the random automaton |
| statesCount | number of states in the generated automaton |
| alphabet | Input alphabet of the automaton |
| density | density of the transition function (double from interval 0-100) |
|
static |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Generates a random finite automaton.
| statesCount | number of states in the generated automaton |
| alphabetSize | size of the alphabet (1-26) |
| randomizedAlphabet | selects random symbols from a-z range if true |
| density | density of the transition function (0-100). 100 means every possible transition is created |