Actual source code: randomimpl.h

petsc-3.3-p7 2013-05-11
  2: #ifndef __PETSCRANDOMIMPL_H

  5: #include <petscsys.h>

  7: typedef struct _PetscRandomOps *PetscRandomOps;
  8: struct _PetscRandomOps {
  9:   /* 0 */
 10:   PetscErrorCode  (*seed)(PetscRandom);
 11:   PetscErrorCode  (*getvalue)(PetscRandom,PetscScalar*);
 12:   PetscErrorCode  (*getvaluereal)(PetscRandom,PetscReal*);
 13:   PetscErrorCode  (*destroy)(PetscRandom);
 14:   PetscErrorCode  (*setfromoptions)(PetscRandom);
 15: };

 17: struct _p_PetscRandom {
 18:   PETSCHEADER(struct _PetscRandomOps);
 19:   void        *data;           /* implementation-specific data */
 20:   unsigned    long seed;
 21:   PetscScalar low,width;       /* lower bound and width of the interval over
 22:                                   which the random numbers are distributed */
 23:   PetscBool   iset;            /* if true, indicates that the user has set the interval */
 24:   /* array for shuffling ??? */
 25: };

 27: #endif