SCM

SCM Repository

[rmetrics] Diff of /pkg/randtoolbox/src/init.c
ViewVC logotype

Diff of /pkg/randtoolbox/src/init.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4474, Sun Oct 4 10:50:15 2009 UTC revision 6028, Wed May 3 19:42:06 2017 UTC
# Line 6  Line 6 
6   * @author Petr Savicky   * @author Petr Savicky
7   *   *
8   *   *
9   * Copyright (C) 2009, Christophe Dutang,   * Copyright (C) 2017, Christophe Dutang,
10   * Petr Savicky, Academy of Sciences of the Czech Republic.   * Petr Savicky, Academy of Sciences of the Czech Republic.
11   * All rights reserved.   * All rights reserved.
12   *   *
13   * The new BSD License is applied to this software.   * The new BSD License is applied to this software.
14   * Copyright (c) 2009 Christophe Dutang, Petr Savicky.   * Copyright (c) 2013 Christophe Dutang, Petr Savicky.
15   * All rights reserved.   * All rights reserved.
16   *   *
17   *      Redistribution and use in source and binary forms, with or without   *      Redistribution and use in source and binary forms, with or without
# Line 60  Line 60 
60  //table of registration  //table of registration
61  static const R_CallMethodDef callMethods[] =  static const R_CallMethodDef callMethods[] =
62  {  {
63          {"doTorus", (DL_FUNC) &doTorus, 6},          {"doTorus", (DL_FUNC) &doTorus, 7},
64            {"doHalton", (DL_FUNC) &doHalton, 6},
65            {"doSobol", (DL_FUNC) &doSobol, 6},
66          {"doSetSeed", (DL_FUNC) &doSetSeed, 1},          {"doSetSeed", (DL_FUNC) &doSetSeed, 1},
67          {"doCongruRand", (DL_FUNC) &doCongruRand, 6},          {"doCongruRand", (DL_FUNC) &doCongruRand, 6},
68          {"doSFMersenneTwister", (DL_FUNC) &doSFMersenneTwister, 4},          {"doSFMersenneTwister", (DL_FUNC) &doSFMersenneTwister, 4},
# Line 78  Line 80 
80          //register method accessed with .Call          //register method accessed with .Call
81          R_registerRoutines(info, NULL, callMethods, NULL, NULL);          R_registerRoutines(info, NULL, callMethods, NULL, NULL);
82    
83          //make randtoolbox C functions available from other packages          //make randtoolbox C functions available for other packages
84          R_RegisterCCallable("randtoolbox", "torus", (DL_FUNC) torus);          R_RegisterCCallable("randtoolbox", "torus", (DL_FUNC) torus);
85            R_RegisterCCallable("randtoolbox", "halton", (DL_FUNC) halton);
86            R_RegisterCCallable("randtoolbox", "sobol", (DL_FUNC) halton);
87          R_RegisterCCallable("randtoolbox", "setSeed", (DL_FUNC) setSeed);          R_RegisterCCallable("randtoolbox", "setSeed", (DL_FUNC) setSeed);
88          R_RegisterCCallable("randtoolbox", "congruRand", (DL_FUNC) congruRand);          R_RegisterCCallable("randtoolbox", "congruRand", (DL_FUNC) congruRand);
89          R_RegisterCCallable("randtoolbox", "SFmersennetwister", (DL_FUNC) SFmersennetwister);          R_RegisterCCallable("randtoolbox", "SFmersennetwister", (DL_FUNC) SFmersennetwister);
# Line 89  Line 93 
93    
94                  //retrieve WELL rng entry point in the rngWELL pkg                  //retrieve WELL rng entry point in the rngWELL pkg
95                  WELLrng = (void (*) (double *, int, int, int, int, int)) R_GetCCallable("rngWELL", "WELLrng");                  WELLrng = (void (*) (double *, int, int, int, int, int)) R_GetCCallable("rngWELL", "WELLrng");
96                  WELL_get_set_entry_point =(void (*) (void *)) R_GetCCallable("rngWELL", "WELL_get_set_entry_point");                  WELL_get_set_entry_point =(void (*) (void (*)())) R_GetCCallable("rngWELL", "WELL_get_set_entry_point");
97                    /*getRngWELL = (void (*) (int *, int *, unsigned int *)) R_GetCCallable("rngWELL", "getRngWELL");
98                    putRngWELL = (void (*) (int *, int *, unsigned int *)) R_GetCCallable("rngWELL", "putRngWELL");
99                    initMT2002 = (void (*) (unsigned int *, int *, unsigned int *)) R_GetCCallable("rngWELL", "initMT2002");*/
100  }  }
101    

Legend:
Removed from v.4474  
changed lines
  Added in v.6028

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge