42 module function test_getCumPropExpSel_RK5()
result(assertion); logical(LK) :: assertion; end function
45 module function test_getCumPropExpSel_RK4()
result(assertion); logical(LK) :: assertion; end function
48 module function test_getCumPropExpSel_RK3()
result(assertion); logical(LK) :: assertion; end function
51 module function test_getCumPropExpSel_RK2()
result(assertion); logical(LK) :: assertion; end function
54 module function test_getCumPropExpSel_RK1()
result(assertion); logical(LK) :: assertion; end function
64 module function test_getCumPropExpSeq_RK5()
result(assertion); logical(LK) :: assertion; end function
67 module function test_getCumPropExpSeq_RK4()
result(assertion); logical(LK) :: assertion; end function
70 module function test_getCumPropExpSeq_RK3()
result(assertion); logical(LK) :: assertion; end function
73 module function test_getCumPropExpSeq_RK2()
result(assertion); logical(LK) :: assertion; end function
76 module function test_getCumPropExpSeq_RK1()
result(assertion); logical(LK) :: assertion; end function
86 module function test_setCumPropExpSel_RK5()
result(assertion); logical(LK) :: assertion; end function
89 module function test_setCumPropExpSel_RK4()
result(assertion); logical(LK) :: assertion; end function
92 module function test_setCumPropExpSel_RK3()
result(assertion); logical(LK) :: assertion; end function
95 module function test_setCumPropExpSel_RK2()
result(assertion); logical(LK) :: assertion; end function
98 module function test_setCumPropExpSel_RK1()
result(assertion); logical(LK) :: assertion; end function
108 module function test_setCumPropExpSeq_RK5()
result(assertion); logical(LK) :: assertion; end function
111 module function test_setCumPropExpSeq_RK4()
result(assertion); logical(LK) :: assertion; end function
114 module function test_setCumPropExpSeq_RK3()
result(assertion); logical(LK) :: assertion; end function
117 module function test_setCumPropExpSeq_RK2()
result(assertion); logical(LK) :: assertion; end function
120 module function test_setCumPropExpSeq_RK1()
result(assertion); logical(LK) :: assertion; end function
138 call test%run(test_getCumPropExpSel_RK5, SK_
"test_getCumPropExpSel_RK5")
141 call test%run(test_getCumPropExpSel_RK4, SK_
"test_getCumPropExpSel_RK4")
144 call test%run(test_getCumPropExpSel_RK3, SK_
"test_getCumPropExpSel_RK3")
147 call test%run(test_getCumPropExpSel_RK2, SK_
"test_getCumPropExpSel_RK2")
150 call test%run(test_getCumPropExpSel_RK1, SK_
"test_getCumPropExpSel_RK1")
156 call test%run(test_getCumPropExpSeq_RK5, SK_
"test_getCumPropExpSeq_RK5")
159 call test%run(test_getCumPropExpSeq_RK4, SK_
"test_getCumPropExpSeq_RK4")
162 call test%run(test_getCumPropExpSeq_RK3, SK_
"test_getCumPropExpSeq_RK3")
165 call test%run(test_getCumPropExpSeq_RK2, SK_
"test_getCumPropExpSeq_RK2")
168 call test%run(test_getCumPropExpSeq_RK1, SK_
"test_getCumPropExpSeq_RK1")
174 call test%run(test_setCumPropExpSel_RK5, SK_
"test_setCumPropExpSel_RK5")
177 call test%run(test_setCumPropExpSel_RK4, SK_
"test_setCumPropExpSel_RK4")
180 call test%run(test_setCumPropExpSel_RK3, SK_
"test_setCumPropExpSel_RK3")
183 call test%run(test_setCumPropExpSel_RK2, SK_
"test_setCumPropExpSel_RK2")
186 call test%run(test_setCumPropExpSel_RK1, SK_
"test_setCumPropExpSel_RK1")
192 call test%run(test_setCumPropExpSeq_RK5, SK_
"test_setCumPropExpSeq_RK5")
195 call test%run(test_setCumPropExpSeq_RK4, SK_
"test_setCumPropExpSeq_RK4")
198 call test%run(test_setCumPropExpSeq_RK3, SK_
"test_setCumPropExpSeq_RK3")
201 call test%run(test_setCumPropExpSeq_RK2, SK_
"test_setCumPropExpSeq_RK2")
204 call test%run(test_setCumPropExpSeq_RK1, SK_
"test_setCumPropExpSeq_RK1")
211 call test%summarize()
225 logical(
LK) :: assertion
226 real(
RK) ,
parameter :: TOL
= epsilon(
1._RK)
* 10._RK
227 real(
RK) ,
allocatable :: Array(:)
228 real(
RK) ,
allocatable :: cumPropExp_ref(:)
229 real(
RK) ,
allocatable :: cumPropExp(:)
230 real(
RK) ,
allocatable :: diff(:)
235 cumPropExp_ref
= getCumSum(
exp(Array
- maxval(Array)))
236 cumPropExp_ref
= cumPropExp_ref
/ cumPropExp_ref(
size(cumPropExp_ref))
238 diff
= abs(cumPropExp
- cumPropExp_ref)
239 assertion
= all(diff
< TOL)
240 call test%assert(assertion, desc
= "The genLogCumProp_RK() must correctly compute CumSumProp for an input array of real of default kind.")
Generate and return a scalar or a contiguous array of rank 1 of length s1 of randomly uniformly distr...
Generate and return the cumulative sum of the input array, optionally in the backward direction and,...
This module contains classes and procedures for computing various statistical quantities related to t...
This module contains classes and procedures for reporting and handling errors.
character(*, SK), parameter MODULE_NAME
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
integer, parameter RK
The default real kind in the ParaMonte library: real64 in Fortran, c_double in C-Fortran Interoperati...
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
This module contains the procedures and interfaces for computing the cumulative sum of the exponentia...
pure real(RKG) function, dimension(lenArray) getCumPropExp_RK(array, maxArray, lenArray)
[LEGACY code] Generate and return the normalized cumulative sum (i.e., Cumulative Density Function (...
This module contains the procedures and interfaces for computing the cumulative sum of an array.
This module contains a simple unit-testing framework for the Fortran libraries, including the ParaMon...
This module contains tests of the module pm_mathCumPropExp.
logical(LK) function test_setCumPropExp_RK()
Test the special legacy interface: genLogCumProp_RK()
This is the derived type for generating objects to gracefully and verbosely handle runtime unexpected...
This is the derived type test_type for generating objects that facilitate testing of a series of proc...