Skip to content

Commit

Permalink
Rename stdlib_stats_distribution_PRNG to stdlib_random (#545)
Browse files Browse the repository at this point in the history
  • Loading branch information
awvwgk committed Oct 4, 2021
1 parent 0d1cc1c commit ff852d2
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
[#146](https://github.com/fortran-lang/stdlib/pull/146)
- new procedures `gauss_legendre`, `gauss_legendre_lobatto`
[#313](https://github.com/fortran-lang/stdlib/pull/313)
- new module `stdlib_random`
[#271](https://github.com/fortran-lang/stdlib/pull/271)
- new module `stdlib_sorting`
- new procedures `sort`, `ord_sort` and `sort_index`
[#408](https://github.com/fortran-lang/stdlib/pull/408)
Expand All @@ -61,8 +63,6 @@
[#191](https://github.com/fortran-lang/stdlib/pull/191)
- new procedure `median`
[#426](https://github.com/fortran-lang/stdlib/pull/426)
- new module `stdlib_stats_distribution_PRNG`
[#271](https://github.com/fortran-lang/stdlib/pull/271)
- new module `stdlib_string_type`
- new derived types `string_type`
[#320](https://github.com/fortran-lang/stdlib/pull/320)
Expand Down
2 changes: 1 addition & 1 deletion doc/specs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ This is and index/directory of the specifications (specs) for each new module/fe
- [math](./stdlib_math.html) - General purpose mathematical functions
- [optval](./stdlib_optval.html) - Fallback value for optional arguments
- [quadrature](./stdlib_quadrature.html) - Numerical integration
- [random](./stdlib_random.html) - Probability Distributions random number generator
- [sorting](./stdlib_sorting.html) - Sorting of rank one arrays
- [stats](./stdlib_stats.html) - Descriptive Statistics
- [stats_distribution_PRNG](./stdlib_stats_distribution_PRNG.html) - Probability Distributions random number generator
- [string\_type](./stdlib_string_type.html) - Basic string support
- [strings](./stdlib_strings.html) - String handling and manipulation routines
- [stringlist_type](./stdlib_stringlist_type.html) - 1-Dimensional list of strings
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: stats_distribution
title: stats_random
---

# Statistical Distributions -- Pseudorandom Number Generator Module
Expand All @@ -18,7 +18,7 @@ Set or get the seed value before calling the probability distribution pseudorand

### Syntax

`call [[stdlib_stats_distribution_PRNG(module):random_seed(interface)]](put, get)`
`call [[stdlib_random(module):random_seed(interface)]](put, get)`

### Arguments

Expand All @@ -34,7 +34,7 @@ Return a scalar of type `integer`.

```fortran
program demo_random_seed
use stdlib_stats_distribution_PRNG, only : random_seed
use stdlib_random, only : random_seed
implicit none
integer :: seed_put, seed_get
Expand All @@ -55,7 +55,7 @@ Generate an integer pseudorandom number in a specific range [-2^k, 2^k - 1] acco

### Syntax

`result = [[stdlib_stats_distribution_PRNG(module):dist_rand(interface)]](n)`
`result = [[stdlib_random(module):dist_rand(interface)]](n)`

### Arguments

Expand All @@ -69,7 +69,7 @@ Return a scalar of type `integer`.

```fortran
program demo_dist_rand
use stdlib_stats_distribution_PRNG, only : dist_rand, random_seed
use stdlib_random, only : dist_rand, random_seed
implicit none
integer :: put, get
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ set(fppFiles
stdlib_quadrature.fypp
stdlib_quadrature_trapz.fypp
stdlib_quadrature_simps.fypp
stdlib_stats_distribution_PRNG.fypp
stdlib_random.fypp
stdlib_math.fypp
stdlib_math_linspace.fypp
stdlib_math_logspace.fypp
Expand Down
4 changes: 2 additions & 2 deletions src/Makefile.manual
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ SRCFYPP = \
stdlib_quadrature.fypp \
stdlib_quadrature_trapz.fypp \
stdlib_quadrature_simps.fypp \
stdlib_random.fypp \
stdlib_sorting.fypp \
stdlib_sorting_ord_sort.fypp \
stdlib_sorting_sort.fypp \
Expand All @@ -29,7 +30,6 @@ SRCFYPP = \
stdlib_math.fypp \
stdlib_math_linspace.fypp \
stdlib_math_logspace.fypp \
stdlib_stats_distribution_PRNG.fypp \
stdlib_string_type.fypp \
stdlib_string_type_constructor.fypp \
stdlib_strings.fypp \
Expand Down Expand Up @@ -145,7 +145,7 @@ stdlib_stats_var.o: \
stdlib_optval.o \
stdlib_kinds.o \
stdlib_stats.o
stdlib_stats_distribution_PRNG.o: \
stdlib_random.o: \
stdlib_kinds.o \
stdlib_error.o
stdlib_string_type.o: stdlib_ascii.o \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#:include "common.fypp"
module stdlib_stats_distribution_PRNG
module stdlib_random
use stdlib_kinds, only: int8, int16, int32, int64
use stdlib_optval, only: optval
use stdlib_error, only: error_stop
Expand All @@ -18,8 +18,8 @@ module stdlib_stats_distribution_PRNG
!! Version experimental
!!
!! Generation of random integers with different kinds
!! ([Specification](../page/specs/stdlib_stats_distribution_PRNG.html#
!! description))
!! ([Specification](../page/specs/stdlib_random.html#
!! dist_rand-get-a-random-integer-with-specified-kind))
#:for k1, t1 in INT_KINDS_TYPES
module procedure dist_rand_${t1[0]}$${k1}$
#:endfor
Expand All @@ -29,8 +29,8 @@ module stdlib_stats_distribution_PRNG
!! Version experimental
!!
!! Set seed value for random number generator
!! ([Specification](../page/specs/stdlib_stats_distribution_PRNG.html#
!! description))
!! ([Specification](../page/specs/stdlib_random.html#
!! random_seed-set-or-get-a-value-of-seed-to-the-probability-distribution-pseudorandom-number-generator))
!!
#:for k1, t1 in INT_KINDS_TYPES
module procedure random_distribution_seed_${t1[0]}$${k1}$
Expand Down Expand Up @@ -148,4 +148,4 @@ module stdlib_stats_distribution_PRNG
end subroutine random_distribution_seed_${t1[0]}$${k1}$
#:endfor
end module stdlib_stats_distribution_PRNG
end module stdlib_random
2 changes: 1 addition & 1 deletion src/tests/stats/test_distribution_PRNG.f90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
program test_distribution_PRNG
use stdlib_error, only : check
use stdlib_kinds, only: int8, int16, int32, int64
use stdlib_stats_distribution_PRNG, only : random_seed, dist_rand
use stdlib_random, only : random_seed, dist_rand

implicit none
logical :: warn = .true.
Expand Down

0 comments on commit ff852d2

Please sign in to comment.