PetscRandomSetInterval

Sets the interval over which the random numbers will be randomly distributed. By default, this interval is [0,1).

Synopsis

#include "petscsys.h" 
int PetscRandomSetInterval(PetscRandom r,PetscScalar low,PetscScalar high)
Collective on PetscRandom

Input Parameters

r -the random number generator context

Example of Usage

      PetscRandomCreate(PETSC_COMM_WORLD,RANDOM_DEFAULT,&r);
      PetscRandomSetInterval(RANDOM_DEFAULT,&r);
      PetscRandomGetValue(r,&value1);
      PetscRandomGetValue(r,&value2);
      PetscRandomDestroy(r);

See Also

PetscRandomCreate()

Level:intermediate
Location:
src/sys/src/utils/random.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages