SCM

SCM Repository

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

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

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

revision 6135, Thu Nov 29 11:07:56 2018 UTC revision 6136, Tue Apr 30 12:56:05 2019 UTC
# Line 6  Line 6 
6   * @author Petr Savicky   * @author Petr Savicky
7   *   *
8   *   *
9   * Copyright (C) 2014, Christophe Dutang,   * Copyright (C) 2019, Christophe Dutang,
10   * Petr Savicky, Academy of Sciences of the Czech Republic.   * Petr Savicky, Academy of Sciences of the Czech Republic.
11     * Christophe Dutang, see http://dutangc.free.fr
12   * All rights reserved.   * All rights reserved.
13   *   *
14   * The new BSD License is applied to this software.   * The new BSD License is applied to this software.
15   * Copyright (c) 2014 Christophe Dutang, Petr Savicky.   * Copyright (c) 2019 Christophe Dutang, Petr Savicky.
16   * All rights reserved.   * All rights reserved.
17   *   *
18   *      Redistribution and use in source and binary forms, with or without   *      Redistribution and use in source and binary forms, with or without
# Line 186  Line 187 
187  // .C entry point used by put.description  // .C entry point used by put.description
188  void put_state_congru(char **params, char **seed, int *err)  void put_state_congru(char **params, char **seed, int *err)
189  {  {
190      error(_("temporarily disabled function"));
191    
192      /*
193          uint64_t inp_mod, inp_mask, inp_mult, inp_incr, inp_seed;          uint64_t inp_mod, inp_mask, inp_mult, inp_incr, inp_seed;
   Rprintf("p1\n");  
194          if (strcmp(params[0], two_64_s) == 0) {          if (strcmp(params[0], two_64_s) == 0) {
195                  inp_mod = 0;                  inp_mod = 0;
196                  inp_mask = two_64m1_h;                  inp_mask = two_64m1_h;
# Line 203  Line 206 
206          sscanf(params[2], "%" SCNu64 "\n", &inp_incr);          sscanf(params[2], "%" SCNu64 "\n", &inp_incr);
207          sscanf(seed[0], "%" SCNu64 "\n", &inp_seed);          sscanf(seed[0], "%" SCNu64 "\n", &inp_seed);
208    
         Rprintf("mult", "%" PRIu64 "\n", inp_mult);  
         Rprintf("mod", "%" PRIu64 "\n", inp_mod);  
         Rprintf("mask", "%" PRIu64 "\n", inp_mask);  
         Rprintf("incr", "%" PRIu64 "\n", inp_incr);  
         Rprintf("seed", "%" PRIu64 "\n", inp_seed);  
   
   
209          *err = check_congruRand(inp_mod, inp_mask, inp_mult, inp_incr, inp_seed);          *err = check_congruRand(inp_mod, inp_mask, inp_mult, inp_incr, inp_seed);
210    
   Rprintf("\nresult of check_congruRand() %d\n", *err);  
   
211          if (*err < 0) return;          if (*err < 0) return;
212          mod = inp_mod;          mod = inp_mod;
213          mask = inp_mask;          mask = inp_mask;
# Line 231  Line 225 
225                  user_unif_set_generator(1, user_unif_init_congru, user_unif_rand_congru_2);                  user_unif_set_generator(1, user_unif_init_congru, user_unif_rand_congru_2);
226          }          }
227          *err = 0;          *err = 0;
228            */
229  }  }
230    

Legend:
Removed from v.6135  
changed lines
  Added in v.6136

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