Update META.yml
[Math-GSL.git] / QRNG.i
blob1b04004e7fe89bbc9e9b2df2c1126b370f6997f5
1 %module "Math::GSL::QRNG"
2 %include "typemaps.i"
3 %include "gsl_typemaps.i"
5 %apply double *OUTPUT { double x[] };
8 %typemap(argout) double x[] {
9 AV *tempav;
10 I32 len;
11 int i;
12 SV **tv;
13 if (argvi >= items) {
14 EXTEND(sp,1);
16 $result = sv_newmortal();
17 sv_setnv($result,(NV) *($1));
18 argvi++;
20 $result = sv_newmortal();
21 sv_setnv($result,(NV) *($1+1));
22 argvi++;
26 #include "gsl/gsl_types.h"
27 #include "gsl/gsl_qrng.h"
30 %include "gsl/gsl_types.h"
31 %include "gsl/gsl_qrng.h"
33 %perlcode %{
35 @EXPORT_OK = qw($gsl_qrng_niederreiter_2 $gsl_qrng_sobol $gsl_qrng_halton $gsl_qrng_reversehalton
36 gsl_qrng_alloc gsl_qrng_memcpy gsl_qrng_clone
37 gsl_qrng_free gsl_qrng_init gsl_qrng_name
38 gsl_qrng_size gsl_qrng_state gsl_qrng_get
40 %EXPORT_TAGS = ( all => [ @EXPORT_OK ] );
43 __END__
45 =head1 NAME
47 Math::GSL::QRNG - Quasi-random number generator
49 =head1 SYNOPSIS
51 use Math::GSL::QRNG qw/:all/;
53 =head1 DESCRIPTION
55 Here is a list of all the functions included in this module :
57 =over
59 =item C<gsl_qrng_alloc($T, $n)> - This function returns a pointer to a newly-created instance of a quasi-random sequence generator of type $T and dimension $d. The type $T must be one of the constants included in this module.
62 =item C<gsl_qrng_clone>
64 =item C<gsl_qrng_memcpy> -
66 =item C<gsl_qrng_free($q)> - This function frees all the memory associated with the generator $q.
68 =item C<gsl_qrng_init($q)> - This function reinitializes the generator $q to its starting point. Note that quasi-random sequences do not use a seed and always produce the same set of values.
70 =item C<gsl_qrng_name($q)> - This function returns a pointer to the name of the generator $q.
72 =item C<gsl_qrng_size>
74 =item C<gsl_qrng_state>
76 =item C<gsl_qrng_get>
78 =back
80 This module also contains the following constants :
82 =over
84 =item C<$gsl_qrng_niederreiter_2>
86 =item C<$gsl_qrng_sobol>
88 =item C<$gsl_qrng_halton>
90 =item C<$gsl_qrng_reversehalton>
92 =back
94 For more informations on the functions, we refer you to the GSL offcial documentation: L<http://www.gnu.org/software/gsl/manual/html_node/>
96 Tip : search on google: site:http://www.gnu.org/software/gsl/manual/html_node/ name_of_the_function_you_want
99 =head1 EXAMPLES
101 =head1 AUTHOR
103 Jonathan Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com>
105 =head1 COPYRIGHT AND LICENSE
107 Copyright (C) 2008 Jonathan Leto and Thierry Moisan
109 This program is free software; you can redistribute it and/or modify it
110 under the same terms as Perl itself.
112 =cut