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 6018, Mon Aug 22 11:34:41 2016 UTC
# Line 6  Line 6 
6   * @author Petr Savicky   * @author Petr Savicky
7   *   *
8   *   *
9   * Copyright (C) 2009, Christophe Dutang,   * Copyright (C) 2013, 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 61  Line 61 
61  static const R_CallMethodDef callMethods[] =  static const R_CallMethodDef callMethods[] =
62  {  {
63          {"doTorus", (DL_FUNC) &doTorus, 6},          {"doTorus", (DL_FUNC) &doTorus, 6},
64            {"doHalton", (DL_FUNC) &doHalton, 5},
65          {"doSetSeed", (DL_FUNC) &doSetSeed, 1},          {"doSetSeed", (DL_FUNC) &doSetSeed, 1},
66          {"doCongruRand", (DL_FUNC) &doCongruRand, 6},          {"doCongruRand", (DL_FUNC) &doCongruRand, 6},
67          {"doSFMersenneTwister", (DL_FUNC) &doSFMersenneTwister, 4},          {"doSFMersenneTwister", (DL_FUNC) &doSFMersenneTwister, 4},
# Line 78  Line 79 
79          //register method accessed with .Call          //register method accessed with .Call
80          R_registerRoutines(info, NULL, callMethods, NULL, NULL);          R_registerRoutines(info, NULL, callMethods, NULL, NULL);
81    
82          //make randtoolbox C functions available from other packages          //make randtoolbox C functions available for other packages
83          R_RegisterCCallable("randtoolbox", "torus", (DL_FUNC) torus);          R_RegisterCCallable("randtoolbox", "torus", (DL_FUNC) torus);
84            R_RegisterCCallable("randtoolbox", "halton", (DL_FUNC) halton);
85          R_RegisterCCallable("randtoolbox", "setSeed", (DL_FUNC) setSeed);          R_RegisterCCallable("randtoolbox", "setSeed", (DL_FUNC) setSeed);
86          R_RegisterCCallable("randtoolbox", "congruRand", (DL_FUNC) congruRand);          R_RegisterCCallable("randtoolbox", "congruRand", (DL_FUNC) congruRand);
87          R_RegisterCCallable("randtoolbox", "SFmersennetwister", (DL_FUNC) SFmersennetwister);          R_RegisterCCallable("randtoolbox", "SFmersennetwister", (DL_FUNC) SFmersennetwister);
# Line 89  Line 91 
91    
92                  //retrieve WELL rng entry point in the rngWELL pkg                  //retrieve WELL rng entry point in the rngWELL pkg
93                  WELLrng = (void (*) (double *, int, int, int, int, int)) R_GetCCallable("rngWELL", "WELLrng");                  WELLrng = (void (*) (double *, int, int, int, int, int)) R_GetCCallable("rngWELL", "WELLrng");
94                  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");
95                    /*getRngWELL = (void (*) (int *, int *, unsigned int *)) R_GetCCallable("rngWELL", "getRngWELL");
96                    putRngWELL = (void (*) (int *, int *, unsigned int *)) R_GetCCallable("rngWELL", "putRngWELL");
97                    initMT2002 = (void (*) (unsigned int *, int *, unsigned int *)) R_GetCCallable("rngWELL", "initMT2002");*/
98  }  }
99    

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

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