mzran.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2011 Equinor ASA, Norway.
3
4 The file 'mzran.h' is part of ERT - Ensemble based Reservoir Tool.
5
6 ERT is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 ERT is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE.
14
15 See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
16 for more details.
17*/
18
19#ifndef ERT_MZRAN_H
20#define ERT_MZRAN_H
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25#include <stdlib.h>
26#include <stdio.h>
27
28typedef struct mzran_struct mzran_type;
29
30#define MZRAN_MAX_VALUE 4294967296
31#define MZRAN_STATE_SIZE 16 /* Size of the seed buffer - in bytes. */
32
33
34void mzran_fscanf_state( void * __rng , FILE * stream );
35unsigned int mzran_forward(void * __rng);
36void * mzran_alloc( void );
37void mzran_set_state(void * __rng , const char * seed_buffer);
38void mzran_get_state(void * __rng , char * state_buffer);
40int mzran_get_int( mzran_type * rng, int max);
41void mzran_fprintf_state( const void * __rng , FILE * stream);
42void mzran_free( void * __rng );
43
44#ifdef __cplusplus
45}
46#endif
47#endif
void mzran_get_state(void *__rng, char *state_buffer)
void mzran_fprintf_state(const void *__rng, FILE *stream)
void mzran_free(void *__rng)
void mzran_fscanf_state(void *__rng, FILE *stream)
void mzran_set_state(void *__rng, const char *seed_buffer)
unsigned int mzran_forward(void *__rng)
double mzran_get_double(mzran_type *rng)
void * mzran_alloc(void)
int mzran_get_int(mzran_type *rng, int max)
struct mzran_struct mzran_type
Definition: mzran.hpp:28
T max(const T v0, const T v1)
Definition: exprtk.hpp:1407