Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
#include <RandomRegExpFactory.h>
Static Public Member Functions | |
static regexp::UnboundedRegExp< std::string > | generateUnboundedRegExp (size_t leafNodes, size_t height, size_t alphabetSize, bool randomizedAlphabet) |
template<class SymbolType > | |
static regexp::UnboundedRegExp< SymbolType > | generateUnboundedRegExp (size_t leafNodes, size_t height, ext::set< SymbolType > alphabet) |
Generator of random regexps.
The algorithm tries to generate a random regular expression with given number of leaf nodes and height.
|
static |
Generates a random regular expression.
SymbolType | the type of terminal symbols of the random automaton |
leafNodes | number of leaf nodes in the generated regexp |
height | the height of the generated regular expression |
alphabet | the alphabet of the regular expression |
|
static |
Generates a random regular expression.
leafNodes | number of leaf nodes in the generated regexp |
height | the height of the generated regular expression |
alphabetSize | size of the alphabet (1-26) |
randomizedAlphabet | selects random symbols from a-z range if true |