#ifndef _RANDOM_H_
#define _RANDOM_H_

#ifndef RANDOM_DEV
#define RANDOM_DEV "/dev/urandom"
#endif

/*! \file random.h
    \brief Some helper functions to deal with pseudo random numbers
 */

/*! \brief Initializes pseudo random generator.
 *
 * \return used seed, falls back to 1, if /dev/some_random failed
 */
unsigned int random_init();

/*! \brief Computes a random index.
 *
 * \return random Integer r, with \f$0 <= r < n\f$
 */
int random_index(int n);

#endif
