introduce include file "ngspice/randnumb.h"

This commit is contained in:
h_vogt 2016-08-05 16:03:56 +02:00 committed by rlar
parent c4cd2270ed
commit 9f62057973
15 changed files with 29 additions and 33 deletions

View File

@ -40,6 +40,7 @@ Author: 1985 Wayne A. Christopher
#include "numparam/numpaif.h"
#include "ngspice/stringskip.h"
#include "ngspice/randnumb.h"
#define line_free(line, flag) \

View File

@ -16,8 +16,7 @@
/* random numbers in /maths/misc/randnumb.c */
extern double gauss0(void);
extern double drand(void);
#include "ngspice/randnumb.h"
/************ keywords ************/

View File

@ -20,6 +20,7 @@
#include <math.h>
#include "ngspice/wallace.h"
#include "ngspice/FastNorm3.h"
#include "ngspice/randnumb.h"
#define POOLSIZE 4096
#define LPOOLSIZE 12
@ -42,11 +43,6 @@ static unsigned n = POOLSIZE;
static double chi1, chi2; /* chi^2 correction values */
static unsigned int newpools;
extern double drand(void);
extern unsigned int CombLCGTausInt(void);
extern void TausSeed(void);
extern unsigned int CombLCGTausInt2(void);
void
PolarGauss(double* py1, double* py2)

View File

@ -1,8 +1,4 @@
extern double drand(void);
extern double exprand(double);
extern int poisson(double);
extern double gauss0(void);
#include "ngspice/randnumb.h"
void f_alpha(int n_pts, int n_exp, double X[], double Q_d,
double alpha);

View File

@ -277,8 +277,6 @@ extern struct plot *raw_read(char *name);
extern bool do_measure(char *what, bool chk_only);
extern bool check_autostop(char *what);
/* randnumb.c */
extern void TausSeed(void);
/* resource.c */
extern void ft_ckspace(void);

View File

@ -0,0 +1,17 @@
#ifndef ngspice_RANDNUMB_H
#define ngspice_RANDNUMB_H
/* initialize random number generators */
extern void initw(void);
extern void checkseed(void); /* seed random or set by 'set rndseed=value'*/
extern double drand(void);
extern double gauss0(void);
extern int poisson(double);
extern double exprand(double);
extern void TausSeed(void);
extern unsigned int CombLCGTausInt(void);
extern unsigned int CombLCGTausInt2(void);
#endif

View File

@ -17,6 +17,4 @@ double NewWa(void); /* generate new pool, return outgauss[0] */
#define GaussWa ((--variate_used)?(outgauss[variate_used]*ScaleGauss):NewWa())
void initw(void); /* initialization of Wallace generator */
void PolarGauss(double* py1, double* py2);

View File

@ -52,6 +52,7 @@ extern int rl_catch_signals; /* missing from editline/readline.h */
#include "frontend/signal_handler.h"
#include "frontend/misccoms.h"
#include "ngspice/compatmode.h"
#include "ngspice/randnumb.h"
/* saj xspice headers */
#ifdef XSPICE
@ -205,8 +206,6 @@ extern void OUTerrorf(int, const char *fmt, ...);
extern int OUTattributes(runDesc *, IFuid, int, IFvalue *);
extern void initw(void);
IFfrontEnd nutmeginfo = {
IFnewUid,
IFdelUid,

View File

@ -18,18 +18,12 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
#include "ngspice/ngspice.h"
#include "ngspice/cpdefs.h"
#include "ngspice/dvec.h"
#include "ngspice/randnumb.h"
#include "cmath.h"
#include "cmath2.h"
extern void checkseed(void); /* seed random or set by 'set rndseed=value'*/
extern double drand(void); /* from randnumb.c */
extern double gauss0(void); /* from randnumb.c */
extern int poisson(double); /* from randnumb.c */
extern double exprand(double); /* from randnumb.c */
static double
cx_max_local(void *data, short int type, int length)
{

View File

@ -39,6 +39,7 @@ Copyright 2008 Holger Vogt
#include "ngspice/ngspice.h"
#include "ngspice/cpdefs.h"
#include "ngspice/ftedefs.h"
#include "ngspice/randnumb.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
@ -62,15 +63,8 @@ static unsigned LGCS(unsigned *state, unsigned A1, unsigned A2);
double CombLCGTaus(void);
float CombLCGTaus2(void);
unsigned int CombLCGTausInt(void);
unsigned int CombLCGTausInt2(void);
double exprand(double);
void checkseed(void);
double drand(void);
double gauss0(void);
void rgauss(double* py1, double* py2);
int poisson(double);
/* Check if a seed has been set by the command 'set rndseed=value'

View File

@ -60,6 +60,7 @@ myfputc(int inp, FILE* f)
#include "ngspice/ngspice.h"
#include "misc/misc_time.h"
#include "ngspice/randnumb.h"
/*Use Windows threads if on W32 without pthreads*/
#ifndef HAVE_LIBPTHREAD
@ -170,7 +171,6 @@ extern void DevInit(void);
extern int SIMinit(IFfrontEnd *frontEnd, IFsimulator **simulator);
extern wordlist *cp_varwl(struct variable *var);
extern void create_circbyline(char *line);
extern void initw(void);
/*The current run (to get variable names, etc)*/

View File

@ -26,6 +26,7 @@
/**********************************************************************/
#include "ngspice/ngspice.h"
#include "ngspice/randnumb.h"
#include "misc/misc_time.h"
#include <tcl.h>

View File

@ -398,6 +398,7 @@
<ClInclude Include="..\src\include\ngspice\profile.h" />
<ClInclude Include="..\src\include\ngspice\pssdefs.h" />
<ClInclude Include="..\src\include\ngspice\pzdefs.h" />
<ClInclude Include="..\src\include\ngspice\randnumb.h" />
<ClInclude Include="..\src\include\ngspice\sen2defs.h" />
<ClInclude Include="..\src\include\ngspice\sensdefs.h" />
<ClInclude Include="..\src\include\ngspice\sensgen.h" />

View File

@ -1015,6 +1015,7 @@ lib /machine:x64 /def:..\..\fftw-3.3.4-dll64\libfftw3-3.def /out:$(IntDir)libfft
<ClInclude Include="..\src\include\ngspice\profile.h" />
<ClInclude Include="..\src\include\ngspice\pssdefs.h" />
<ClInclude Include="..\src\include\ngspice\pzdefs.h" />
<ClInclude Include="..\src\include\ngspice\randnumb.h" />
<ClInclude Include="..\src\include\ngspice\sen2defs.h" />
<ClInclude Include="..\src\include\ngspice\sensdefs.h" />
<ClInclude Include="..\src\include\ngspice\sensgen.h" />

View File

@ -981,6 +981,7 @@
<ClInclude Include="..\src\include\ngspice\profile.h" />
<ClInclude Include="..\src\include\ngspice\pssdefs.h" />
<ClInclude Include="..\src\include\ngspice\pzdefs.h" />
<ClInclude Include="..\src\include\ngspice\randnumb.h" />
<ClInclude Include="..\src\include\ngspice\sen2defs.h" />
<ClInclude Include="..\src\include\ngspice\sensdefs.h" />
<ClInclude Include="..\src\include\ngspice\sensgen.h" />