EzLAPACK
Loading...
Searching...
No Matches
module_random Module Reference

Provides a generic interface for generating random complex numbers, integers, and characters. More...

Data Types

interface  random_complex
 Generic interface for generating random complex numbers. More...
 

Functions/Subroutines

subroutine, public random_character (character_array, output_character)
 Randomly select and return a character from an input array of strings.
 
subroutine, public random_integer (lower_bound, upper_bound, output_integer)
 Get a random integer between the lower and upper bounds (inclusive).
 

Detailed Description

Provides a generic interface for generating random complex numbers, integers, and characters.

This module offers utilities for generating random values with specific properties:

  • Random complex numbers within the unit circle.
  • Random integers within a user-specified range.
  • Random selection from an array of characters.

Function/Subroutine Documentation

◆ random_character()

subroutine, public module_random::random_character ( character(len=*), dimension(:), intent(in) character_array,
character(len=*), intent(out) output_character )

Randomly select and return a character from an input array of strings.

Parameters
[in]character_arrayInput array of strings to select from.
[out]output_characterRandomly selected character from the input array.

◆ random_integer()

subroutine, public module_random::random_integer ( integer, intent(in) lower_bound,
integer, intent(in) upper_bound,
integer, intent(out) output_integer )

Get a random integer between the lower and upper bounds (inclusive).

Parameters
[in]lower_boundLower bound of the random integer range.
[in]upper_boundUpper bound of the random integer range.
[out]output_integerRandom integer within the specified range.