DIPlib Documentation - ©1995-2015 Quantitative Imaging Group, Delft University of Technology.

# RandomSeed

Initialise random number generator

## SYNOPSIS

`#include "dip_noise.h"`

dip_Error dip_RandomSeed ( random, seed )

## FUNCTION

Initializes a `dip_Random` structure using a given seed value. If `seed` is 0, the default value of 5489 is used instead, since 0 produces a uniquely poor initialisation.

## ARGUMENTS

Data type | Name | Description
`dip_Random *` | `random` | Pointer to a random value structure
`dip_uint32` | `seed` | Seed value

## EXAMPLE

Initialize a `dip_Random` structure as follows:

       dip_Random random;
       dip_uint32 seed;

       seed = 123758;
       DIPXJ( dip_RandomSeed( &random, seed ));

## SEE ALSO

`RandomSeedVector`, `RandomVariable`, `UniformRandomVariable`, `GaussianRandomVariable`, `PoissonRandomVariable`, `BinaryRandomVariable`