gsl_rng__types.c 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /* rng/types.c
  2. *
  3. * Copyright (C) 2001, 2007 Brian Gough
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 3 of the License, or (at
  8. * your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  18. */
  19. #include "gsl__config.h"
  20. #include <stdlib.h>
  21. #include "gsl_rng.h"
  22. #define N 100
  23. const gsl_rng_type * gsl_rng_generator_types[N];
  24. #define ADD(t) {if (i==N) abort(); gsl_rng_generator_types[i] = (t); i++; };
  25. const gsl_rng_type **
  26. gsl_rng_types_setup (void)
  27. {
  28. int i = 0;
  29. ADD(gsl_rng_borosh13);
  30. ADD(gsl_rng_cmrg);
  31. ADD(gsl_rng_coveyou);
  32. ADD(gsl_rng_fishman18);
  33. ADD(gsl_rng_fishman20);
  34. ADD(gsl_rng_fishman2x);
  35. ADD(gsl_rng_gfsr4);
  36. ADD(gsl_rng_knuthran);
  37. ADD(gsl_rng_knuthran2);
  38. ADD(gsl_rng_knuthran2002);
  39. ADD(gsl_rng_lecuyer21);
  40. ADD(gsl_rng_minstd);
  41. ADD(gsl_rng_mrg);
  42. ADD(gsl_rng_mt19937);
  43. ADD(gsl_rng_mt19937_1999);
  44. ADD(gsl_rng_mt19937_1998);
  45. ADD(gsl_rng_r250);
  46. ADD(gsl_rng_ran0);
  47. ADD(gsl_rng_ran1);
  48. ADD(gsl_rng_ran2);
  49. ADD(gsl_rng_ran3);
  50. ADD(gsl_rng_rand);
  51. ADD(gsl_rng_rand48);
  52. ADD(gsl_rng_random128_bsd);
  53. ADD(gsl_rng_random128_glibc2);
  54. ADD(gsl_rng_random128_libc5);
  55. ADD(gsl_rng_random256_bsd);
  56. ADD(gsl_rng_random256_glibc2);
  57. ADD(gsl_rng_random256_libc5);
  58. ADD(gsl_rng_random32_bsd);
  59. ADD(gsl_rng_random32_glibc2);
  60. ADD(gsl_rng_random32_libc5);
  61. ADD(gsl_rng_random64_bsd);
  62. ADD(gsl_rng_random64_glibc2);
  63. ADD(gsl_rng_random64_libc5);
  64. ADD(gsl_rng_random8_bsd);
  65. ADD(gsl_rng_random8_glibc2);
  66. ADD(gsl_rng_random8_libc5);
  67. ADD(gsl_rng_random_bsd);
  68. ADD(gsl_rng_random_glibc2);
  69. ADD(gsl_rng_random_libc5);
  70. ADD(gsl_rng_randu);
  71. ADD(gsl_rng_ranf);
  72. ADD(gsl_rng_ranlux);
  73. ADD(gsl_rng_ranlux389);
  74. ADD(gsl_rng_ranlxd1);
  75. ADD(gsl_rng_ranlxd2);
  76. ADD(gsl_rng_ranlxs0);
  77. ADD(gsl_rng_ranlxs1);
  78. ADD(gsl_rng_ranlxs2);
  79. ADD(gsl_rng_ranmar);
  80. ADD(gsl_rng_slatec);
  81. ADD(gsl_rng_taus);
  82. ADD(gsl_rng_taus2);
  83. ADD(gsl_rng_taus113);
  84. ADD(gsl_rng_transputer);
  85. ADD(gsl_rng_tt800);
  86. ADD(gsl_rng_uni);
  87. ADD(gsl_rng_uni32);
  88. ADD(gsl_rng_vax);
  89. ADD(gsl_rng_waterman14);
  90. ADD(gsl_rng_zuf);
  91. ADD(0);
  92. return gsl_rng_generator_types;
  93. }