GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Math::GSL::QRNG(3) User Contributed Perl Documentation Math::GSL::QRNG(3)
 

Math::GSL::QRNG - Quasi-random number generators

    # 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/;

This module interfaces with GNU Scientific Library quasi-random number generators (QRNG).

The OO Interface described in this documentation is available to all different subclasses, namely:
Math::GSL::QRNG::Sobol
Math::GSL::QRNG::Niederreiter2
Math::GSL::QRNG::Halton
Math::GSL::QRNG::ReverseHalton

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.
        $qrng->reinit();

Retrieves the next point from the sequence generator. Returns "undef" on error.
        my @points = $qrng->get();

Retrieves the QRNG name.
    my $name = $qrng->name();

Returns the size of the QRNG state.

Returns an exact copy of the current QRNG.

Here is a list of all the functions included in this module :
"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.
"gsl_qrng_clone($q)" - This function returns a pointer to a newly created generator which is an exact copy of the generator $q.
"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.
"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.
"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.
"gsl_qrng_name($q)" - This function returns a pointer to the name of the generator $q.
"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.
"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.
"gsl_qrng_get"
This module also contains the following constants :
$gsl_qrng_niederreiter_2
$gsl_qrng_sobol
$gsl_qrng_halton
$gsl_qrng_reversehalton
For more informations on the functions, we refer you to the GSL offcial documentation: <http://www.gnu.org/software/gsl/manual/html_node/>

Jonathan "Duke" Leto <jonathan@leto.net> Thierry Moisan <thierry.moisan@gmail.com> Alberto Simo~es <ambs@cpan.org>

Copyright (C) 2008-2014 Jonathan "Duke" Leto and Thierry Moisan
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
2019-01-01 perl v5.28.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.