Line data Source code
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 :
17 : !> \brief
18 : !> This file contains the implementations of the tests of module [pm_arrayChange](@ref pm_arrayChange).
19 : !>
20 : !> \fintest
21 : !>
22 : !> \author
23 : !> \AmirShahmoradi, Sunday 4:33 PM, September 19, 2021, Dallas, TX
24 :
25 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
26 :
27 : submodule (test_pm_arrayChange) routines
28 :
29 : use pm_kind, only: LK, SK
30 : use pm_arrayRange, only: getRange
31 : use pm_arrayUnique, only: getUnique
32 : use pm_arrayResize, only: setResized
33 : use pm_arrayUnique, only: isUniqueAll
34 : use pm_arrayVerbose, only: getVerbose
35 : use pm_distUnif, only: getUnifRand
36 : use pm_distUnif, only: setUnifRand
37 : use pm_arrayMembership, only: operator(.in.)
38 : use pm_arrayMembership, only: operator(.allin.)
39 : use pm_io, only: display_type
40 : use pm_distUnif, only: rngf
41 : use pm_option, only: getOption
42 : use pm_val2str, only: getStr
43 : implicit none
44 :
45 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
46 :
47 : contains
48 :
49 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
50 :
51 : #define getChange_ENABLED 1
52 :
53 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
54 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
55 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
56 :
57 : #define D0_ENABLED 1
58 :
59 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
60 :
61 : #define SK_ENABLED 1
62 :
63 : #if SK5_ENABLED
64 : module procedure test_getChange_SK5
65 : use pm_kind, only: SKC => SK5
66 : #include "test_pm_arrayChange@routines.inc.F90"
67 : end procedure
68 : #endif
69 :
70 : #if SK4_ENABLED
71 : module procedure test_getChange_SK4
72 : use pm_kind, only: SKC => SK4
73 : #include "test_pm_arrayChange@routines.inc.F90"
74 : end procedure
75 : #endif
76 :
77 : #if SK3_ENABLED
78 : module procedure test_getChange_SK3
79 : use pm_kind, only: SKC => SK3
80 : #include "test_pm_arrayChange@routines.inc.F90"
81 : end procedure
82 : #endif
83 :
84 : #if SK2_ENABLED
85 : module procedure test_getChange_SK2
86 : use pm_kind, only: SKC => SK2
87 : #include "test_pm_arrayChange@routines.inc.F90"
88 : end procedure
89 : #endif
90 :
91 : #if SK1_ENABLED
92 1 : module procedure test_getChange_SK1
93 : use pm_kind, only: SKC => SK1
94 : #include "test_pm_arrayChange@routines.inc.F90"
95 : end procedure
96 : #endif
97 :
98 : #undef SK_ENABLED
99 :
100 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
101 :
102 : #undef D0_ENABLED
103 :
104 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
105 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
106 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
107 :
108 : #define D1_ENABLED 1
109 :
110 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
111 :
112 : #define IK_ENABLED 1
113 :
114 : #if IK5_ENABLED
115 1 : module procedure test_getChange_IK5
116 : use pm_kind, only: IKC => IK5
117 : #include "test_pm_arrayChange@routines.inc.F90"
118 : end procedure
119 : #endif
120 :
121 : #if IK4_ENABLED
122 1 : module procedure test_getChange_IK4
123 : use pm_kind, only: IKC => IK4
124 : #include "test_pm_arrayChange@routines.inc.F90"
125 : end procedure
126 : #endif
127 :
128 : #if IK3_ENABLED
129 1 : module procedure test_getChange_IK3
130 : use pm_kind, only: IKC => IK3
131 : #include "test_pm_arrayChange@routines.inc.F90"
132 : end procedure
133 : #endif
134 :
135 : #if IK2_ENABLED
136 1 : module procedure test_getChange_IK2
137 : use pm_kind, only: IKC => IK2
138 : #include "test_pm_arrayChange@routines.inc.F90"
139 : end procedure
140 : #endif
141 :
142 : #if IK1_ENABLED
143 1 : module procedure test_getChange_IK1
144 : use pm_kind, only: IKC => IK1
145 : #include "test_pm_arrayChange@routines.inc.F90"
146 : end procedure
147 : #endif
148 :
149 : #undef IK_ENABLED
150 :
151 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
152 :
153 : #define RK_ENABLED 1
154 :
155 : #if RK5_ENABLED
156 : module procedure test_getChange_RK5
157 : use pm_kind, only: RKC => RK5
158 : #include "test_pm_arrayChange@routines.inc.F90"
159 : end procedure
160 : #endif
161 :
162 : #if RK4_ENABLED
163 1 : module procedure test_getChange_RK4
164 : use pm_kind, only: RKC => RK4
165 : #include "test_pm_arrayChange@routines.inc.F90"
166 : end procedure
167 : #endif
168 :
169 : #if RK3_ENABLED
170 1 : module procedure test_getChange_RK3
171 : use pm_kind, only: RKC => RK3
172 : #include "test_pm_arrayChange@routines.inc.F90"
173 : end procedure
174 : #endif
175 :
176 : #if RK2_ENABLED
177 1 : module procedure test_getChange_RK2
178 : use pm_kind, only: RKC => RK2
179 : #include "test_pm_arrayChange@routines.inc.F90"
180 : end procedure
181 : #endif
182 :
183 : #if RK1_ENABLED
184 1 : module procedure test_getChange_RK1
185 : use pm_kind, only: RKC => RK1
186 : #include "test_pm_arrayChange@routines.inc.F90"
187 : end procedure
188 : #endif
189 :
190 : #undef RK_ENABLED
191 :
192 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
193 :
194 : #undef D1_ENABLED
195 :
196 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
197 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
198 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
199 :
200 : #undef getChange_ENABLED
201 :
202 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
203 :
204 : #define setChange_ENABLED 1
205 :
206 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
207 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
208 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
209 :
210 : #define D0_ENABLED 1
211 :
212 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
213 :
214 : #define SK_ENABLED 1
215 :
216 : #if SK5_ENABLED
217 : module procedure test_setChange_SK5
218 : use pm_kind, only: SKC => SK5
219 : #include "test_pm_arrayChange@routines.inc.F90"
220 : end procedure
221 : #endif
222 :
223 : #if SK4_ENABLED
224 : module procedure test_setChange_SK4
225 : use pm_kind, only: SKC => SK4
226 : #include "test_pm_arrayChange@routines.inc.F90"
227 : end procedure
228 : #endif
229 :
230 : #if SK3_ENABLED
231 : module procedure test_setChange_SK3
232 : use pm_kind, only: SKC => SK3
233 : #include "test_pm_arrayChange@routines.inc.F90"
234 : end procedure
235 : #endif
236 :
237 : #if SK2_ENABLED
238 : module procedure test_setChange_SK2
239 : use pm_kind, only: SKC => SK2
240 : #include "test_pm_arrayChange@routines.inc.F90"
241 : end procedure
242 : #endif
243 :
244 : #if SK1_ENABLED
245 1 : module procedure test_setChange_SK1
246 : use pm_kind, only: SKC => SK1
247 : #include "test_pm_arrayChange@routines.inc.F90"
248 : end procedure
249 : #endif
250 :
251 : #undef SK_ENABLED
252 :
253 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
254 :
255 : #undef D0_ENABLED
256 :
257 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
258 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
259 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
260 :
261 : #define D1_ENABLED 1
262 :
263 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
264 :
265 : #define IK_ENABLED 1
266 :
267 : #if IK5_ENABLED
268 1 : module procedure test_setChange_IK5
269 : use pm_kind, only: IKC => IK5
270 : #include "test_pm_arrayChange@routines.inc.F90"
271 : end procedure
272 : #endif
273 :
274 : #if IK4_ENABLED
275 1 : module procedure test_setChange_IK4
276 : use pm_kind, only: IKC => IK4
277 : #include "test_pm_arrayChange@routines.inc.F90"
278 : end procedure
279 : #endif
280 :
281 : #if IK3_ENABLED
282 1 : module procedure test_setChange_IK3
283 : use pm_kind, only: IKC => IK3
284 : #include "test_pm_arrayChange@routines.inc.F90"
285 : end procedure
286 : #endif
287 :
288 : #if IK2_ENABLED
289 1 : module procedure test_setChange_IK2
290 : use pm_kind, only: IKC => IK2
291 : #include "test_pm_arrayChange@routines.inc.F90"
292 : end procedure
293 : #endif
294 :
295 : #if IK1_ENABLED
296 1 : module procedure test_setChange_IK1
297 : use pm_kind, only: IKC => IK1
298 : #include "test_pm_arrayChange@routines.inc.F90"
299 : end procedure
300 : #endif
301 :
302 : #undef IK_ENABLED
303 :
304 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
305 :
306 : #define RK_ENABLED 1
307 :
308 : #if RK5_ENABLED
309 : module procedure test_setChange_RK5
310 : use pm_kind, only: RKC => RK5
311 : #include "test_pm_arrayChange@routines.inc.F90"
312 : end procedure
313 : #endif
314 :
315 : #if RK4_ENABLED
316 1 : module procedure test_setChange_RK4
317 : use pm_kind, only: RKC => RK4
318 : #include "test_pm_arrayChange@routines.inc.F90"
319 : end procedure
320 : #endif
321 :
322 : #if RK3_ENABLED
323 1 : module procedure test_setChange_RK3
324 : use pm_kind, only: RKC => RK3
325 : #include "test_pm_arrayChange@routines.inc.F90"
326 : end procedure
327 : #endif
328 :
329 : #if RK2_ENABLED
330 1 : module procedure test_setChange_RK2
331 : use pm_kind, only: RKC => RK2
332 : #include "test_pm_arrayChange@routines.inc.F90"
333 : end procedure
334 : #endif
335 :
336 : #if RK1_ENABLED
337 1 : module procedure test_setChange_RK1
338 : use pm_kind, only: RKC => RK1
339 : #include "test_pm_arrayChange@routines.inc.F90"
340 : end procedure
341 : #endif
342 :
343 : #undef RK_ENABLED
344 :
345 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
346 :
347 : #undef D1_ENABLED
348 :
349 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
350 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
351 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
352 :
353 : #undef setChange_ENABLED
354 :
355 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
356 :
357 : end submodule routines ! LCOV_EXCL_LINE
|