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

#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)
 

Detailed Description

Generator of random regexps.

The algorithm tries to generate a random regular expression with given number of leaf nodes and height.

Member Function Documentation

◆ generateUnboundedRegExp() [1/2]

template<class SymbolType >
regexp::UnboundedRegExp< SymbolType > regexp::generate::RandomRegExpFactory::generateUnboundedRegExp ( size_t  leafNodes,
size_t  height,
ext::set< SymbolType >  alphabet 
)
static

Generates a random regular expression.

Template Parameters
SymbolTypethe type of terminal symbols of the random automaton
Parameters
leafNodesnumber of leaf nodes in the generated regexp
heightthe height of the generated regular expression
alphabetthe alphabet of the regular expression
Returns
random regular expression
Here is the call graph for this function:

◆ generateUnboundedRegExp() [2/2]

regexp::UnboundedRegExp< std::string > regexp::generate::RandomRegExpFactory::generateUnboundedRegExp ( size_t  leafNodes,
size_t  height,
size_t  alphabetSize,
bool  randomizedAlphabet 
)
static

Generates a random regular expression.

Parameters
leafNodesnumber of leaf nodes in the generated regexp
heightthe height of the generated regular expression
alphabetSizesize of the alphabet (1-26)
randomizedAlphabetselects random symbols from a-z range if true
Returns
random regular expression
Here is the call graph for this function:
Here is the caller graph for this function:

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