ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
test_pm_distanceEuclid.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
23
24!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
25
27
29 use pm_err, only: err_type
30 use pm_test, only: test_type, LK
31 use pm_kind, only: 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 RK5_ENABLED
45 module function test_getDisEuclid_RK5() result(assertion); logical(LK) :: assertion; end function
46#endif
47#if RK4_ENABLED
48 module function test_getDisEuclid_RK4() result(assertion); logical(LK) :: assertion; end function
49#endif
50#if RK3_ENABLED
51 module function test_getDisEuclid_RK3() result(assertion); logical(LK) :: assertion; end function
52#endif
53#if RK2_ENABLED
54 module function test_getDisEuclid_RK2() result(assertion); logical(LK) :: assertion; end function
55#endif
56#if RK1_ENABLED
57 module function test_getDisEuclid_RK1() result(assertion); logical(LK) :: assertion; end function
58#endif
59
60 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
61
62 end interface
63
64!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
65
66 interface
67
68 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
69
70#if RK5_ENABLED
71 module function test_setDisEuclid_RK5() result(assertion); logical(LK) :: assertion; end function
72#endif
73#if RK4_ENABLED
74 module function test_setDisEuclid_RK4() result(assertion); logical(LK) :: assertion; end function
75#endif
76#if RK3_ENABLED
77 module function test_setDisEuclid_RK3() result(assertion); logical(LK) :: assertion; end function
78#endif
79#if RK2_ENABLED
80 module function test_setDisEuclid_RK2() result(assertion); logical(LK) :: assertion; end function
81#endif
82#if RK1_ENABLED
83 module function test_setDisEuclid_RK1() result(assertion); logical(LK) :: assertion; end function
84#endif
85
86 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
87
88 end interface
89
90!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
91
92 interface
93
94 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
95
96#if RK5_ENABLED
97 module function test_getDisMatEuclid_RK5() result(assertion); logical(LK) :: assertion; end function
98#endif
99#if RK4_ENABLED
100 module function test_getDisMatEuclid_RK4() result(assertion); logical(LK) :: assertion; end function
101#endif
102#if RK3_ENABLED
103 module function test_getDisMatEuclid_RK3() result(assertion); logical(LK) :: assertion; end function
104#endif
105#if RK2_ENABLED
106 module function test_getDisMatEuclid_RK2() result(assertion); logical(LK) :: assertion; end function
107#endif
108#if RK1_ENABLED
109 module function test_getDisMatEuclid_RK1() result(assertion); logical(LK) :: assertion; end function
110#endif
111
112 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
113
114 end interface
115
116!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
117
118 interface
119
120 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
121
122#if RK5_ENABLED
123 module function test_setDisMatEuclid_RK5() result(assertion); logical(LK) :: assertion; end function
124#endif
125#if RK4_ENABLED
126 module function test_setDisMatEuclid_RK4() result(assertion); logical(LK) :: assertion; end function
127#endif
128#if RK3_ENABLED
129 module function test_setDisMatEuclid_RK3() result(assertion); logical(LK) :: assertion; end function
130#endif
131#if RK2_ENABLED
132 module function test_setDisMatEuclid_RK2() result(assertion); logical(LK) :: assertion; end function
133#endif
134#if RK1_ENABLED
135 module function test_setDisMatEuclid_RK1() result(assertion); logical(LK) :: assertion; end function
136#endif
137
138 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
139
140 end interface
141
142!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
143
144contains
145
146!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
147
148 subroutine setTest()
149
151
152 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
153
154 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
155
156#if RK5_ENABLED
157 call test%run(test_getDisEuclid_RK5, SK_"test_getDisEuclid_RK5")
158#endif
159#if RK4_ENABLED
160 call test%run(test_getDisEuclid_RK4, SK_"test_getDisEuclid_RK4")
161#endif
162#if RK3_ENABLED
163 call test%run(test_getDisEuclid_RK3, SK_"test_getDisEuclid_RK3")
164#endif
165#if RK2_ENABLED
166 call test%run(test_getDisEuclid_RK2, SK_"test_getDisEuclid_RK2")
167#endif
168#if RK1_ENABLED
169 call test%run(test_getDisEuclid_RK1, SK_"test_getDisEuclid_RK1")
170#endif
171
172 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
173
174 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
175
176 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
177
178#if RK5_ENABLED
179 call test%run(test_setDisEuclid_RK5, SK_"test_setDisEuclid_RK5")
180#endif
181#if RK4_ENABLED
182 call test%run(test_setDisEuclid_RK4, SK_"test_setDisEuclid_RK4")
183#endif
184#if RK3_ENABLED
185 call test%run(test_setDisEuclid_RK3, SK_"test_setDisEuclid_RK3")
186#endif
187#if RK2_ENABLED
188 call test%run(test_setDisEuclid_RK2, SK_"test_setDisEuclid_RK2")
189#endif
190#if RK1_ENABLED
191 call test%run(test_setDisEuclid_RK1, SK_"test_setDisEuclid_RK1")
192#endif
193
194 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
195
196 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
197
198 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
199
200#if RK5_ENABLED
201 call test%run(test_getDisMatEuclid_RK5, SK_"test_getDisMatEuclid_RK5")
202#endif
203#if RK4_ENABLED
204 call test%run(test_getDisMatEuclid_RK4, SK_"test_getDisMatEuclid_RK4")
205#endif
206#if RK3_ENABLED
207 call test%run(test_getDisMatEuclid_RK3, SK_"test_getDisMatEuclid_RK3")
208#endif
209#if RK2_ENABLED
210 call test%run(test_getDisMatEuclid_RK2, SK_"test_getDisMatEuclid_RK2")
211#endif
212#if RK1_ENABLED
213 call test%run(test_getDisMatEuclid_RK1, SK_"test_getDisMatEuclid_RK1")
214#endif
215
216 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
217
218 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
219
220 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
221
222#if RK5_ENABLED
223 call test%run(test_setDisMatEuclid_RK5, SK_"test_setDisMatEuclid_RK5")
224#endif
225#if RK4_ENABLED
226 call test%run(test_setDisMatEuclid_RK4, SK_"test_setDisMatEuclid_RK4")
227#endif
228#if RK3_ENABLED
229 call test%run(test_setDisMatEuclid_RK3, SK_"test_setDisMatEuclid_RK3")
230#endif
231#if RK2_ENABLED
232 call test%run(test_setDisMatEuclid_RK2, SK_"test_setDisMatEuclid_RK2")
233#endif
234#if RK1_ENABLED
235 call test%run(test_setDisMatEuclid_RK1, SK_"test_setDisMatEuclid_RK1")
236#endif
237
238 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
239
240 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
241 call test%summarize()
242
243 end subroutine setTest
244
245!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
246
247end module test_pm_distanceEuclid
This module contains procedures and generic interfaces for computing the Euclidean norm of a single p...
character(*, SK), parameter MODULE_NAME
This module contains classes and procedures for reporting and handling errors.
Definition: pm_err.F90:52
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
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_distanceEuclid.
This is the derived type for generating objects to gracefully and verbosely handle runtime unexpected...
Definition: pm_err.F90:157
This is the derived type test_type for generating objects that facilitate testing of a series of proc...
Definition: pm_test.F90:209