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

#include <RandomTreeAutomatonFactory.h>

Static Public Member Functions

template<class SymbolType >
static automaton::NFTA< SymbolType, unsigned > generateNFTA (size_t statesCount, const ext::set< common::ranked_symbol< SymbolType > > &alphabet, double density)
 
static automaton::NFTA< std::string, unsigned > generateNFTA (size_t statesCount, size_t alphabetSize, size_t maxRank, bool randomizedAlphabet, double density)
 

Detailed Description

Generator of random automata.

The underlying generation algorithm is from Leslie, T: Efficient Approaches to Subset Construction, 1995.

Member Function Documentation

◆ generateNFTA() [1/2]

template<class SymbolType >
automaton::NFTA< SymbolType, unsigned > automaton::generate::RandomTreeAutomatonFactory::generateNFTA ( size_t  statesCount,
const ext::set< common::ranked_symbol< SymbolType > > &  alphabet,
double  density 
)
static

Generates a random finite automaton.

Template Parameters
SymbolTypethe type of terminal symbols of the random automaton
Parameters
statesCountnumber of states in the generated automaton
alphabetInput alphabet of the automaton
densitydensity of the transition function
Returns
random nondeterministic finite automaton

◆ generateNFTA() [2/2]

automaton::NFTA< std::string, unsigned > automaton::generate::RandomTreeAutomatonFactory::generateNFTA ( size_t  statesCount,
size_t  alphabetSize,
size_t  maxRank,
bool  randomizedAlphabet,
double  density 
)
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.

Parameters
statesCountnumber of states in the generated automaton
alphabetSizesize of the alphabet (1-26)
maxRankthe maximum rank in the randomly generated alphabet
randomizedAlphabetselects random symbols from a-z range if true
densitydensity of the transition function (0-100). 100 means every possible transition is created
Returns
random nondeterministic finite automaton
Here is the call graph for this function:

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