Finishing fixing BLAS test, rank-1 and rank-2 update functions still confuse me
[Math-GSL.git] / QRNG.i
blobd230efd74edf3877671d916fb1b2ffaaa049827f
1 %module QRNG
3 %include "typemaps.i"
4 %include "gsl_typemaps.i"
6 %apply double *OUTPUT { double x[] };
9 %typemap(argout) double x[] {
10 AV *tempav;
11 I32 len;
12 int i;
13 SV **tv;
14 if (argvi >= items) {
15 EXTEND(sp,1);
17 $result = sv_newmortal();
18 sv_setnv($result,(NV) *($1));
19 argvi++;
21 $result = sv_newmortal();
22 sv_setnv($result,(NV) *($1+1));
23 argvi++;
27 #include "gsl/gsl_types.h"
28 #include "gsl/gsl_qrng.h"
31 %include "gsl/gsl_types.h"
32 %include "gsl/gsl_qrng.h"
34 %perlcode %{
36 @EXPORT_OK = qw($gsl_qrng_niederreiter_2 $gsl_qrng_sobol $gsl_qrng_halton $gsl_qrng_reversehalton
37 gsl_qrng_alloc gsl_qrng_memcpy gsl_qrng_clone
38 gsl_qrng_free gsl_qrng_init gsl_qrng_name
39 gsl_qrng_size gsl_qrng_state gsl_qrng_get
41 %EXPORT_TAGS = ( all => [ @EXPORT_OK ] );
44 __END__
46 =head1 NAME
48 Math::GSL::QRNG - Quasi-random number generator
50 =head1 SYNOPSIS
52 use Math::GSL::QRNG qw/:all/;
54 =head1 DESCRIPTION
56 Here is a list of all the functions included in this module :
58 =over
60 =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.
63 =item C<gsl_qrng_clone>
65 =item C<gsl_qrng_memcpy> -
67 =item C<gsl_qrng_free($q)> - This function frees all the memory associated with the generator $q.
69 =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.
71 =item C<gsl_qrng_name($q)> - This function returns a pointer to the name of the generator $q.
73 =item C<gsl_qrng_size>
75 =item C<gsl_qrng_state>
77 =item C<gsl_qrng_get>
79 =back
81 This module also contains the following constants :
83 =over
85 =item C<$gsl_qrng_niederreiter_2>
87 =item C<$gsl_qrng_sobol>
89 =item C<$gsl_qrng_halton>
91 =item C<$gsl_qrng_reversehalton>
93 =back
95 For more informations on the functions, we refer you to the GSL offcial documentation: L<http://www.gnu.org/software/gsl/manual/html_node/>
97 Tip : search on google: site:http://www.gnu.org/software/gsl/manual/html_node/ name_of_the_function_you_want
100 =head1 EXAMPLES
102 =head1 AUTHOR
104 Jonathan Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com>
106 =head1 COPYRIGHT AND LICENSE
108 Copyright (C) 2008 Jonathan Leto and Thierry Moisan
110 This program is free software; you can redistribute it and/or modify it
111 under the same terms as Perl itself.
113 =cut