.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Math::GSL::QRNG 3pm" .TH Math::GSL::QRNG 3pm 2024-03-07 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Math::GSL::QRNG \- Quasi\-random number generators .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 2 \& # use OO approach \& use Math::GSL::QRNG; \& \& my $QRNG = Math::GSL::QRNG::Sobol\->new(2); \& my @samples = $QRNG\->get(); \& \& # use GSL interface \& use Math::GSL::QRNG qw/:all/; .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This module interfaces with GNU Scientific Library quasi-random number generators (QRNG). .SH "OO Interface" .IX Header "OO Interface" The OO Interface described in this documentation is available to all different subclasses, namely: .IP Math::GSL::QRNG::Sobol 4 .IX Item "Math::GSL::QRNG::Sobol" .PD 0 .IP Math::GSL::QRNG::Niederreiter2 4 .IX Item "Math::GSL::QRNG::Niederreiter2" .IP Math::GSL::QRNG::Halton 4 .IX Item "Math::GSL::QRNG::Halton" .IP Math::GSL::QRNG::ReverseHalton 4 .IX Item "Math::GSL::QRNG::ReverseHalton" .PD .SS reinit .IX Subsection "reinit" Reinitializes the generator to its starting point. Note that quasi-random sequences do not use a seed and always produce the same set of values. .PP .Vb 1 \& $qrng\->reinit(); .Ve .SS get .IX Subsection "get" Retrieves the next point from the sequence generator. Returns \f(CW\*(C`undef\*(C'\fR on error. .PP .Vb 1 \& my @points = $qrng\->get(); .Ve .SS name .IX Subsection "name" Retrieves the QRNG name. .PP .Vb 1 \& my $name = $qrng\->name(); .Ve .SS state_size .IX Subsection "state_size" Returns the size of the QRNG state. .SS clone .IX Subsection "clone" Returns an exact copy of the current QRNG. .SH "GSL API" .IX Header "GSL API" Here is a list of all the functions included in this module : .ie n .IP """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." 4 .el .IP "\f(CWgsl_qrng_alloc($T, $n)\fR \- This function returns a pointer to a newly-created instance of a quasi-random sequence generator of type \f(CW$T\fR and dimension \f(CW$d\fR. The type \f(CW$T\fR must be one of the constants included in this module." 4 .IX Item "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." .PD 0 .ie n .IP "gsl_qrng_clone($q) \- This function returns a pointer to a newly created generator which is an exact copy of the generator $q." 4 .el .IP "\f(CWgsl_qrng_clone($q)\fR \- This function returns a pointer to a newly created generator which is an exact copy of the generator \f(CW$q\fR." 4 .IX Item "gsl_qrng_clone($q) - This function returns a pointer to a newly created generator which is an exact copy of the generator $q." .ie n .IP """gsl_qrng_memcpy($dest, $src)"" \- This function copies the quasi-random sequence generator $src into the pre-existing generator $dest, making $dest into an exact copy of $src. The two generators must be of the same type." 4 .el .IP "\f(CWgsl_qrng_memcpy($dest, $src)\fR \- This function copies the quasi-random sequence generator \f(CW$src\fR into the pre-existing generator \f(CW$dest\fR, making \f(CW$dest\fR into an exact copy of \f(CW$src\fR. The two generators must be of the same type." 4 .IX Item "gsl_qrng_memcpy($dest, $src) - This function copies the quasi-random sequence generator $src into the pre-existing generator $dest, making $dest into an exact copy of $src. The two generators must be of the same type." .ie n .IP "gsl_qrng_free($q) \- This function frees all the memory associated with the generator $q. Don't call this function explicitly. It will be called automatically in DESTROY." 4 .el .IP "\f(CWgsl_qrng_free($q)\fR \- This function frees all the memory associated with the generator \f(CW$q\fR. Don't call this function explicitly. It will be called automatically in DESTROY." 4 .IX Item "gsl_qrng_free($q) - This function frees all the memory associated with the generator $q. Don't call this function explicitly. It will be called automatically in DESTROY." .ie n .IP "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." 4 .el .IP "\f(CWgsl_qrng_init($q)\fR \- This function reinitializes the generator \f(CW$q\fR to its starting point. Note that quasi-random sequences do not use a seed and always produce the same set of values." 4 .IX Item "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." .ie n .IP "gsl_qrng_name($q) \- This function returns a pointer to the name of the generator $q." 4 .el .IP "\f(CWgsl_qrng_name($q)\fR \- This function returns a pointer to the name of the generator \f(CW$q\fR." 4 .IX Item "gsl_qrng_name($q) - This function returns a pointer to the name of the generator $q." .ie n .IP "gsl_qrng_size($q) \- This function returns the size of the state of generator r from the generator $q. You can use this information to access the state directly." 4 .el .IP "\f(CWgsl_qrng_size($q)\fR \- This function returns the size of the state of generator r from the generator \f(CW$q\fR. You can use this information to access the state directly." 4 .IX Item "gsl_qrng_size($q) - This function returns the size of the state of generator r from the generator $q. You can use this information to access the state directly." .ie n .IP "gsl_qrng_state($q) \- This function returns a pointer to the state of generator r from the generator $q. You can use this information to access the state directly." 4 .el .IP "\f(CWgsl_qrng_state($q)\fR \- This function returns a pointer to the state of generator r from the generator \f(CW$q\fR. You can use this information to access the state directly." 4 .IX Item "gsl_qrng_state($q) - This function returns a pointer to the state of generator r from the generator $q. You can use this information to access the state directly." .ie n .IP """gsl_qrng_get""" 4 .el .IP \f(CWgsl_qrng_get\fR 4 .IX Item "gsl_qrng_get" .PD .PP This module also contains the following constants : .ie n .IP $gsl_qrng_niederreiter_2 4 .el .IP \f(CW$gsl_qrng_niederreiter_2\fR 4 .IX Item "$gsl_qrng_niederreiter_2" .PD 0 .ie n .IP $gsl_qrng_sobol 4 .el .IP \f(CW$gsl_qrng_sobol\fR 4 .IX Item "$gsl_qrng_sobol" .ie n .IP $gsl_qrng_halton 4 .el .IP \f(CW$gsl_qrng_halton\fR 4 .IX Item "$gsl_qrng_halton" .ie n .IP $gsl_qrng_reversehalton 4 .el .IP \f(CW$gsl_qrng_reversehalton\fR 4 .IX Item "$gsl_qrng_reversehalton" .PD .PP For more information on the functions, we refer you to the GSL official documentation: .SH EXAMPLES .IX Header "EXAMPLES" .SH AUTHORS .IX Header "AUTHORS" Jonathan "Duke" Leto Thierry Moisan Alberto Simões .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright (C) 2008\-2023 Jonathan "Duke" Leto and Thierry Moisan .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.