Math::GSL::QRNG(3pm)

πŸ’– Math::GSL::QRNG β€” quasi-random number generators, but make it cute ✨

okay so bestie, this is Math::GSL::QRNG, part of the Math::GSL family, and it's documented as User Contributed Perl Documentation for the Math::GSL::QRNG(3pm) manual page. it's a Perl interface to the GNU Scientific Library quasi-random number generators, a.k.a. QRNGs. no cap, these are the fancy low-discrepancy girlies of the randomness world.


πŸŽ€ NAME

Math::GSL::QRNG β€” Quasi-random number generators πŸ¦‹


✨ SYNOPSIS

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

like, two whole ways to live your truth. pick your fighter πŸ’…


🌸 DESCRIPTION

This module interfaces with GNU Scientific Library quasi-random number generators (QRNG). periodt. that's the vibe.

πŸ’« OO Interface

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

four iconic subclasses, all sharing the same OO glow-up. main character energy across the board πŸ‘‘

πŸ” 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.

$qrng->reinit();

fr fr, no seed, no chaos β€” same values every single time. it's giving determined πŸ’€

πŸ“ get

Retrieves the next point from the sequence generator. Returns undef on error.

my @points = $qrng->get();

🌈 name

Retrieves the QRNG name.

my $name = $qrng->name();

πŸ“ state_size

Returns the size of the QRNG state.

🧚 clone

Returns an exact copy of the current QRNG.


πŸ’… GSL API

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.
bestie do NOT call gsl_qrng_free yourself. it's handled for you in DESTROY. let the destructor do its thing, she's got this πŸ™ˆ
  • 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 information on the functions, we refer you to the GSL official documentation: <http://www.gnu.org/software/gsl/manual/html_node/>


🌟 EXAMPLES

this section is just vibes and empty space in the source, bestie. nothing here. we move πŸ’€βœ¨


πŸ‘‘ AUTHORS

  • Jonathan "Duke" Leto <jonathan@leto.net>
  • Thierry Moisan <thierry.moisan@gmail.com>
  • Alberto SimΓ΅es <ambs@cpan.org>

Copyright (C) 2008-2024 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.


and that's the whole page, bestie!! 🫢 this was rendered for perl v5.42.3, dated 2026-08-20, on the Math::GSL::QRNG(3pm) page. slay, stay quasi-random, and remember β€” no seed, no notes, just iconic deterministic sequences πŸ’œπŸŒˆβ­

πŸ“¦ where this page comes from