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 procedure implementations of [pm_mathCompare](@ref pm_mathCompare).
19 : !>
20 : !> \finmain
21 : !>
22 : !> \author
23 : !> \FatemehBagheri, Wednesday 12:20 PM, September 22, 2021, Dallas, TX
24 :
25 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
26 :
27 : submodule (pm_mathCompare) routines ! LCOV_EXCL_LINE
28 :
29 : #if CHECK_ENABLED
30 : use pm_err, only: getFine
31 : use pm_val2str, only: getStr
32 : use pm_err, only: setAsserted
33 : #define CHECK_ASSERTION(LINE,ASSERTION,MSG) \
34 : call setAsserted(ASSERTION,getFine(__FILE__,LINE)//MODULE_NAME//MSG);
35 : #else
36 : #define CHECK_ASSERTION(LINE,ASSERTION,MSG) continue;
37 : #endif
38 :
39 : implicit none
40 :
41 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
42 :
43 : contains
44 :
45 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
46 :
47 : #define isClose_ENABLED 1
48 :
49 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
50 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
51 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
52 :
53 : #define isCloseDefault_ENABLED 1
54 :
55 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
56 :
57 : #define isCloseDefault_CK_ENABLED 1
58 :
59 : #if CK5_ENABLED
60 : module procedure isCloseDefault_CK5
61 : use pm_kind, only: CKC => CK5
62 : #include "pm_mathCompare@routines.inc.F90"
63 : end procedure
64 : #endif
65 :
66 : #if CK4_ENABLED
67 586402 : module procedure isCloseDefault_CK4
68 : use pm_kind, only: CKC => CK4
69 : #include "pm_mathCompare@routines.inc.F90"
70 : end procedure
71 : #endif
72 :
73 : #if CK3_ENABLED
74 622238 : module procedure isCloseDefault_CK3
75 : use pm_kind, only: CKC => CK3
76 : #include "pm_mathCompare@routines.inc.F90"
77 : end procedure
78 : #endif
79 :
80 : #if CK2_ENABLED
81 622100 : module procedure isCloseDefault_CK2
82 : use pm_kind, only: CKC => CK2
83 : #include "pm_mathCompare@routines.inc.F90"
84 : end procedure
85 : #endif
86 :
87 : #if CK1_ENABLED
88 638135 : module procedure isCloseDefault_CK1
89 : use pm_kind, only: CKC => CK1
90 : #include "pm_mathCompare@routines.inc.F90"
91 : end procedure
92 : #endif
93 :
94 : #undef isCloseDefault_CK_ENABLED
95 :
96 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
97 :
98 : #define isCloseDefault_RK_ENABLED 1
99 :
100 : #if RK5_ENABLED
101 : module procedure isCloseDefault_RK5
102 : use pm_kind, only: RKC => RK5
103 : #include "pm_mathCompare@routines.inc.F90"
104 : end procedure
105 : #endif
106 :
107 : #if RK4_ENABLED
108 567720 : module procedure isCloseDefault_RK4
109 : use pm_kind, only: RKC => RK4
110 : #include "pm_mathCompare@routines.inc.F90"
111 : end procedure
112 : #endif
113 :
114 : #if RK3_ENABLED
115 617535 : module procedure isCloseDefault_RK3
116 : use pm_kind, only: RKC => RK3
117 : #include "pm_mathCompare@routines.inc.F90"
118 : end procedure
119 : #endif
120 :
121 : #if RK2_ENABLED
122 592488 : module procedure isCloseDefault_RK2
123 : use pm_kind, only: RKC => RK2
124 : #include "pm_mathCompare@routines.inc.F90"
125 : end procedure
126 : #endif
127 :
128 : #if RK1_ENABLED
129 588032 : module procedure isCloseDefault_RK1
130 : use pm_kind, only: RKC => RK1
131 : #include "pm_mathCompare@routines.inc.F90"
132 : end procedure
133 : #endif
134 :
135 : #undef isCloseDefault_RK_ENABLED
136 :
137 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
138 :
139 : #undef isCloseDefault_ENABLED
140 :
141 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
142 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
143 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
144 :
145 : #define isCloseReference_ENABLED 1
146 :
147 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
148 :
149 : #define isCloseReference_CK_ENABLED 1
150 :
151 : #if CK5_ENABLED
152 : module procedure isCloseReference_CK5
153 : use pm_kind, only: CKC => CK5
154 : #include "pm_mathCompare@routines.inc.F90"
155 : end procedure
156 : #endif
157 :
158 : #if CK4_ENABLED
159 133 : module procedure isCloseReference_CK4
160 : use pm_kind, only: CKC => CK4
161 : #include "pm_mathCompare@routines.inc.F90"
162 : end procedure
163 : #endif
164 :
165 : #if CK3_ENABLED
166 130 : module procedure isCloseReference_CK3
167 : use pm_kind, only: CKC => CK3
168 : #include "pm_mathCompare@routines.inc.F90"
169 : end procedure
170 : #endif
171 :
172 : #if CK2_ENABLED
173 142 : module procedure isCloseReference_CK2
174 : use pm_kind, only: CKC => CK2
175 : #include "pm_mathCompare@routines.inc.F90"
176 : end procedure
177 : #endif
178 :
179 : #if CK1_ENABLED
180 142 : module procedure isCloseReference_CK1
181 : use pm_kind, only: CKC => CK1
182 : #include "pm_mathCompare@routines.inc.F90"
183 : end procedure
184 : #endif
185 :
186 : #undef isCloseReference_CK_ENABLED
187 :
188 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
189 :
190 : #define isCloseReference_RK_ENABLED 1
191 :
192 : #if RK5_ENABLED
193 : module procedure isCloseReference_RK5
194 : use pm_kind, only: RKC => RK5
195 : #include "pm_mathCompare@routines.inc.F90"
196 : end procedure
197 : #endif
198 :
199 : #if RK4_ENABLED
200 133 : module procedure isCloseReference_RK4
201 : use pm_kind, only: RKC => RK4
202 : #include "pm_mathCompare@routines.inc.F90"
203 : end procedure
204 : #endif
205 :
206 : #if RK3_ENABLED
207 126 : module procedure isCloseReference_RK3
208 : use pm_kind, only: RKC => RK3
209 : #include "pm_mathCompare@routines.inc.F90"
210 : end procedure
211 : #endif
212 :
213 : #if RK2_ENABLED
214 125 : module procedure isCloseReference_RK2
215 : use pm_kind, only: RKC => RK2
216 : #include "pm_mathCompare@routines.inc.F90"
217 : end procedure
218 : #endif
219 :
220 : #if RK1_ENABLED
221 142 : module procedure isCloseReference_RK1
222 : use pm_kind, only: RKC => RK1
223 : #include "pm_mathCompare@routines.inc.F90"
224 : end procedure
225 : #endif
226 :
227 : #undef isCloseReference_RK_ENABLED
228 :
229 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
230 :
231 : #undef isCloseReference_ENABLED
232 :
233 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
234 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
235 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
236 :
237 : #define isCloseStrong_ENABLED 1
238 :
239 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
240 :
241 : #define isCloseStrong_CK_ENABLED 1
242 :
243 : #if CK5_ENABLED
244 : module procedure isCloseStrong_CK5
245 : use pm_kind, only: CKC => CK5
246 : #include "pm_mathCompare@routines.inc.F90"
247 : end procedure
248 : #endif
249 :
250 : #if CK4_ENABLED
251 118 : module procedure isCloseStrong_CK4
252 : use pm_kind, only: CKC => CK4
253 : #include "pm_mathCompare@routines.inc.F90"
254 : end procedure
255 : #endif
256 :
257 : #if CK3_ENABLED
258 113 : module procedure isCloseStrong_CK3
259 : use pm_kind, only: CKC => CK3
260 : #include "pm_mathCompare@routines.inc.F90"
261 : end procedure
262 : #endif
263 :
264 : #if CK2_ENABLED
265 129 : module procedure isCloseStrong_CK2
266 : use pm_kind, only: CKC => CK2
267 : #include "pm_mathCompare@routines.inc.F90"
268 : end procedure
269 : #endif
270 :
271 : #if CK1_ENABLED
272 132 : module procedure isCloseStrong_CK1
273 : use pm_kind, only: CKC => CK1
274 : #include "pm_mathCompare@routines.inc.F90"
275 : end procedure
276 : #endif
277 :
278 : #undef isCloseStrong_CK_ENABLED
279 :
280 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
281 :
282 : #define isCloseStrong_RK_ENABLED 1
283 :
284 : #if RK5_ENABLED
285 : module procedure isCloseStrong_RK5
286 : use pm_kind, only: RKC => RK5
287 : #include "pm_mathCompare@routines.inc.F90"
288 : end procedure
289 : #endif
290 :
291 : #if RK4_ENABLED
292 131 : module procedure isCloseStrong_RK4
293 : use pm_kind, only: RKC => RK4
294 : #include "pm_mathCompare@routines.inc.F90"
295 : end procedure
296 : #endif
297 :
298 : #if RK3_ENABLED
299 119 : module procedure isCloseStrong_RK3
300 : use pm_kind, only: RKC => RK3
301 : #include "pm_mathCompare@routines.inc.F90"
302 : end procedure
303 : #endif
304 :
305 : #if RK2_ENABLED
306 133 : module procedure isCloseStrong_RK2
307 : use pm_kind, only: RKC => RK2
308 : #include "pm_mathCompare@routines.inc.F90"
309 : end procedure
310 : #endif
311 :
312 : #if RK1_ENABLED
313 123 : module procedure isCloseStrong_RK1
314 : use pm_kind, only: RKC => RK1
315 : #include "pm_mathCompare@routines.inc.F90"
316 : end procedure
317 : #endif
318 :
319 : #undef isCloseStrong_RK_ENABLED
320 :
321 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
322 :
323 : #undef isCloseStrong_ENABLED
324 :
325 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
326 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
327 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
328 :
329 : #define isCloseWeak_ENABLED 1
330 :
331 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
332 :
333 : #define isCloseWeak_CK_ENABLED 1
334 :
335 : #if CK5_ENABLED
336 : module procedure isCloseWeak_CK5
337 : use pm_kind, only: CKC => CK5
338 : #include "pm_mathCompare@routines.inc.F90"
339 : end procedure
340 : #endif
341 :
342 : #if CK4_ENABLED
343 134 : module procedure isCloseWeak_CK4
344 : use pm_kind, only: CKC => CK4
345 : #include "pm_mathCompare@routines.inc.F90"
346 : end procedure
347 : #endif
348 :
349 : #if CK3_ENABLED
350 120 : module procedure isCloseWeak_CK3
351 : use pm_kind, only: CKC => CK3
352 : #include "pm_mathCompare@routines.inc.F90"
353 : end procedure
354 : #endif
355 :
356 : #if CK2_ENABLED
357 119 : module procedure isCloseWeak_CK2
358 : use pm_kind, only: CKC => CK2
359 : #include "pm_mathCompare@routines.inc.F90"
360 : end procedure
361 : #endif
362 :
363 : #if CK1_ENABLED
364 136 : module procedure isCloseWeak_CK1
365 : use pm_kind, only: CKC => CK1
366 : #include "pm_mathCompare@routines.inc.F90"
367 : end procedure
368 : #endif
369 :
370 : #undef isCloseWeak_CK_ENABLED
371 :
372 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
373 :
374 : #define isCloseWeak_RK_ENABLED 1
375 :
376 : #if RK5_ENABLED
377 : module procedure isCloseWeak_RK5
378 : use pm_kind, only: RKC => RK5
379 : #include "pm_mathCompare@routines.inc.F90"
380 : end procedure
381 : #endif
382 :
383 : #if RK4_ENABLED
384 153 : module procedure isCloseWeak_RK4
385 : use pm_kind, only: RKC => RK4
386 : #include "pm_mathCompare@routines.inc.F90"
387 : end procedure
388 : #endif
389 :
390 : #if RK3_ENABLED
391 129 : module procedure isCloseWeak_RK3
392 : use pm_kind, only: RKC => RK3
393 : #include "pm_mathCompare@routines.inc.F90"
394 : end procedure
395 : #endif
396 :
397 : #if RK2_ENABLED
398 136 : module procedure isCloseWeak_RK2
399 : use pm_kind, only: RKC => RK2
400 : #include "pm_mathCompare@routines.inc.F90"
401 : end procedure
402 : #endif
403 :
404 : #if RK1_ENABLED
405 136 : module procedure isCloseWeak_RK1
406 : use pm_kind, only: RKC => RK1
407 : #include "pm_mathCompare@routines.inc.F90"
408 : end procedure
409 : #endif
410 :
411 : #undef isCloseWeak_RK_ENABLED
412 :
413 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
414 :
415 : #undef isCloseWeak_ENABLED
416 :
417 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
418 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
419 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
420 :
421 : #define isCloseMean_ENABLED 1
422 :
423 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
424 :
425 : #define isCloseMean_CK_ENABLED 1
426 :
427 : #if CK5_ENABLED
428 : module procedure isCloseMean_CK5
429 : use pm_kind, only: CKC => CK5
430 : #include "pm_mathCompare@routines.inc.F90"
431 : end procedure
432 : #endif
433 :
434 : #if CK4_ENABLED
435 108 : module procedure isCloseMean_CK4
436 : use pm_kind, only: CKC => CK4
437 : #include "pm_mathCompare@routines.inc.F90"
438 : end procedure
439 : #endif
440 :
441 : #if CK3_ENABLED
442 131 : module procedure isCloseMean_CK3
443 : use pm_kind, only: CKC => CK3
444 : #include "pm_mathCompare@routines.inc.F90"
445 : end procedure
446 : #endif
447 :
448 : #if CK2_ENABLED
449 123 : module procedure isCloseMean_CK2
450 : use pm_kind, only: CKC => CK2
451 : #include "pm_mathCompare@routines.inc.F90"
452 : end procedure
453 : #endif
454 :
455 : #if CK1_ENABLED
456 113 : module procedure isCloseMean_CK1
457 : use pm_kind, only: CKC => CK1
458 : #include "pm_mathCompare@routines.inc.F90"
459 : end procedure
460 : #endif
461 :
462 : #undef isCloseMean_CK_ENABLED
463 :
464 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
465 :
466 : #define isCloseMean_RK_ENABLED 1
467 :
468 : #if RK5_ENABLED
469 : module procedure isCloseMean_RK5
470 : use pm_kind, only: RKC => RK5
471 : #include "pm_mathCompare@routines.inc.F90"
472 : end procedure
473 : #endif
474 :
475 : #if RK4_ENABLED
476 114 : module procedure isCloseMean_RK4
477 : use pm_kind, only: RKC => RK4
478 : #include "pm_mathCompare@routines.inc.F90"
479 : end procedure
480 : #endif
481 :
482 : #if RK3_ENABLED
483 129 : module procedure isCloseMean_RK3
484 : use pm_kind, only: RKC => RK3
485 : #include "pm_mathCompare@routines.inc.F90"
486 : end procedure
487 : #endif
488 :
489 : #if RK2_ENABLED
490 127 : module procedure isCloseMean_RK2
491 : use pm_kind, only: RKC => RK2
492 : #include "pm_mathCompare@routines.inc.F90"
493 : end procedure
494 : #endif
495 :
496 : #if RK1_ENABLED
497 140 : module procedure isCloseMean_RK1
498 : use pm_kind, only: RKC => RK1
499 : #include "pm_mathCompare@routines.inc.F90"
500 : end procedure
501 : #endif
502 :
503 : #undef isCloseMean_RK_ENABLED
504 :
505 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
506 :
507 : #undef isCloseMean_ENABLED
508 :
509 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
510 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
511 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
512 :
513 : #undef isClose_ENABLED
514 :
515 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
516 :
517 : end submodule routines
|