Package Overview

The Osys Random package allows creation of independent random number generators and generation of random numbers. Use Osys_Random_Stream_Handle_Create() to create a generator. Then use Osys_Random_Stream_Integer_Generate() or Osys_Random_Stream_Double_Generate() to generate random numbers. When you no longer need a particular random number generator, destroy it with Osys_Random_Stream_Handle_Destroy().

You can also generate random numbers from a specific distribution. Use Osys_Random_Distribution_Handle_Create() to get a handle to a predefined or custom distribution using specific arguments. You can confirm whether the distribution exists with Osys_Random_Distribution_Name_Exists(). Use Osys_Random_Distribution_Value_Generate() to get a random value from the distribution. Osys_Random_Distribution_Handle_Destroy() lets you free the distribution memory when the distribution is no longer needed.