ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
test_pm_sampleShift.F90
Go to the documentation of this file.
1!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3!!!! !!!!
4!!!! ParaMonte: Parallel Monte Carlo and Machine Learning Library. !!!!
5!!!! !!!!
6!!!! Copyright (C) 2012-present, The Computational Data Science Lab !!!!
7!!!! !!!!
8!!!! This file is part of the ParaMonte library. !!!!
9!!!! !!!!
10!!!! LICENSE !!!!
11!!!! !!!!
12!!!! https://github.com/cdslaborg/paramonte/blob/main/LICENSE.md !!!!
13!!!! !!!!
14!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
15!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16
24
25!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
26
28
30 use pm_kind, only: IK, RK
31 use pm_test, only: test_type, LK
32 implicit none
33
34 private
35 public :: setTest
36 type(test_type) :: test
37
38!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
39
40 interface
41
42 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
43
44#if CK5_ENABLED
45 module function test_getShifted_CK5() result(assertion); logical(LK) :: assertion; end function
46#endif
47#if CK4_ENABLED
48 module function test_getShifted_CK4() result(assertion); logical(LK) :: assertion; end function
49#endif
50#if CK3_ENABLED
51 module function test_getShifted_CK3() result(assertion); logical(LK) :: assertion; end function
52#endif
53#if CK2_ENABLED
54 module function test_getShifted_CK2() result(assertion); logical(LK) :: assertion; end function
55#endif
56#if CK1_ENABLED
57 module function test_getShifted_CK1() result(assertion); logical(LK) :: assertion; end function
58#endif
59
60 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
61
62#if RK5_ENABLED
63 module function test_getShifted_RK5() result(assertion); logical(LK) :: assertion; end function
64#endif
65#if RK4_ENABLED
66 module function test_getShifted_RK4() result(assertion); logical(LK) :: assertion; end function
67#endif
68#if RK3_ENABLED
69 module function test_getShifted_RK3() result(assertion); logical(LK) :: assertion; end function
70#endif
71#if RK2_ENABLED
72 module function test_getShifted_RK2() result(assertion); logical(LK) :: assertion; end function
73#endif
74#if RK1_ENABLED
75 module function test_getShifted_RK1() result(assertion); logical(LK) :: assertion; end function
76#endif
77
78 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
79
80 end interface
81
82!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
83
84 interface
85
86 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
87
88#if CK5_ENABLED
89 module function test_setShifted_CK5() result(assertion); logical(LK) :: assertion; end function
90#endif
91#if CK4_ENABLED
92 module function test_setShifted_CK4() result(assertion); logical(LK) :: assertion; end function
93#endif
94#if CK3_ENABLED
95 module function test_setShifted_CK3() result(assertion); logical(LK) :: assertion; end function
96#endif
97#if CK2_ENABLED
98 module function test_setShifted_CK2() result(assertion); logical(LK) :: assertion; end function
99#endif
100#if CK1_ENABLED
101 module function test_setShifted_CK1() result(assertion); logical(LK) :: assertion; end function
102#endif
103
104 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
105
106#if RK5_ENABLED
107 module function test_setShifted_RK5() result(assertion); logical(LK) :: assertion; end function
108#endif
109#if RK4_ENABLED
110 module function test_setShifted_RK4() result(assertion); logical(LK) :: assertion; end function
111#endif
112#if RK3_ENABLED
113 module function test_setShifted_RK3() result(assertion); logical(LK) :: assertion; end function
114#endif
115#if RK2_ENABLED
116 module function test_setShifted_RK2() result(assertion); logical(LK) :: assertion; end function
117#endif
118#if RK1_ENABLED
119 module function test_setShifted_RK1() result(assertion); logical(LK) :: assertion; end function
120#endif
121
122 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
123
124 end interface
125
126!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
127
128contains
129
130!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
131
132 subroutine setTest()
133
134 implicit none
135
137
138 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
139 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
140 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
141
142 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
143
144#if CK5_ENABLED
145 call test%run(test_getShifted_CK5, SK_"test_getShifted_CK5")
146#endif
147#if CK4_ENABLED
148 call test%run(test_getShifted_CK4, SK_"test_getShifted_CK4")
149#endif
150#if CK3_ENABLED
151 call test%run(test_getShifted_CK3, SK_"test_getShifted_CK3")
152#endif
153#if CK2_ENABLED
154 call test%run(test_getShifted_CK2, SK_"test_getShifted_CK2")
155#endif
156#if CK1_ENABLED
157 call test%run(test_getShifted_CK1, SK_"test_getShifted_CK1")
158#endif
159
160 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
161
162#if RK5_ENABLED
163 call test%run(test_getShifted_RK5, SK_"test_getShifted_RK5")
164#endif
165#if RK4_ENABLED
166 call test%run(test_getShifted_RK4, SK_"test_getShifted_RK4")
167#endif
168#if RK3_ENABLED
169 call test%run(test_getShifted_RK3, SK_"test_getShifted_RK3")
170#endif
171#if RK2_ENABLED
172 call test%run(test_getShifted_RK2, SK_"test_getShifted_RK2")
173#endif
174#if RK1_ENABLED
175 call test%run(test_getShifted_RK1, SK_"test_getShifted_RK1")
176#endif
177
178 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
179
180 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
181 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
182 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
183
184 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
185
186#if CK5_ENABLED
187 call test%run(test_setShifted_CK5, SK_"test_setShifted_CK5")
188#endif
189#if CK4_ENABLED
190 call test%run(test_setShifted_CK4, SK_"test_setShifted_CK4")
191#endif
192#if CK3_ENABLED
193 call test%run(test_setShifted_CK3, SK_"test_setShifted_CK3")
194#endif
195#if CK2_ENABLED
196 call test%run(test_setShifted_CK2, SK_"test_setShifted_CK2")
197#endif
198#if CK1_ENABLED
199 call test%run(test_setShifted_CK1, SK_"test_setShifted_CK1")
200#endif
201
202 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
203
204#if RK5_ENABLED
205 call test%run(test_setShifted_RK5, SK_"test_setShifted_RK5")
206#endif
207#if RK4_ENABLED
208 call test%run(test_setShifted_RK4, SK_"test_setShifted_RK4")
209#endif
210#if RK3_ENABLED
211 call test%run(test_setShifted_RK3, SK_"test_setShifted_RK3")
212#endif
213#if RK2_ENABLED
214 call test%run(test_setShifted_RK2, SK_"test_setShifted_RK2")
215#endif
216#if RK1_ENABLED
217 call test%run(test_setShifted_RK1, SK_"test_setShifted_RK1")
218#endif
219
220 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
221
222 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
223 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
224 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
225
226 call test%summarize()
227
228 end subroutine setTest
229
230!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
231
232end module test_pm_sampleShift
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
Definition: pm_kind.F90:268
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
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
This module contains classes and procedures for shifting univariate or multivariate samples by arbitr...
character(*, SK), parameter MODULE_NAME
This module contains a simple unit-testing framework for the Fortran libraries, including the ParaMon...
Definition: pm_test.F90:42
This module contains tests of the module pm_sampleShift.
This is the derived type test_type for generating objects that facilitate testing of a series of proc...
Definition: pm_test.F90:209