Vcsn  2.0
Be Rational
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
random.cc
Go to the documentation of this file.
1 #include <vcsn/algos/random.hh>
2 #include <vcsn/dyn/algos.hh>
4 
5 namespace vcsn
6 {
7  namespace dyn
8  {
9 
10  REGISTER_DEFINE(random);
11 
12  automaton
14  unsigned num_states, float density,
15  unsigned num_initial, unsigned num_final)
16  {
17  return detail::random_registry().call(ctx, num_states, density,
18  num_initial, num_final);
19  }
20 
21 
22  REGISTER_DEFINE(random_deterministic);
23 
24  automaton
25  random_automaton_deterministic(const context& ctx, unsigned num_states)
26  {
27  return detail::random_deterministic_registry().call(ctx, num_states);
28  }
29  }
30 }
automaton random_automaton_deterministic(const context &ctx, unsigned num_states)
Produce a random deterministic automaton.
Definition: random.cc:25
std::shared_ptr< detail::automaton_base > automaton
Definition: automaton.hh:71
mutable_automaton< Ctx > random(const Ctx &ctx, unsigned num_states, float density=0.1, unsigned num_initial=1, unsigned num_final=1)
Definition: random.hh:86
automaton random_automaton(const context &ctx, unsigned num_states, float density=0.1, unsigned num_initial=1, unsigned num_final=1)
Produce a random automaton.
Definition: random.cc:13
mutable_automaton< Ctx > random_deterministic(const Ctx &ctx, unsigned num_states)
Definition: random.hh:235
std::shared_ptr< const detail::context_base > context
Definition: context.hh:71