18 #ifndef VCSN_TOOLS_GEN_RANDOM_HH
19 # define VCSN_TOOLS_GEN_RANDOM_HH
22 # include <vaucanson/algebra/implementation/monoid/monoid_rep.hh>
23 # include <vaucanson/automata/concept/transducer.hh>
30 # define ALPHABET_MAX_SIZE 1024
40 class GenRandomAutomataSet
44 template <
class AutoSet>
46 unsigned nb_letter = 0);
48 template <
class AutoSet>
50 unsigned input_nb_letter = 0,
51 unsigned output_nb_letter = 0);
59 template <
class TAutomata,
class AutomataSetGenerator = GenRandomAutomataSet>
60 class GenRandomAutomata
63 typedef typename TAutomata::set_t automata_set_t;
64 typedef typename TAutomata::hstate_t hstate_t;
69 TAutomata empty(
unsigned nb_letter = 0);
70 TAutomata empty(
const automata_set_t&
set);
72 TAutomata
generate(
unsigned nb_state,
unsigned nb_transition,
73 unsigned istate = 1,
unsigned fstate = 1,
74 unsigned nb_letter = 0);
75 TAutomata
generate(
const automata_set_t&
set,
76 unsigned nb_state,
unsigned nb_transition,
77 unsigned istate = 1,
unsigned fstate = 1);
79 TAutomata generate_dfa(
unsigned nb_state,
80 unsigned size_alphabet = 0,
82 TAutomata generate_dfa(
const automata_set_t&
set,
86 TAutomata generate_with_epsilon(
unsigned nb_state,
unsigned nb_transition,
87 unsigned nb_epsilon_min,
88 unsigned nb_epsilon_max);
89 TAutomata generate_with_epsilon(
const automata_set_t&
set,
90 unsigned nb_state,
unsigned nb_transition,
91 unsigned nb_epsilon_min,
92 unsigned nb_epsilon_max);
94 TAutomata generate_normalized(
unsigned nb_state,
unsigned density = 3);
95 TAutomata generate_normalized(
const automata_set_t&
set,
96 unsigned nb_state,
unsigned density = 3);
101 unsigned nb_transition_circle(TAutomata work, hstate_t state);
102 void del_transition_circle(TAutomata& work, hstate_t state);
106 static unsigned alea(
unsigned max);
112 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
113 # include <vaucanson/tools/gen_random.hxx>
114 # endif // VCSN_USE_INTERFACE_ONLY
116 #endif // ! VCSN_TOOLS_GEN_RANDOM_HH