### Install easyRNG with Meson and Ninja (Shell) Source: https://github.com/tschoonj/easyrng/blob/master/docs/extra_pages.dox Alternative installation method for easyRNG using the Meson build system and Ninja. This involves creating a build directory, configuring the project with Meson, and then building and installing using Ninja. ```Shell tar xfvz easyRNG-x.y.tar.gz cd easyRNG-x.y mkdir build cd build meson .. ninja ninja test ninja install ``` -------------------------------- ### Install easyRNG from Source (Shell) Source: https://github.com/tschoonj/easyrng/blob/master/docs/extra_pages.dox Instructions for compiling and installing easyRNG from a source tarball using standard shell commands. This process involves extracting the archive, configuring the build, compiling the library, running checks, and installing it. ```Shell tar xfvz easyRNG-x.y.tar.gz cd easyRNG-x.y ./configure make make check make install ``` -------------------------------- ### Install easyRNG on Ubuntu Source: https://github.com/tschoonj/easyrng/blob/master/docs/extra_pages.dox Instructions to update the apt cache and install the easyRNG library on Ubuntu systems. This involves adding the repository to sources.list and then performing an apt-get update and install. ```bash sudo apt-get update sudo apt-get install libeasyrng libeasyrng-dev libeasyrng-doc ``` -------------------------------- ### Install easyRNG via Homebrew (Shell) Source: https://github.com/tschoonj/easyrng/blob/master/docs/extra_pages.dox Command to install easyRNG using Homebrew, a package manager for macOS and Linux. This assumes the user has a tap named 'tschoonj/tap' set up. ```Shell brew install tschoonj/tap/easyrng ``` -------------------------------- ### Install easyRNG RPM Repository Key (Fedora) (Shell) Source: https://github.com/tschoonj/easyrng/blob/master/docs/extra_pages.dox Command to add the RPM repository key for Fedora-based Linux distributions to enable installation of easyRNG packages. ```Shell sudo rpm -Uvh http://lvserver.ugent.be/yum/xmi-repo-key-fedora.noarch.rpm ``` -------------------------------- ### Compile C/C++ program with easyRNG Source: https://github.com/tschoonj/easyrng/blob/master/docs/extra_pages.dox Example command to compile a C/C++ program that uses the easyRNG library. It includes the necessary header files and links against the easyRNG library using pkg-config. ```c #include // for the random number generators #include // for the random number distributions // Assuming your program source file is called program.c, compile it with: gcc program.c -o program `pkg-config --cflags --libs easyRNG` ``` -------------------------------- ### Install easyRNG RPM Packages (Shell) Source: https://github.com/tschoonj/easyrng/blob/master/docs/extra_pages.dox Commands to install easyRNG, its development files, and documentation using yum (or dnf) on RPM-based Linux distributions after adding the repository key. ```Shell sudo yum install easyRNG easyRNG-devel easyRNG-doc ``` -------------------------------- ### Compile Fortran program with easyRNG Source: https://github.com/tschoonj/easyrng/blob/master/docs/extra_pages.dox Example command to compile a Fortran program that uses the easyRNG library. It demonstrates including the easyRNG module and linking against the library using pkg-config. ```fortran USE :: easyRNG ! Assuming your program source file is called program.f90, compile it with: gfortran program.f90 -o program `pkg-config --cflags --libs easyRNG` ``` -------------------------------- ### Install easyRNG RPM Repository Key (RHEL 8) (Shell) Source: https://github.com/tschoonj/easyrng/blob/master/docs/extra_pages.dox Command to add the RPM repository key for Red Hat Enterprise Linux 8 and compatible distributions to enable installation of easyRNG packages. ```Shell sudo rpm -Uvh http://lvserver.ugent.be/yum/xmi-repo-key-8.0-1.el8.noarch.rpm ``` -------------------------------- ### Add easyRNG APT Repository (Debian Buster) (Shell) Source: https://github.com/tschoonj/easyrng/blob/master/docs/extra_pages.dox Instructions to add the easyRNG APT repository source for Debian Buster to the system's sources.list, enabling installation via apt. ```Shell deb http://xmi-apt.tomschoonjans.eu/debian buster stable deb-src http://xmi-apt.tomschoonjans.eu/debian buster stable ``` -------------------------------- ### Install easyRNG RPM Repository Key (RHEL 7) (Shell) Source: https://github.com/tschoonj/easyrng/blob/master/docs/extra_pages.dox Command to add the RPM repository key for Red Hat Enterprise Linux 7 and compatible distributions (CentOS, Scientific Linux) to enable installation of easyRNG packages. ```Shell sudo rpm -Uvh http://lvserver.ugent.be/yum/xmi-repo-key-7.0-1.el7.noarch.rpm ``` -------------------------------- ### Add easyRNG APT Repository (Ubuntu Bionic) (Shell) Source: https://github.com/tschoonj/easyrng/blob/master/docs/extra_pages.dox Instructions to add the easyRNG APT repository source for Ubuntu Bionic (18.04) to the system's sources.list, enabling installation via apt. ```Shell deb http://xmi-apt.tomschoonjans.eu/ubuntu bionic stable deb-src http://xmi-apt.tomschoonjans.eu/ubuntu bionic stable ``` -------------------------------- ### Build easyRNG from Github Source: https://github.com/tschoonj/easyrng/blob/master/docs/extra_pages.dox Steps to clone the easyRNG Github repository, configure the build using autotools, and compile the library. This method is for users who want to use the latest development version. ```bash git clone git@github.com:tschoonj/easyRNG.git cd easyRNG autoreconf -i ./configure make make check make install ``` -------------------------------- ### Import easyRNG APT Key (Shell) Source: https://github.com/tschoonj/easyrng/blob/master/docs/extra_pages.dox Command to import the public GPG key for the easyRNG APT repository, allowing Debian and Ubuntu systems to trust packages from this source. ```Shell curl http://xmi-apt.tomschoonjans.eu/xmi.packages.key | sudo apt-key add - ``` -------------------------------- ### Update easyRNG RPM Packages (Shell) Source: https://github.com/tschoonj/easyrng/blob/master/docs/extra_pages.dox Command to update easyRNG, its development files, and documentation using yum (or dnf) on RPM-based Linux distributions. ```Shell sudo yum update easyRNG easyRNG-devel easyRNG-doc ``` -------------------------------- ### easyRNG C API Performance Test Source: https://github.com/tschoonj/easyrng/blob/master/docs/extra_pages.dox Source code for test 2, which measures the performance of the easyRNG random number generator C API. This test is useful for understanding the speed at which random numbers can be generated. ```c #include #include #include int main() { easy_rng_t rng; easy_rng_init(&rng, EASY_RNG_DEFAULT); clock_t start = clock(); unsigned int count = 0; for (int i = 0; i < 1000000; ++i) { easy_rng_u(&rng); count++; } clock_t end = clock(); double cpu_time_used = ((double) (end - start)) / CLOCKS_PER_SEC; printf("Generated %u random numbers in %f seconds\n", count, cpu_time_used); easy_rng_free(&rng); return 0; } ``` -------------------------------- ### easyRNG C API Distribution Accuracy Test Source: https://github.com/tschoonj/easyrng/blob/master/docs/extra_pages.dox Source code for test 3, which checks the accuracy of the easyRNG random number distributions C API. This test verifies that the generated numbers follow the expected statistical distributions. ```c #include #include #include int main() { easy_rng_t rng; easy_rng_init(&rng, EASY_RNG_DEFAULT); // Example: Testing uniform distribution between 0 and 1 printf("Uniform random number: %f\n", easy_randist_uniform_01(&rng)); // Example: Testing normal distribution printf("Normal random number: %f\n", easy_randist_normal(&rng, 0.0, 1.0)); easy_rng_free(&rng); return 0; } ``` -------------------------------- ### easyRNG Fortran API Performance Test Source: https://github.com/tschoonj/easyrng/blob/master/docs/extra_pages.dox Source code for test 5, which measures the performance of the easyRNG random number generator Fortran API. This test assesses the efficiency of the Fortran interface for generating random numbers. ```fortran PROGRAM test5 USE easyRNG IMPLICIT NONE TYPE(easy_rng_t) :: rng INTEGER :: ierr REAL :: start_time, end_time, elapsed_time INTEGER :: i, count CALL easy_rng_init(rng, EASY_RNG_DEFAULT, ierr) IF (ierr /= 0) THEN PRINT *, "Error initializing RNG" STOP END IF start_time = SECONDS() count = 0 DO i = 1, 1000000 CALL easy_rng_u(rng) count = count + 1 END DO end_time = SECONDS() elapsed_time = end_time - start_time PRINT *, "Generated ", count, " random numbers in ", elapsed_time, " seconds" CALL easy_rng_free(rng) END PROGRAM test5 ``` -------------------------------- ### easyRNG Fortran API Distribution Accuracy Test Source: https://github.com/tschoonj/easyrng/blob/master/docs/extra_pages.dox Source code for test 6, which checks the accuracy of the easyRNG random number distributions Fortran API. This test verifies that the Fortran interface correctly generates numbers according to specified distributions. ```fortran PROGRAM test6 USE easyRNG IMPLICIT NONE TYPE(easy_rng_t) :: rng INTEGER :: ierr CALL easy_rng_init(rng, EASY_RNG_DEFAULT, ierr) IF (ierr /= 0) THEN PRINT *, "Error initializing RNG" STOP END IF ! Example: Testing uniform distribution between 0 and 1 PRINT *, "Uniform random number: ", easy_randist_uniform_01(rng) ! Example: Testing normal distribution PRINT *, "Normal random number: ", easy_randist_normal(rng, 0.0, 1.0) CALL easy_rng_free(rng) END PROGRAM test6 ``` -------------------------------- ### easyRNG C API Validation Test Source: https://github.com/tschoonj/easyrng/blob/master/docs/extra_pages.dox Source code for test 1, which validates the C API of the easyRNG random number generator. This test is designed to ensure the core functionality of the random number generation works as expected. ```c #include #include int main() { easy_rng_t rng; easy_rng_init(&rng, EASY_RNG_DEFAULT); printf("Random number: %u\n", easy_rng_u(&rng)); easy_rng_free(&rng); return 0; } ``` -------------------------------- ### easyRNG Fortran API Validation Test Source: https://github.com/tschoonj/easyrng/blob/master/docs/extra_pages.dox Source code for test 4, which validates the Fortran API of the easyRNG random number generator. This test ensures the Fortran interface correctly interacts with the underlying C library. ```fortran PROGRAM test4 USE easyRNG IMPLICIT NONE TYPE(easy_rng_t) :: rng INTEGER :: ierr CALL easy_rng_init(rng, EASY_RNG_DEFAULT, ierr) IF (ierr /= 0) THEN PRINT *, "Error initializing RNG" STOP END IF PRINT *, "Random number: ", easy_rng_u(rng) CALL easy_rng_free(rng) END PROGRAM test4 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.