- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

# random.hh File Reference

Definition of random generators. More...

Include dependency graph for random.hh:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Namespaces
namespace | vcsn
namespace | vcsn::misc
namespace | vcsn::misc::random
## Small alphabetic letters random generation tools.
typedef vcsn::algebra::static_char_interval <'a', 'z'> | small_alpha_interval_t
typedef vcsn::algebra::static_ranged < char, small_alpha_interval_t > | small_alpha_letter_t
template<>
small_alpha_letter_t | generate< small_alpha_letter_t > ()
| Generates a random small alphabetic letter.
## Functions
template<typename T>
T | generate ()
| Generate a random value.
template<typename T>
T | generate (T min, T max)
| Generate a random value between bounds.
template<>
char | generate< char > ()
| Generate a random character.
template<>
char | generate< char > (char min, char max)
| Generate a random character between bounds.
char | generate_letter ()
| Generate a random lowercase letter.
char | generate_digit ()
| Generate a random digit.
template<>
bool | generate< bool > ()
| Generate a random Boolean.
template<>
int | generate< int > ()
| Generate a random integer.
template<>
int | generate< int > (int min, int max)
| Generate a random integer between two bounds.
template<>
unsigned | generate< unsigned > ()
| Generate a random unsigned integer.
template<>
unsigned | generate< unsigned > (unsigned min, unsigned max)
| Generate a random unsigned between two bounds.
template<>
float | generate< float > ()
| Generate a random float between -2 and 2.
template<>
float | generate< float > (float min, float max)
| Generate a random float between min and max.
template<>
double | generate< double > ()
| Generate a random double between -2 and 2.
template<>
double | generate< double > (double min, double max)
| Generate a random double between min and max.
template<class InputIterator, class OutputIterator>
void | sample_n (InputIterator first, InputIterator end, OutputIterator out, unsigned n)
| Generate of n sample from a range to an output iterator.
template<>
vcsn::algebra::RationalNumber | generate< vcsn::algebra::RationalNumber > ()
| Generate a random rational number.
template<>
vcsn::algebra::RationalNumber | generate< vcsn::algebra::RationalNumber > (const vcsn::algebra::RationalNumber min, const vcsn::algebra::RationalNumber max)
| Generates a bounded random rational number.
template<>
std::pair< char, int > | generate< std::pair< char, int > > ()
| Generate a random std::pair<char, int>.

## Detailed Description

Definition of random generators.

Definition in file random.hh.