ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_mathCumPropExp::setCumPropExp Interface Reference

Return the cumulative sum of the proportions of the exponential of the input array, optionally in the backward direction and, optionally reverse the output cumulative sum upon return. More...

Detailed Description

Return the cumulative sum of the proportions of the exponential of the input array, optionally in the backward direction and, optionally reverse the output cumulative sum upon return.

The returned array is normalized such that all of its elements fall in the range \([0,1]\).
All operations are performed while avoiding arithmetic overflow.

Parameters
[out]cumPropExp: The output array of the same size, shape, type, and kind as the input array containing the cumulative sum of proportions of array in the specified direction.
(optional, if missing, the result will be written to the input/output argument array.)
[in,out]array: The contiguous array of shape (:) of type real of kind any supported by the processor (e.g., RK, RK32, RK64, or RK128) whose cumulative proportional sum will have to be computed.
  • If cumPropExp is present, then array has intent(in).
  • If cumPropExp is missing, then array has intent(inout).
    On output, the contents of array will be completely overwritten by the computed cumPropExp.
[in]maxArray: The input scalar of the same type and kind as the input array representing the maximum value in array (i.e., maxArray = maxval(array)).
[in]control: The input scalar object that can be,
  1. the constant sequence or equivalently, an object of type sequence_type.
    Specifying this value forces the algorithm to skip runtime underflow checks.
    This means all exponentiation operations will be carried out for each element.
    Specifying this value can aid runtime efficiency when the divisions of none or very few of the elements of array (for example, half or less) by maxArray causes underflow.
    In such cases, the potentially expensive runtime branching is avoided at the cost of performing a very few exponentiation operations.
    The typical cost of an if-branch is 7-20 CPU cycles on the contemporary architecture while exponentiation typically costs ~200 CPU cycles.
    See the relevant benchmark here.
  2. the constant selection or equivalently, an object of type selection_type.
    Enabling this option can aid runtime efficiency when the division of a significant number of elements of array (for example, half or more) by maxArray causes underflow.
    In such cases, the exponentiation is avoided if control = selection` leading to faster runtime by avoiding exponentiation since it is highly expensive (on the order of ~200 CPU cycles).
    See the relevant benchmark here.
[in]direction: The input scalar object that can be,
  1. the constant forward or equivalently, an object of type forward_type, implying that the output cumulative sum has be computed from the first element to the last element of the input array.
    even though the increments will still be written from the first element of cumPropExp to the last.
  2. the constant backward or equivalently, an object of type backward_type, implying that the output cumulative sum has be computed from the last element to the first element of the input array even though the increments will still be written from the first element of cumPropExp to the last.
(optional, default = sequence. It must be present if and only if the input argument action is also present.)
[in]action: The input scalar object that can be,
  1. the constant nothing or equivalently, an object of type nothing_type, implying no action to be performed on the elements of the output cumPropExp will have be reversed upon return.
  2. the constant reverse or equivalently, an object of type reverse_type, implying that the order of the elements of the output cumPropExp will have be reversed upon return, such that its last element becomes the first.
(optional, default = nothing. It must be present if and only if the input argument direction is also present.)


Possible calling interfaces

use pm_mathCumPropExp, only: selection, sequence, forward, backward, nothing, reverse
! overwrite input array.
call setCumPropExp(array(:), maxArray, control)
call setCumPropExp(array(:), maxArray, control, direction, action)
! write to new array.
call setCumPropExp(cumPropExp(:), array(:), maxArray, control)
call setCumPropExp(cumPropExp(:), array(:), maxArray, control, direction, action)
Return the cumulative sum of the proportions of the exponential of the input array,...
This module contains the procedures and interfaces for computing the cumulative sum of the exponentia...
Warning
The condition 0 < size(array) must hold for the corresponding arguments.
The condition maxArray == maxval(array) must hold for the corresponding arguments.
The condition size(array) == size(cumPropExp) must hold for the corresponding arguments.
These conditions are verified only if the library is built with the preprocessor macro CHECK_ENABLED=1.
The pure procedure(s) documented herein become impure when the ParaMonte library is compiled with preprocessor macro CHECK_ENABLED=1.
By default, these procedures are pure in release build and impure in debug and testing builds.
Note
The functionalities of the procedures under this generic interface,
block
call setCumPropExp(cumPropExp, array, maxArray, control)
call setCumPropExp(cumPropExp, array, maxArray, control, direction = backward)
call setCumPropExp(cumPropExp, array, maxArray, control, direction = backward, action = reverse)
call setCumPropExp(cumPropExp, array, maxArray, control, direction = forward, action = reverse)
end block
!
are equivalent to the following lines respectively,
block
use pm_mathCumPropExp, only: getCumSum
cumPropExp = getCumSum(exp(array - maxval(array))); cumPropExp = cumPropExp / cumPropExp(size(array, maxArray, 1, IK))
cumPropExp = getCumSum(exp(array - maxval(array)), direction = backward); cumPropExp = cumPropExp / cumPropExp(size(array, maxArray, 1, IK))
cumPropExp = getCumSum(exp(array - maxval(array)), direction = backward, action = reversed); cumPropExp = cumPropExp / cumPropExp(1)
cumPropExp = getCumSum(exp(array - maxval(array)), direction = forward, action = reversed); cumPropExp = cumPropExp / cumPropExp(1)
end block
!
See also
getCumSum
setCumSum
getCumPropExp
setCumPropExp


Example usage

1program example
2
3 use pm_kind, only: SK, IK, LK
4 use pm_io, only: display_type
6 use pm_mathCumPropExp, only: forward, backward, reverse, nothing, sequence, selection
8 use pm_distUnif, only: setUnifRand
9
10 implicit none
11
12
13 type(display_type) :: disp
14
15 disp = display_type(file = "main.out.F90")
16
17 block
18 use pm_kind, only: RKG => RKH ! all real kinds are supported.
19 real, allocatable :: array(:), cumPropExp(:)
20 call disp%skip
21 call disp%show("array = log([1., 2., 3., 4.])")
22 array = log([1., 2., 3., 4.])
23 call disp%show("array")
24 call disp%show( array )
25 call disp%show("call setResized(cumPropExp, size(array, 1, IK))")
26 call setResized(cumPropExp, size(array, 1, IK))
27 call disp%show("call setCumPropExp(cumPropExp, array, maxval(array), sequence)")
28 call setCumPropExp(cumPropExp, array, maxval(array), sequence)
29 call disp%show("cumPropExp")
30 call disp%show( cumPropExp )
31 call disp%show("call setCumPropExp(cumPropExp, array, maxval(array), selection)")
32 call setCumPropExp(cumPropExp, array, maxval(array), selection)
33 call disp%show("cumPropExp")
34 call disp%show( cumPropExp )
35 call disp%skip
36 call disp%show("array = array(size(array):1:-1)")
37 array = array(size(array):1:-1)
38 call disp%show("array")
39 call disp%show( array )
40 call disp%show("call setCumPropExp(cumPropExp, array, maxval(array), sequence, backward, nothing)")
41 call setCumPropExp(cumPropExp, array, maxval(array), sequence, backward, nothing)
42 call disp%show("cumPropExp")
43 call disp%show( cumPropExp )
44 call disp%skip
45 call disp%show("call setCumPropExp(cumPropExp, array, maxval(array), sequence, backward, reverse)")
46 call setCumPropExp(cumPropExp, array, maxval(array), sequence, backward, reverse)
47 call disp%show("cumPropExp")
48 call disp%show( cumPropExp )
49 call disp%skip
50 end block
51
52 call disp%skip()
53 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
54 call disp%show("! Compute and return the cumulative sum in-place, within the input `Array`.")
55 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
56 call disp%skip()
57
58 block
59 use pm_kind, only: RKG => RKH ! all real kinds are supported.
60 real, allocatable :: array(:)
61 call disp%skip
62 call disp%show("array = log([1., 2., 3., 4.])")
63 array = log([1., 2., 3., 4.])
64 call disp%show("array")
65 call disp%show( array )
66 call disp%show("call setCumPropExp(array, maxval(array), sequence)")
67 call setCumPropExp(array, maxval(array), sequence)
68 call disp%show("array")
69 call disp%show( array )
70 call disp%show("call setCumPropExp(array, maxval(array), selection)")
71 call setCumPropExp(array, maxval(array), selection)
72 call disp%show("array")
73 call disp%show( array )
74 call disp%skip
75 call disp%show("array = array(size(array):1:-1)")
76 array = array(size(array):1:-1)
77 call disp%show("array")
78 call disp%show( array )
79 call disp%show("call setCumPropExp(array, maxval(array), sequence, backward, nothing)")
80 call setCumPropExp(array, maxval(array), sequence, backward, nothing)
81 call disp%show("array")
82 call disp%show( array )
83 call disp%skip
84 call disp%show("call setCumPropExp(array, maxval(array), sequence, backward, reverse)")
85 call setCumPropExp(array, maxval(array), sequence, backward, reverse)
86 call disp%show("array")
87 call disp%show( array )
88 call disp%skip
89 end block
90
91end program example
Allocate or resize (shrink or expand) an input allocatable scalar string or array of rank 1....
Return a uniform random scalar or contiguous array of arbitrary rank of randomly uniformly distribute...
This is a generic method of the derived type display_type with pass attribute.
Definition: pm_io.F90:11726
This is a generic method of the derived type display_type with pass attribute.
Definition: pm_io.F90:11508
This module contains procedures and generic interfaces for resizing allocatable arrays of various typ...
This module contains classes and procedures for computing various statistical quantities related to t...
This module contains classes and procedures for input/output (IO) or generic display operations on st...
Definition: pm_io.F90:252
type(display_type) disp
This is a scalar module variable an object of type display_type for general display.
Definition: pm_io.F90:11393
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
Definition: pm_kind.F90:268
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
Definition: pm_kind.F90:541
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
Definition: pm_kind.F90:540
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
Definition: pm_kind.F90:539
integer, parameter RKH
The scalar integer constant of intrinsic default kind, representing the highest-precision real kind t...
Definition: pm_kind.F90:858
Generate and return an object of type display_type.
Definition: pm_io.F90:10282

Example Unix compile command via Intel ifort compiler
1#!/usr/bin/env sh
2rm main.exe
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
4./main.exe

Example Windows Batch compile command via Intel ifort compiler
1del main.exe
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
4main.exe

Example Unix / MinGW compile command via GNU gfortran compiler
1#!/usr/bin/env sh
2rm main.exe
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
4./main.exe

Example output
1
2array = log([1., 2., 3., 4.])
3array
4+0.00000000, +0.693147182, +1.09861231, +1.38629436
5call setResized(cumPropExp, size(array, 1, IK))
6call setCumPropExp(cumPropExp, array, maxval(array), sequence)
7cumPropExp
8+0.100000001, +0.300000012, +0.600000024, +1.00000000
9call setCumPropExp(cumPropExp, array, maxval(array), selection)
10cumPropExp
11+0.100000001, +0.300000012, +0.600000024, +1.00000000
12
13array = array(size(array):1:-1)
14array
15+1.38629436, +1.09861231, +0.693147182, +0.00000000
16call setCumPropExp(cumPropExp, array, maxval(array), sequence, backward, nothing)
17cumPropExp
18+0.100000001, +0.300000012, +0.600000024, +1.00000000
19
20call setCumPropExp(cumPropExp, array, maxval(array), sequence, backward, reverse)
21cumPropExp
22+1.00000000, +0.600000024, +0.300000012, +0.100000001
23
24
25!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
26! Compute and return the cumulative sum in-place, within the input `Array`.
27!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
28
29
30array = log([1., 2., 3., 4.])
31array
32+0.00000000, +0.693147182, +1.09861231, +1.38629436
33call setCumPropExp(array, maxval(array), sequence)
34array
35+0.100000001, +0.300000012, +0.600000024, +1.00000000
36call setCumPropExp(array, maxval(array), selection)
37array
38+0.157984704, +0.350947648, +0.611420393, +1.00000000
39
40array = array(size(array):1:-1)
41array
42+1.00000000, +0.611420393, +0.350947648, +0.157984704
43call setCumPropExp(array, maxval(array), sequence, backward, nothing)
44array
45+0.163730785, +0.362309635, +0.619974375, +1.00000000
46
47call setCumPropExp(array, maxval(array), sequence, backward, reverse)
48array
49+1.00000000, +0.836214423, +0.636450350, +0.377974689
50
51
Benchmarks:


Benchmark :: The effects of control on runtime efficiency

The following program compares the runtime performance of setCumPropExp algorithm with and without checking for underflows.
1! Test the performance of `setCumPropExp()` with and without the `cenabled` argument.
2program benchmark
3
4 use iso_fortran_env, only: error_unit
5 use pm_bench, only: bench_type
6 use pm_kind, only: IK, LK, RK, SK
7
8 implicit none
9
10 integer(IK) :: i
11 integer(IK) :: iarr
12 integer(IK) :: fileUnitN
13 integer(IK) :: fileUnitU
14 integer(IK) , parameter :: NARR = 11_IK
15 integer(IK) , parameter :: NBENCH = 3_IK
16 integer(IK) :: arraySize(NARR)
17 real(RK) :: dummySum = 0._RK
18 real(RK) :: maxArray
19 real(RK) , allocatable :: array(:)
20 real(RK) , allocatable :: cumPropExp(:)
21 type(bench_type) :: bench(2,NBENCH)
22 logical(LK) :: underflowEnabled
23
24 bench(1:2,1) = bench_type(name = SK_"setCumPropExpSequence", exec = setCumPropExpSequence, overhead = setOverhead)
25 bench(1:2,2) = bench_type(name = SK_"setCumPropExpSelection", exec = setCumPropExpSelection, overhead = setOverhead)
26 bench(1:2,3) = bench_type(name = SK_"setCumPropExpDirect", exec = setCumPropExpDirect, overhead = setOverhead)
27
28 arraySize = [( 2_IK**iarr, iarr = 1_IK, NARR )]
29
30 write(*,"(*(g0,:,' '))")
31 write(*,"(*(g0,:,' '))") "setCumPropExp(..., sequence) vs. setCumPropExp(..., selection) vs. direct method."
32 write(*,"(*(g0,:,' '))")
33
34 open(newunit = fileUnitN, file = "main.normal.out", status = "replace")
35 open(newunit = fileUnitU, file = "main.underflow.out", status = "replace")
36
37 write(fileUnitN, "(*(g0,:,','))") "arraySize", (bench(1,i)%name, i = 1, NBENCH)
38 write(fileUnitU, "(*(g0,:,','))") "arraySize", (bench(2,i)%name, i = 1, NBENCH)
39
40 loopOverArraySize: do iarr = 1, NARR
41
42 allocate(array(arraySize(iarr)))
43 allocate(cumPropExp(arraySize(iarr)), source = 0._RK)
44 write(*,"(*(g0,:,' '))") "Benchmarking with array size", arraySize(iarr)
45
46 underflowEnabled = .false._LK
47 do i = 1, NBENCH
48 !do i = NBENCH, 1, -1
49 bench(1,i)%timing = bench(1,i)%getTiming(minsec = 0.07_RK)
50 end do
51 write(fileUnitN,"(*(g0,:,','))") arraySize(iarr), (bench(1,i)%timing%mean, i = 1, NBENCH)
52
53 underflowEnabled = .true._LK
54 do i = 1, NBENCH
55 bench(2,i)%timing = bench(2,i)%getTiming(minsec = 0.07_RK)
56 end do
57 write(fileUnitU,"(*(g0,:,','))") arraySize(iarr), (bench(2,i)%timing%mean, i = 1, NBENCH)
58
59 deallocate(array, cumPropExp)
60
61 end do loopOverArraySize
62 write(*,"(*(g0,:,' '))") dummySum
63 write(*,"(*(g0,:,' '))")
64
65 close(fileUnitN)
66 close(fileUnitU)
67
68contains
69
70 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
71 ! procedure wrappers.
72 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
73
74 subroutine setOverhead()
75 call getArray()
76 call getDummy()
77 end subroutine
78
79 subroutine getArray()
80 call random_number(array)
81 if (underflowEnabled) array = array * (maxexponent(0._RK) - minexponent(0._RK)) + minexponent(0._RK)
82 maxArray = maxval(array)
83 end subroutine
84
85 subroutine getDummy()
86 dummySum = dummySum + cumPropExp(1) + array(1)
87 end subroutine
88
89 subroutine setCumPropExpSequence()
90 use pm_mathCumPropExp, only: setCumPropExp, sequence
91 call getArray()
92 call setCumPropExp(cumPropExp, array, maxArray, sequence)
93 call getDummy()
94 end subroutine
95
96 subroutine setCumPropExpSelection()
97 use pm_mathCumPropExp, only: setCumPropExp, selection
98 call getArray()
99 call setCumPropExp(cumPropExp, array, maxArray, selection)
100 call getDummy()
101 end subroutine
102
103 subroutine setCumPropExpDirect()
104 use pm_mathCumSum, only: setCumSum
105 call getArray()
106 call setCumSum(cumPropExp, exp(array - maxArray))
107 cumPropExp = cumPropExp / cumPropExp(size(cumPropExp))
108 call getDummy()
109 end subroutine
110
111end program benchmark
Generate and return an object of type timing_type containing the benchmark timing information and sta...
Definition: pm_bench.F90:574
Return the cumulative sum of the input array, optionally in the backward direction and optionally,...
This module contains abstract interfaces and types that facilitate benchmarking of different procedur...
Definition: pm_bench.F90:41
integer, parameter RK
The default real kind in the ParaMonte library: real64 in Fortran, c_double in C-Fortran Interoperati...
Definition: pm_kind.F90:543
This module contains the procedures and interfaces for computing the cumulative sum of an array.
This is the class for creating benchmark and performance-profiling objects.
Definition: pm_bench.F90:386

Example Unix compile command via Intel ifort compiler
1#!/usr/bin/env sh
2rm main.exe
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
4./main.exe

Example Windows Batch compile command via Intel ifort compiler
1del main.exe
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
4main.exe

Example Unix / MinGW compile command via GNU gfortran compiler
1#!/usr/bin/env sh
2rm main.exe
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
4./main.exe

Postprocessing of the benchmark output
1#!/usr/bin/env python
2
3import matplotlib.pyplot as plt
4import pandas as pd
5import numpy as np
6
7fontsize = 14
8
9methods = ["direct method", "sequence", "selection"]
10
11
14
15df = pd.read_csv("main.normal.out")
16
17ax = plt.figure(figsize = 1.25 * np.array([6.4,4.6]), dpi = 200)
18ax = plt.subplot()
19
20plt.plot( df["arraySize"].values
21 , np.ones(len(df["arraySize"].values))
22 , linewidth = 2
23 , linestyle = "--"
24 , color = "black"
25 )
26plt.plot( df["arraySize"].values
27 , df["setCumPropExpSequence"].values / df["setCumPropExpDirect"].values
28 , linewidth = 2
29 )
30plt.plot( df["arraySize"].values
31 , df["setCumPropExpSelection"].values / df["setCumPropExpDirect"].values
32 , linewidth = 2
33 )
34
35plt.xticks(fontsize = fontsize)
36plt.yticks(fontsize = fontsize)
37ax.set_xlabel("Array Size", fontsize = fontsize)
38ax.set_ylabel("Runtime Ratio ( W.R.T. Direct Method )", fontsize = fontsize)
39ax.set_title("setCumPropExp performance when the\ninput array causes no underflow instances.\nLower is better.", fontsize = fontsize)
40ax.set_xscale("log")
41#ax.set_yscale("log")
42plt.minorticks_on()
43plt.grid(visible = True, which = "both", axis = "both", color = "0.85", linestyle = "-")
44ax.tick_params(axis = "y", which = "minor")
45ax.tick_params(axis = "x", which = "minor")
46ax.legend ( methods
47 #, loc='center left'
48 #, bbox_to_anchor=(1, 0.5)
49 , fontsize = fontsize
50 )
51
52plt.tight_layout()
53plt.savefig("benchmark.setCumPropExp.normal.png")
54
55
58
59df = pd.read_csv("main.underflow.out")
60
61ax = plt.figure(figsize = 1.25 * np.array([6.4,4.6]), dpi = 200)
62ax = plt.subplot()
63
64plt.plot( df["arraySize"].values
65 , np.ones(len(df["arraySize"].values))
66 , linewidth = 2
67 , linestyle = "--"
68 , color = "black"
69 )
70plt.plot( df["arraySize"].values
71 , df["setCumPropExpSequence"].values / df["setCumPropExpDirect"].values
72 , linewidth = 2
73 )
74plt.plot( df["arraySize"].values
75 , df["setCumPropExpSelection"].values / df["setCumPropExpDirect"].values
76 , linewidth = 2
77 )
78
79plt.xticks(fontsize = fontsize)
80plt.yticks(fontsize = fontsize)
81ax.set_xlabel("Array Size", fontsize = fontsize)
82ax.set_ylabel("Runtime Ratio (W.R.T. Direct Method)", fontsize = fontsize)
83ax.set_title("setCumPropExp performance when the\ninput array causes many underflow instances.\nLower is better.", fontsize = fontsize)
84ax.set_xscale("log")
85#ax.set_yscale("log")
86plt.minorticks_on()
87plt.grid(visible = True, which = "both", axis = "both", color = "0.85", linestyle = "-")
88ax.tick_params(axis = "y", which = "minor")
89ax.tick_params(axis = "x", which = "minor")
90ax.legend ( methods
91 #, loc='center left'
92 #, bbox_to_anchor=(1, 0.5)
93 , fontsize = fontsize
94 )
95
96plt.tight_layout()
97plt.savefig("benchmark.setCumPropExp.underflow.png")

Visualization of the benchmark output

Benchmark moral
  1. If the input array has many (half the size of array or more) elements whose division by the maxval(array) causes underflow, then setting control = selection when calling setCumPropExp will likely result in a faster runtime.
    Conversely, if the divisions are not expected to cause any or too many underflows, then set control = selection to improve cache coherence and runtime performance (at the expense of occasional expensive but redundant exponentiations).
  2. If the input array size is less than 10-20 elements and setCumPropExp is to be called billions of times, then it would make sense to manually inline the procedure implementation in your code as procedure call and processing of optional arguments will have a non-negligible performance overhead.
Test:
test_pm_mathCumPropExp
Todo:
Low Priority: This generic interface can be expanded to include input arrays with Weights.


Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Amir Shahmoradi, April 25, 2015, 2:21 PM, National Institute for Fusion Studies, The University of Texas Austin

Definition at line 569 of file pm_mathCumPropExp.F90.


The documentation for this interface was generated from the following file: