The R Project SVN R

Rev

Rev 90299 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 90299 Rev 90310
Line 42... Line 42...
42
 
42
 
43
UnifInitFun User_unif_init = NULL; /* some picky compilers */
43
UnifInitFun User_unif_init = NULL; /* some picky compilers */
44
 
44
 
45
DL_FUNC  User_norm_fun = NULL; /* also in ../nmath/snorm.c */
45
DL_FUNC  User_norm_fun = NULL; /* also in ../nmath/snorm.c */
46
 
46
 
47
#include "nmath2.h"
-
 
48
static RNGtype RNG_kind = RNG_DEFAULT;
47
static RNGtype RNG_kind = RNG_DEFAULT;
-
 
48
#include "nmath2.h" /* ../nmath/nmath2.h : */
49
//extern N01type N01_kind; /* from ../nmath/snorm.c */
49
// extern N01type N01_kind; /* from ../nmath/snorm.c */
50
//extern double BM_norm_keep;   /* ../nmath/snorm.c */
50
// extern double BM_norm_keep;   /* ../nmath/snorm.c */
-
 
51
// extern Binomtype Binom_kind ; /* ../nmath/rbinom.c */
51
static Sampletype Sample_kind = Sample_DEFAULT;
52
static Sampletype Sample_kind = Sample_DEFAULT;
52
static Binomtype  Binom_kind = Binom_DEFAULT; /* --> ../nmath/rbinom.c */
-
 
-
 
53
 
53
 
54
 
54
 
55
 
55
/* typedef unsigned int Int32; in Random.h */
56
/* typedef unsigned int Int32; in Random.h */
56
 
57
 
57
/* .Random.seed == (RNGkind, i_seed[0],i_seed[1],..,i_seed[n_seed-1])
58
/* .Random.seed == (RNGkind, i_seed[0],i_seed[1],..,i_seed[n_seed-1])
Line 338... Line 339...
338
    return seeds;
339
    return seeds;
339
}
340
}
340
 
341
 
341
static void Randomize(RNGtype kind)
342
static void Randomize(RNGtype kind)
342
{
343
{
343
/* Only called by  GetRNGstate() when there is no .Random.seed */
344
/* called by  GetRNGstate() when there is no .Random.seed, also from FixupSeeds()  */
344
    RNG_Init(kind, TimeToSeed());
345
    RNG_Init(kind, TimeToSeed());
345
}
346
}
346
 
347
 
347
static bool GetRNGkind(SEXP seeds)
348
static bool GetRNGkind(SEXP seeds)
348
{
349
{
Line 916... Line 917...
916
    do { dv = rbits(bits); } while (dn <= dv);
917
    do { dv = rbits(bits); } while (dn <= dv);
917
    return dv;
918
    return dv;
918
}
919
}
919
 
920
 
920
Sampletype R_sample_kind(void) { return Sample_kind; }
921
Sampletype R_sample_kind(void) { return Sample_kind; }
921
Binomtype  R_binom_kind (void) { return Binom_kind; }
-
 
922
 
-