NAME
set_random_options - Change the library options pertaining to pseudorandom number generation
SYNOPSIS
#include "l/l_sys_rand.h"
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-I/home/kobus/include
-L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
int set_random_options
(
const char *option,
const char *value
);
DESCRIPTION
The "seed" option can be queried or set to change the state value in the
first PRNG. The first PRNG has 48 bits of state, which for convenience we
subdivide into a 32-bit chunk and a 16-bit chunk. The value string can have
a form like "123:456" which will assign 123 to the first chunk of PRNG
state, and 456 to the second chunk. Since the second chunk is only 16
bits, the value after the colon must not have a
magnitude that exceeds 16 bits, or else ERROR is returned.
Furthermore, if either or both values are stars, as in "123:*" or "*:*" then
the corresponding chunk(s) will be set, immediately, from the real-time
clock.
Option "seed-2" sets the state value in the second PRNG. The value string
may be a single ascii integer decimal value, or star. It works likewise.
If the 'value' string begins with '?' then the PRNG state will be printed to
standard output. If the 'value' string is null then this function returns
silently. If the 'value' string is empty then the PRNG state is printed in
a more verbose form.
RETURNS
NO_ERROR, if successful. ERROR is returned when the second chunk of the
first PRNG cannot store the value indicated by the 'value' string.
NOT_FOUND is returned when the 'option' string contains neither "seed"
nor "seed-2" exactly,
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Kobus Barnard
DOCUMENTER
Andrew Predoehl
SEE ALSO
kjb_rand
,
kjb_rand_st
,
kjb_seed_rand_with_tod
,
kjb_seed_rand
,
kjb_seed_rand_with_3_short
,
get_rand_seed
,
kjb_rand_2
,
kjb_rand_2_st
,
kjb_seed_rand_2_with_tod
,
kjb_seed_rand_2