C routines to use pseudo-random number generator in Fortran.
More...
#include <assert.h>
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <cfortran.h>
#include "core.h"
#include "yarandom.h"
#include "ppm_random.h"
#include "ppm_extents.h"
|
int | PPM_irand (void) |
|
int | PPM_irandp () |
|
int | PPM_irandr (struct PPM_iinterval range) |
|
void | PPM_irand_a (int *a, size_t n) |
|
void | PPM_irandp_a (int *a, size_t n) |
|
void | PPM_irandr_a (int *a, size_t n, struct PPM_iinterval range) |
|
int64_t | PPM_irand8 (void) |
|
int64_t | PPM_irandp8 () |
|
int64_t | PPM_irandr8 (struct PPM_iinterval64 range) |
|
void | PPM_irand8_a (int64_t *a, size_t n) |
|
void | PPM_irandp8_a (int64_t *a, size_t n) |
|
void | PPM_irandr8_a (int64_t *a, size_t n, struct PPM_iinterval64 range) |
|
double | PPM_drand () |
|
double | PPM_drandp () |
|
double | PPM_drandr (struct PPM_iinterval_dp range) |
|
void | PPM_drand_a (double *a, size_t n) |
|
void | PPM_drandp_a (double *a, size_t n) |
|
void | PPM_drandr_a (double *a, size_t n, struct PPM_iinterval_dp range) |
|
float | PPM_frand () |
|
float | PPM_frandp () |
|
float | PPM_frandr (struct PPM_iinterval_sp range) |
|
void | PPM_frand_a (float *a, size_t n) |
|
void | PPM_frandp_a (float *a, size_t n) |
|
void | PPM_frandr_a (float *a, size_t n, struct PPM_iinterval_sp range) |
|
C routines to use pseudo-random number generator in Fortran.
- Copyright
- Copyright (C) 2011 Thomas Jahns jahns.nosp@m.@dkr.nosp@m.z.de
- Version
- 1.0
- Author
- Thomas Jahns jahns.nosp@m.@dkr.nosp@m.z.de
◆ PPM_drand()
double PPM_drand |
( |
void |
| ) |
|
PRNG function for uniformly distributed double precision floating-point quantities. This routine is synonymous with PPM_ya_fsgrandom.
- Returns
- random number in range (-1.0,1.0)
◆ PPM_drand_a()
void PPM_drand_a |
( |
double * |
a, |
|
|
size_t |
n |
|
) |
| |
PRNG function for array of type double
- Parameters
-
a | pointer to array to fill with random numbers in range (-1.0,1.0) |
n | number of elements in a to fill |
◆ PPM_drandp()
double PPM_drandp |
( |
void |
| ) |
|
PRNG function for uniformly distributed double precision floating-point quantities. This routine is synonymous with PPM_ya_frandom.
- Returns
- random number in range [0.0,1.0)
◆ PPM_drandp_a()
void PPM_drandp_a |
( |
double * |
a, |
|
|
size_t |
n |
|
) |
| |
PRNG function for array of type double
- Parameters
-
a | pointer to array to fill with random numbers in range [0.0,1.0) |
n | number of elements in a to fill |
◆ PPM_drandr()
PRNG function for uniformly distributed double precision floating-point quantities This routine is synonymous with PPM_drandp.
- Parameters
-
range | range in which to generate random numbers |
- Returns
- random number in range [range.first,range.last]
◆ PPM_drandr_a()
PRNG function for array of type double
- Parameters
-
a | pointer to array to fill with random numbers in range [range.first,range.last] |
n | number of elements in a to fill |
range | range in which to generate random numbers |
◆ PPM_frand()
PRNG function for uniformly distributed single precision floating-point quantities. This routine is synonymous with PPM_ya_fsgrandom.
- Returns
- random number in range (-1.0,1.0)
◆ PPM_frand_a()
void PPM_frand_a |
( |
float * |
a, |
|
|
size_t |
n |
|
) |
| |
PRNG function for array of type float
- Parameters
-
a | pointer to array to fill with random numbers in range (-1.0,1.0) |
n | number of elements in a to fill |
◆ PPM_frandp()
float PPM_frandp |
( |
void |
| ) |
|
PRNG function for uniformly distributed single precision floating-point quantities. This routine is synonymous with PPM_ya_frandom.
- Returns
- random number in range [0.0,1.0)
◆ PPM_frandp_a()
void PPM_frandp_a |
( |
float * |
a, |
|
|
size_t |
n |
|
) |
| |
PRNG function for array of type float
- Parameters
-
a | pointer to array to fill with random numbers in range [0.0,1.0) |
n | number of elements in a to fill |
◆ PPM_frandr()
PRNG function for uniformly distributed single precision floating-point quantities This routine is synonymous with PPM_frandp.
- Parameters
-
range | range in which to generate random numbers |
- Returns
- random number in range [range.first,range.last]
◆ PPM_frandr_a()
PRNG function for array of type float
- Parameters
-
a | pointer to array to fill with random numbers in range [range.first,range.last] |
n | number of elements in a to fill |
range | range in which to generate random numbers |
◆ PPM_irand()
PRNG function for type int
- Returns
- random number in range [IRAND_MIN,IRAMD_MAX]
◆ PPM_irand8()
int64_t PPM_irand8 |
( |
void |
| ) |
|
PRNG function for type int int64_t
- Returns
- random number in range [-2^64+1,2^64-1]
◆ PPM_irand_a()
void PPM_irand_a |
( |
int * |
a, |
|
|
size_t |
n |
|
) |
| |
PRNG function for array of type int
- Parameters
-
a | pointer to array to fill with random numbers in range [IRAND_MIN,IRAMD_MAX] |
n | number of elements in a to fill |
◆ PPM_irandp()
PRNG function for type int
- Returns
- random number in range [0,IRAND_MAX]
◆ PPM_irandp_a()
void PPM_irandp_a |
( |
int * |
a, |
|
|
size_t |
n |
|
) |
| |
PRNG function for array of type int
- Parameters
-
a | pointer to array to fill with random numbers in range [0,IRAMD_MAX] |
n | number of elements in a to fill |
◆ PPM_irandr()
PRNG function for type int
- Parameters
-
range | range in which to generate random number |
- Returns
- random number in range [range.first,range.last]
◆ PPM_irandr8()
PRNG function for type int
- Parameters
-
range | range in which to generate random number |
- Returns
- random number in range [range.first,range.last]
◆ PPM_irandr_a()
void PPM_irandr_a |
( |
int * |
a, |
|
|
size_t |
n, |
|
|
struct PPM_iinterval |
range |
|
) |
| |
PRNG function for array of type int
- Parameters
-
a | pointer to array to fill with random numbers in range [range.first,range.last] |
n | number of elements in a to fill |
range | range in which to generate random numbers |
Das diesem Bericht zugrundeliegende Vorhaben wurde mit Mitteln des Bundesministeriums für Bildung, und Forschung unter dem Förderkennzeichen 01IH08004E gefördert. Die Verantwortung für den Inhalt dieser Veröffentlichung liegt beim Autor.