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

Return the linSpace output argument with size(linSpace) elements of evenly-spaced values over the interval [x1, x2] if x1 < x2, or [x2, x1] if x2 < x1. More...

Detailed Description

Return the linSpace output argument with size(linSpace) elements of evenly-spaced values over the interval [x1, x2] if x1 < x2, or [x2, x1] if x2 < x1.

Parameters
[out]linSpace: The output contiguous array of either
  1. type real of kind any supported by the processor (e.g., RK, RK32, RK64, or RK128) or
  2. type complex of kind any supported by the processor (e.g., CK, CK32, CK64, or CK128)
containing the evenly spaced numbers.
[in]x1: The input scalar of the same type and kind as linSpace representing the starting value of the sequence.
[in]x2: The input scalar of the same type and kind as x1 representing the ending value of the sequence.
[in]fopen: The input scalar of type logical of default kind LK. If .true., the linSpace will be first-open, meaning that x1 will NOT be in the output linSpace sequence.
(optional, default = .false.)
[in]lopen: The input scalar of type logical of default kind LK. If .true., the linSpace will be last-open, meaning that x2 will NOT be in the output linSpace sequence.
(optional, default = .false.)


Possible calling interfaces

call setLinSpace(linSpace, x1, x2, fopen = fopen, lopen = lopen)
Return the linSpace output argument with size(linSpace) elements of evenly-spaced values over the int...
This module contains procedures and generic interfaces for generating arrays with linear or logarithm...
Remarks
The procedures under discussion are pure.
Setting both fopen = .true. and lopen = .true. will lead to an output linSpace whose points are centers of the count + 1 equally-sized bins in the interval [x1,x2].
If linSpace has a size of 1 while fopen = .false. and lopen = .false., then linSpace = [x1] on return.
See also
getLinSpace
getLogSpace
setLogSpace


Example usage

1program example
2
3 use pm_kind, only: SK
4 use pm_io, only: display_type
5 use pm_kind, only: IK, LK, RKS, RKD, RKH, CKS, CKD, CKH
6 use pm_arraySpace, only: setLinSpace
7
8 implicit none
9
10 real(RKH) :: logSpace_RKH(4)
11 real(RKD) :: logSpace_RKD(4)
12 real(RKS) :: logSpace_RKS(4)
13 complex(CKH) :: logSpace_CKH(4)
14 complex(CKD) :: logSpace_CKD(4)
15 complex(CKS) :: logSpace_CKS(4)
16
17 type(display_type) :: disp
18 disp = display_type(file = "main.out.F90")
19
20 call disp%skip
21 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%")
22 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%")
23 call disp%show("!Generate real linspace.")
24 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%")
25 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%")
26 call disp%skip
27
28 call disp%skip
29 call disp%show("!%%%%%%%%%%%")
30 call disp%show("!32-bit real")
31 call disp%show("!%%%%%%%%%%%")
32 call disp%skip
33
34 call disp%skip
35 call disp%show("call setLinSpace(logSpace_RKS, 0._RKS, 10._RKS)")
36 call setLinSpace(logSpace_RKS, 0._RKS, 10._RKS)
37 call disp%show("logSpace_RKS")
38 call disp%show( logSpace_RKS )
39 call disp%skip
40 call disp%show("call setLinSpace(logSpace_RKS, 0._RKS, 10._RKS, fopen = .true._LK)")
41 call setLinSpace(logSpace_RKS, 0._RKS, 10._RKS, fopen = .true._LK)
42 call disp%show("logSpace_RKS")
43 call disp%show( logSpace_RKS )
44 call disp%skip
45 call disp%show("call setLinSpace(logSpace_RKS, 0._RKS, 10._RKS, lopen = .true._LK)")
46 call setLinSpace(logSpace_RKS, 0._RKS, 10._RKS, lopen = .true._LK)
47 call disp%show("logSpace_RKS")
48 call disp%show( logSpace_RKS )
49 call disp%skip
50 call disp%show("call setLinSpace(logSpace_RKS, 0._RKS, 10._RKS, fopen = .true._LK, lopen = .true._LK)")
51 call setLinSpace(logSpace_RKS, 0._RKS, 10._RKS, fopen = .true._LK, lopen = .true._LK)
52 call disp%show("logSpace_RKS")
53 call disp%show( logSpace_RKS )
54 call disp%skip
55
56 ! Generate sequence in reverse.
57
58 call disp%skip
59 call disp%show("call setLinSpace(logSpace_RKS, 10._RKS, 0._RKS)")
60 call setLinSpace(logSpace_RKS, 10._RKS, 0._RKS)
61 call disp%show("logSpace_RKS")
62 call disp%show( logSpace_RKS )
63 call disp%skip
64 call disp%show("call setLinSpace(logSpace_RKS, 10._RKS, 0._RKS, fopen = .true._LK)")
65 call setLinSpace(logSpace_RKS, 10._RKS, 0._RKS, fopen = .true._LK)
66 call disp%show("logSpace_RKS")
67 call disp%show( logSpace_RKS )
68 call disp%skip
69 call disp%show("call setLinSpace(logSpace_RKS, 10._RKS, 0._RKS, lopen = .true._LK)")
70 call setLinSpace(logSpace_RKS, 10._RKS, 0._RKS, lopen = .true._LK)
71 call disp%show("logSpace_RKS")
72 call disp%show( logSpace_RKS )
73 call disp%skip
74 call disp%show("call setLinSpace(logSpace_RKS, 10._RKS, 0._RKS, fopen = .true._LK, lopen = .true._LK)")
75 call setLinSpace(logSpace_RKS, 10._RKS, 0._RKS, fopen = .true._LK, lopen = .true._LK)
76 call disp%show("logSpace_RKS")
77 call disp%show( logSpace_RKS )
78 call disp%skip
79
80 call disp%skip
81 call disp%show("!%%%%%%%%%%%")
82 call disp%show("!64-bit real")
83 call disp%show("!%%%%%%%%%%%")
84 call disp%skip
85
86 call disp%skip
87 call disp%show("call setLinSpace(logSpace_RKD, 0._RKD, 10._RKD)")
88 call setLinSpace(logSpace_RKD, 0._RKD, 10._RKD)
89 call disp%show("logSpace_RKD")
90 call disp%show( logSpace_RKD )
91 call disp%skip
92 call disp%show("call setLinSpace(logSpace_RKD, 0._RKD, 10._RKD, fopen = .true._LK)")
93 call setLinSpace(logSpace_RKD, 0._RKD, 10._RKD, fopen = .true._LK)
94 call disp%show("logSpace_RKD")
95 call disp%show( logSpace_RKD )
96 call disp%skip
97 call disp%show("call setLinSpace(logSpace_RKD, 0._RKD, 10._RKD, lopen = .true._LK)")
98 call setLinSpace(logSpace_RKD, 0._RKD, 10._RKD, lopen = .true._LK)
99 call disp%show("logSpace_RKD")
100 call disp%show( logSpace_RKD )
101 call disp%skip
102 call disp%show("call setLinSpace(logSpace_RKD, 0._RKD, 10._RKD, fopen = .true._LK, lopen = .true._LK)")
103 call setLinSpace(logSpace_RKD, 0._RKD, 10._RKD, fopen = .true._LK, lopen = .true._LK)
104 call disp%show("logSpace_RKD")
105 call disp%show( logSpace_RKD )
106 call disp%skip
107
108 ! Generate sequence in reverse.
109
110 call disp%skip
111 call disp%show("call setLinSpace(logSpace_RKD, 10._RKD, 0._RKD)")
112 call setLinSpace(logSpace_RKD, 10._RKD, 0._RKD)
113 call disp%show("logSpace_RKD")
114 call disp%show( logSpace_RKD )
115 call disp%skip
116 call disp%show("call setLinSpace(logSpace_RKD, 10._RKD, 0._RKD, fopen = .true._LK)")
117 call setLinSpace(logSpace_RKD, 10._RKD, 0._RKD, fopen = .true._LK)
118 call disp%show("logSpace_RKD")
119 call disp%show( logSpace_RKD )
120 call disp%skip
121 call disp%show("call setLinSpace(logSpace_RKD, 10._RKD, 0._RKD, lopen = .true._LK)")
122 call setLinSpace(logSpace_RKD, 10._RKD, 0._RKD, lopen = .true._LK)
123 call disp%show("logSpace_RKD")
124 call disp%show( logSpace_RKD )
125 call disp%skip
126 call disp%show("call setLinSpace(logSpace_RKD, 10._RKD, 0._RKD, fopen = .true._LK, lopen = .true._LK)")
127 call setLinSpace(logSpace_RKD, 10._RKD, 0._RKD, fopen = .true._LK, lopen = .true._LK)
128 call disp%show("logSpace_RKD")
129 call disp%show( logSpace_RKD )
130 call disp%skip
131
132 call disp%skip
133 call disp%show("!%%%%%%%%%%%%")
134 call disp%show("!128-bit real")
135 call disp%show("!%%%%%%%%%%%%")
136 call disp%skip
137
138 call disp%skip
139 call disp%show("call setLinSpace(logSpace_RKH, 0._RKH, 10._RKH)")
140 call setLinSpace(logSpace_RKH, 0._RKH, 10._RKH)
141 call disp%show("logSpace_RKH")
142 call disp%show( logSpace_RKH )
143 call disp%skip
144 call disp%show("call setLinSpace(logSpace_RKH, 0._RKH, 10._RKH, fopen = .true._LK)")
145 call setLinSpace(logSpace_RKH, 0._RKH, 10._RKH, fopen = .true._LK)
146 call disp%show("logSpace_RKH")
147 call disp%show( logSpace_RKH )
148 call disp%skip
149 call disp%show("call setLinSpace(logSpace_RKH, 0._RKH, 10._RKH, lopen = .true._LK)")
150 call setLinSpace(logSpace_RKH, 0._RKH, 10._RKH, lopen = .true._LK)
151 call disp%show("logSpace_RKH")
152 call disp%show( logSpace_RKH )
153 call disp%skip
154 call disp%show("call setLinSpace(logSpace_RKH, 0._RKH, 10._RKH, fopen = .true._LK, lopen = .true._LK)")
155 call setLinSpace(logSpace_RKH, 0._RKH, 10._RKH, fopen = .true._LK, lopen = .true._LK)
156 call disp%show("logSpace_RKH")
157 call disp%show( logSpace_RKH )
158 call disp%skip
159
160 ! Generate sequence in reverse.
161
162 call disp%skip
163 call disp%show("call setLinSpace(logSpace_RKH, 10._RKH, 0._RKH)")
164 call setLinSpace(logSpace_RKH, 10._RKH, 0._RKH)
165 call disp%show("logSpace_RKH")
166 call disp%show( logSpace_RKH )
167 call disp%skip
168 call disp%show("call setLinSpace(logSpace_RKH, 10._RKH, 0._RKH, fopen = .true._LK)")
169 call setLinSpace(logSpace_RKH, 10._RKH, 0._RKH, fopen = .true._LK)
170 call disp%show("logSpace_RKH")
171 call disp%show( logSpace_RKH )
172 call disp%skip
173 call disp%show("call setLinSpace(logSpace_RKH, 10._RKH, 0._RKH, lopen = .true._LK)")
174 call setLinSpace(logSpace_RKH, 10._RKH, 0._RKH, lopen = .true._LK)
175 call disp%show("logSpace_RKH")
176 call disp%show( logSpace_RKH )
177 call disp%skip
178 call disp%show("call setLinSpace(logSpace_RKH, 10._RKH, 0._RKH, fopen = .true._LK, lopen = .true._LK)")
179 call setLinSpace(logSpace_RKH, 10._RKH, 0._RKH, fopen = .true._LK, lopen = .true._LK)
180 call disp%show("logSpace_RKH")
181 call disp%show( logSpace_RKH )
182 call disp%skip
183
184
185 call disp%skip
186 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%")
187 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%")
188 call disp%show("!Generate complex linspace.")
189 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%")
190 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%")
191 call disp%skip
192
193
194 call disp%skip
195 call disp%show("!%%%%%%%%%%%%%%")
196 call disp%show("!32-bit complex")
197 call disp%show("!%%%%%%%%%%%%%%")
198 call disp%skip
199
200 call disp%skip
201 call disp%show("call setLinSpace(logSpace_CKS, (0._CKS,0._CKS), (10._CKS,10._CKS))")
202 call setLinSpace(logSpace_CKS, (0._CKS,0._CKS), (10._CKS,10._CKS))
203 call disp%show("logSpace_CKS")
204 call disp%show( logSpace_CKS )
205 call disp%skip
206 call disp%show("call setLinSpace(logSpace_CKS, (0._CKS,0._CKS), (10._CKS,10._CKS), fopen = .true._LK)")
207 call setLinSpace(logSpace_CKS, (0._CKS,0._CKS), (10._CKS,10._CKS), fopen = .true._LK)
208 call disp%show("logSpace_CKS")
209 call disp%show( logSpace_CKS )
210 call disp%skip
211 call disp%show("call setLinSpace(logSpace_CKS, (0._CKS,0._CKS), (10._CKS,10._CKS), lopen = .true._LK)")
212 call setLinSpace(logSpace_CKS, (0._CKS,0._CKS), (10._CKS,10._CKS), lopen = .true._LK)
213 call disp%show("logSpace_CKS")
214 call disp%show( logSpace_CKS )
215 call disp%skip
216 call disp%show("call setLinSpace(logSpace_CKS, (0._CKS,0._CKS), (10._CKS,10._CKS), fopen = .true._LK, lopen = .true._LK)")
217 call setLinSpace(logSpace_CKS, (0._CKS,0._CKS), (10._CKS,10._CKS), fopen = .true._LK, lopen = .true._LK)
218 call disp%show("logSpace_CKS")
219 call disp%show( logSpace_CKS )
220 call disp%skip
221
222 ! Generate sequence in reverse.
223
224 call disp%skip
225 call disp%show("call setLinSpace(logSpace_CKS, (10._CKS,-10._CKS), (0._CKS,0._CKS))")
226 call setLinSpace(logSpace_CKS, (10._CKS,-10._CKS), (0._CKS,0._CKS))
227 call disp%show("logSpace_CKS")
228 call disp%show( logSpace_CKS )
229 call disp%skip
230 call disp%show("call setLinSpace(logSpace_CKS, (10._CKS,-10._CKS), (0._CKS,0._CKS), fopen = .true._LK)")
231 call setLinSpace(logSpace_CKS, (10._CKS,-10._CKS), (0._CKS,0._CKS), fopen = .true._LK)
232 call disp%show("logSpace_CKS")
233 call disp%show( logSpace_CKS )
234 call disp%skip
235 call disp%show("call setLinSpace(logSpace_CKS, (10._CKS,-10._CKS), (0._CKS,0._CKS), lopen = .true._LK)")
236 call setLinSpace(logSpace_CKS, (10._CKS,-10._CKS), (0._CKS,0._CKS), lopen = .true._LK)
237 call disp%show("logSpace_CKS")
238 call disp%show( logSpace_CKS )
239 call disp%skip
240 call disp%show("call setLinSpace(logSpace_CKS, (10._CKS,-10._CKS), (0._CKS,0._CKS), fopen = .true._LK, lopen = .true._LK)")
241 call setLinSpace(logSpace_CKS, (10._CKS,-10._CKS), (0._CKS,0._CKS), fopen = .true._LK, lopen = .true._LK)
242 call disp%show("logSpace_CKS")
243 call disp%show( logSpace_CKS )
244 call disp%skip
245
246 call disp%skip
247 call disp%show("!%%%%%%%%%%%%%%")
248 call disp%show("!64-bit complex")
249 call disp%show("!%%%%%%%%%%%%%%")
250 call disp%skip
251
252 call disp%skip
253 call disp%show("call setLinSpace(logSpace_CKD, (0._CKD,0._CKD), (10._CKD,10._CKD))")
254 call setLinSpace(logSpace_CKD, (0._CKD,0._CKD), (10._CKD,10._CKD))
255 call disp%show("logSpace_CKD")
256 call disp%show( logSpace_CKD )
257 call disp%skip
258 call disp%show("call setLinSpace(logSpace_CKD, (0._CKD,0._CKD), (10._CKD,10._CKD), fopen = .true._LK)")
259 call setLinSpace(logSpace_CKD, (0._CKD,0._CKD), (10._CKD,10._CKD), fopen = .true._LK)
260 call disp%show("logSpace_CKD")
261 call disp%show( logSpace_CKD )
262 call disp%skip
263 call disp%show("call setLinSpace(logSpace_CKD, (0._CKD,0._CKD), (10._CKD,10._CKD), lopen = .true._LK)")
264 call setLinSpace(logSpace_CKD, (0._CKD,0._CKD), (10._CKD,10._CKD), lopen = .true._LK)
265 call disp%show("logSpace_CKD")
266 call disp%show( logSpace_CKD )
267 call disp%skip
268 call disp%show("call setLinSpace(logSpace_CKD, (0._CKD,0._CKD), (10._CKD,10._CKD), fopen = .true._LK, lopen = .true._LK)")
269 call setLinSpace(logSpace_CKD, (0._CKD,0._CKD), (10._CKD,10._CKD), fopen = .true._LK, lopen = .true._LK)
270 call disp%show("logSpace_CKD")
271 call disp%show( logSpace_CKD )
272 call disp%skip
273
274 ! Generate sequence in reverse.
275
276 call disp%skip
277 call disp%show("call setLinSpace(logSpace_CKD, (10._CKD,-10._CKD), (0._CKD,0._CKD))")
278 call setLinSpace(logSpace_CKD, (10._CKD,-10._CKD), (0._CKD,0._CKD))
279 call disp%show("logSpace_CKD")
280 call disp%show( logSpace_CKD )
281 call disp%skip
282 call disp%show("call setLinSpace(logSpace_CKD, (10._CKD,-10._CKD), (0._CKD,0._CKD), fopen = .true._LK)")
283 call setLinSpace(logSpace_CKD, (10._CKD,-10._CKD), (0._CKD,0._CKD), fopen = .true._LK)
284 call disp%show("logSpace_CKD")
285 call disp%show( logSpace_CKD )
286 call disp%skip
287 call disp%show("call setLinSpace(logSpace_CKD, (10._CKD,-10._CKD), (0._CKD,0._CKD), lopen = .true._LK)")
288 call setLinSpace(logSpace_CKD, (10._CKD,-10._CKD), (0._CKD,0._CKD), lopen = .true._LK)
289 call disp%show("logSpace_CKD")
290 call disp%show( logSpace_CKD )
291 call disp%skip
292 call disp%show("call setLinSpace(logSpace_CKD, (10._CKD,-10._CKD), (0._CKD,0._CKD), fopen = .true._LK, lopen = .true._LK)")
293 call setLinSpace(logSpace_CKD, (10._CKD,-10._CKD), (0._CKD,0._CKD), fopen = .true._LK, lopen = .true._LK)
294 call disp%show("logSpace_CKD")
295 call disp%show( logSpace_CKD )
296 call disp%skip
297
298 call disp%skip
299 call disp%show("!%%%%%%%%%%%%%%%")
300 call disp%show("!128-bit complex")
301 call disp%show("!%%%%%%%%%%%%%%%")
302 call disp%skip
303
304 call disp%skip
305 call disp%show("call setLinSpace(logSpace_CKH, (0._CKH,0._CKH), (10._CKH,10._CKH))")
306 call setLinSpace(logSpace_CKH, (0._CKH,0._CKH), (10._CKH,10._CKH))
307 call disp%show("logSpace_CKH")
308 call disp%show( logSpace_CKH )
309 call disp%skip
310 call disp%show("call setLinSpace(logSpace_CKH, (0._CKH,0._CKH), (10._CKH,10._CKH), fopen = .true._LK)")
311 call setLinSpace(logSpace_CKH, (0._CKH,0._CKH), (10._CKH,10._CKH), fopen = .true._LK)
312 call disp%show("logSpace_CKH")
313 call disp%show( logSpace_CKH )
314 call disp%skip
315 call disp%show("call setLinSpace(logSpace_CKH, (0._CKH,0._CKH), (10._CKH,10._CKH), lopen = .true._LK)")
316 call setLinSpace(logSpace_CKH, (0._CKH,0._CKH), (10._CKH,10._CKH), lopen = .true._LK)
317 call disp%show("logSpace_CKH")
318 call disp%show( logSpace_CKH )
319 call disp%skip
320 call disp%show("call setLinSpace(logSpace_CKH, (0._CKH,0._CKH), (10._CKH,10._CKH), fopen = .true._LK, lopen = .true._LK)")
321 call setLinSpace(logSpace_CKH, (0._CKH,0._CKH), (10._CKH,10._CKH), fopen = .true._LK, lopen = .true._LK)
322 call disp%show("logSpace_CKH")
323 call disp%show( logSpace_CKH )
324 call disp%skip
325
326 ! Generate sequence in reverse.
327
328 call disp%skip
329 call disp%show("call setLinSpace(logSpace_CKH, (10._CKH,-10._CKH), (0._CKH,0._CKH))")
330 call setLinSpace(logSpace_CKH, (10._CKH,-10._CKH), (0._CKH,0._CKH))
331 call disp%show("logSpace_CKH")
332 call disp%show( logSpace_CKH )
333 call disp%skip
334 call disp%show("call setLinSpace(logSpace_CKH, (10._CKH,-10._CKH), (0._CKH,0._CKH), fopen = .true._LK)")
335 call setLinSpace(logSpace_CKH, (10._CKH,-10._CKH), (0._CKH,0._CKH), fopen = .true._LK)
336 call disp%show("logSpace_CKH")
337 call disp%show( logSpace_CKH )
338 call disp%skip
339 call disp%show("call setLinSpace(logSpace_CKH, (10._CKH,-10._CKH), (0._CKH,0._CKH), lopen = .true._LK)")
340 call setLinSpace(logSpace_CKH, (10._CKH,-10._CKH), (0._CKH,0._CKH), lopen = .true._LK)
341 call disp%show("logSpace_CKH")
342 call disp%show( logSpace_CKH )
343 call disp%skip
344 call disp%show("call setLinSpace(logSpace_CKH, (10._CKH,-10._CKH), (0._CKH,0._CKH), fopen = .true._LK, lopen = .true._LK)")
345 call setLinSpace(logSpace_CKH, (10._CKH,-10._CKH), (0._CKH,0._CKH), fopen = .true._LK, lopen = .true._LK)
346 call disp%show("logSpace_CKH")
347 call disp%show( logSpace_CKH )
348 call disp%skip
349
350end program example
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 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 CKH
The scalar integer constant of intrinsic default kind, representing the highest-precision complex kin...
Definition: pm_kind.F90:843
integer, parameter CKS
The single-precision complex kind in Fortran mode. On most platforms, this is a 32-bit real kind.
Definition: pm_kind.F90:570
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 CKD
The double precision complex kind in Fortran mode. On most platforms, this is a 64-bit real kind.
Definition: pm_kind.F90:571
integer, parameter RKD
The double precision real kind in Fortran mode. On most platforms, this is an 64-bit real kind.
Definition: pm_kind.F90:568
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
integer, parameter RKS
The single-precision real kind in Fortran mode. On most platforms, this is an 32-bit real kind.
Definition: pm_kind.F90:567
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
2!%%%%%%%%%%%%%%%%%%%%%%%
3!%%%%%%%%%%%%%%%%%%%%%%%
4!Generate real linspace.
5!%%%%%%%%%%%%%%%%%%%%%%%
6!%%%%%%%%%%%%%%%%%%%%%%%
7
8
9!%%%%%%%%%%%
10!32-bit real
11!%%%%%%%%%%%
12
13
14call setLinSpace(logSpace_RKS, 0._RKS, 10._RKS)
15logSpace_RKS
16+0.00000000, +3.33333325, +6.66666651, +10.0000000
17
18call setLinSpace(logSpace_RKS, 0._RKS, 10._RKS, fopen = .true._LK)
19logSpace_RKS
20+2.50000000, +5.00000000, +7.50000000, +10.0000000
21
22call setLinSpace(logSpace_RKS, 0._RKS, 10._RKS, lopen = .true._LK)
23logSpace_RKS
24+0.00000000, +2.50000000, +5.00000000, +7.50000000
25
26call setLinSpace(logSpace_RKS, 0._RKS, 10._RKS, fopen = .true._LK, lopen = .true._LK)
27logSpace_RKS
28+1.25000000, +3.75000000, +6.25000000, +8.75000000
29
30
31call setLinSpace(logSpace_RKS, 10._RKS, 0._RKS)
32logSpace_RKS
33+10.0000000, +6.66666698, +3.33333349, +0.00000000
34
35call setLinSpace(logSpace_RKS, 10._RKS, 0._RKS, fopen = .true._LK)
36logSpace_RKS
37+7.50000000, +5.00000000, +2.50000000, +0.00000000
38
39call setLinSpace(logSpace_RKS, 10._RKS, 0._RKS, lopen = .true._LK)
40logSpace_RKS
41+10.0000000, +7.50000000, +5.00000000, +2.50000000
42
43call setLinSpace(logSpace_RKS, 10._RKS, 0._RKS, fopen = .true._LK, lopen = .true._LK)
44logSpace_RKS
45+8.75000000, +6.25000000, +3.75000000, +1.25000000
46
47
48!%%%%%%%%%%%
49!64-bit real
50!%%%%%%%%%%%
51
52
53call setLinSpace(logSpace_RKD, 0._RKD, 10._RKD)
54logSpace_RKD
55+0.0000000000000000, +3.3333333333333335, +6.6666666666666670, +10.000000000000000
56
57call setLinSpace(logSpace_RKD, 0._RKD, 10._RKD, fopen = .true._LK)
58logSpace_RKD
59+2.5000000000000000, +5.0000000000000000, +7.5000000000000000, +10.000000000000000
60
61call setLinSpace(logSpace_RKD, 0._RKD, 10._RKD, lopen = .true._LK)
62logSpace_RKD
63+0.0000000000000000, +2.5000000000000000, +5.0000000000000000, +7.5000000000000000
64
65call setLinSpace(logSpace_RKD, 0._RKD, 10._RKD, fopen = .true._LK, lopen = .true._LK)
66logSpace_RKD
67+1.2500000000000000, +3.7500000000000000, +6.2500000000000000, +8.7500000000000000
68
69
70call setLinSpace(logSpace_RKD, 10._RKD, 0._RKD)
71logSpace_RKD
72+10.000000000000000, +6.6666666666666661, +3.3333333333333330, +0.0000000000000000
73
74call setLinSpace(logSpace_RKD, 10._RKD, 0._RKD, fopen = .true._LK)
75logSpace_RKD
76+7.5000000000000000, +5.0000000000000000, +2.5000000000000000, +0.0000000000000000
77
78call setLinSpace(logSpace_RKD, 10._RKD, 0._RKD, lopen = .true._LK)
79logSpace_RKD
80+10.000000000000000, +7.5000000000000000, +5.0000000000000000, +2.5000000000000000
81
82call setLinSpace(logSpace_RKD, 10._RKD, 0._RKD, fopen = .true._LK, lopen = .true._LK)
83logSpace_RKD
84+8.7500000000000000, +6.2500000000000000, +3.7500000000000000, +1.2500000000000000
85
86
87!%%%%%%%%%%%%
88!128-bit real
89!%%%%%%%%%%%%
90
91
92call setLinSpace(logSpace_RKH, 0._RKH, 10._RKH)
93logSpace_RKH
94+0.00000000000000000000000000000000000, +3.33333333333333333333333333333333346, +6.66666666666666666666666666666666692, +10.0000000000000000000000000000000000
95
96call setLinSpace(logSpace_RKH, 0._RKH, 10._RKH, fopen = .true._LK)
97logSpace_RKH
98+2.50000000000000000000000000000000000, +5.00000000000000000000000000000000000, +7.50000000000000000000000000000000000, +10.0000000000000000000000000000000000
99
100call setLinSpace(logSpace_RKH, 0._RKH, 10._RKH, lopen = .true._LK)
101logSpace_RKH
102+0.00000000000000000000000000000000000, +2.50000000000000000000000000000000000, +5.00000000000000000000000000000000000, +7.50000000000000000000000000000000000
103
104call setLinSpace(logSpace_RKH, 0._RKH, 10._RKH, fopen = .true._LK, lopen = .true._LK)
105logSpace_RKH
106+1.25000000000000000000000000000000000, +3.75000000000000000000000000000000000, +6.25000000000000000000000000000000000, +8.75000000000000000000000000000000000
107
108
109call setLinSpace(logSpace_RKH, 10._RKH, 0._RKH)
110logSpace_RKH
111+10.0000000000000000000000000000000000, +6.66666666666666666666666666666666615, +3.33333333333333333333333333333333308, +0.00000000000000000000000000000000000
112
113call setLinSpace(logSpace_RKH, 10._RKH, 0._RKH, fopen = .true._LK)
114logSpace_RKH
115+7.50000000000000000000000000000000000, +5.00000000000000000000000000000000000, +2.50000000000000000000000000000000000, +0.00000000000000000000000000000000000
116
117call setLinSpace(logSpace_RKH, 10._RKH, 0._RKH, lopen = .true._LK)
118logSpace_RKH
119+10.0000000000000000000000000000000000, +7.50000000000000000000000000000000000, +5.00000000000000000000000000000000000, +2.50000000000000000000000000000000000
120
121call setLinSpace(logSpace_RKH, 10._RKH, 0._RKH, fopen = .true._LK, lopen = .true._LK)
122logSpace_RKH
123+8.75000000000000000000000000000000000, +6.25000000000000000000000000000000000, +3.75000000000000000000000000000000000, +1.25000000000000000000000000000000000
124
125
126!%%%%%%%%%%%%%%%%%%%%%%%%%%
127!%%%%%%%%%%%%%%%%%%%%%%%%%%
128!Generate complex linspace.
129!%%%%%%%%%%%%%%%%%%%%%%%%%%
130!%%%%%%%%%%%%%%%%%%%%%%%%%%
131
132
133!%%%%%%%%%%%%%%
134!32-bit complex
135!%%%%%%%%%%%%%%
136
137
138call setLinSpace(logSpace_CKS, (0._CKS,0._CKS), (10._CKS,10._CKS))
139logSpace_CKS
140(+0.00000000, +0.00000000), (+3.33333325, +3.33333325), (+6.66666651, +6.66666651), (+10.0000000, +10.0000000)
141
142call setLinSpace(logSpace_CKS, (0._CKS,0._CKS), (10._CKS,10._CKS), fopen = .true._LK)
143logSpace_CKS
144(+2.50000000, +2.50000000), (+5.00000000, +5.00000000), (+7.50000000, +7.50000000), (+10.0000000, +10.0000000)
145
146call setLinSpace(logSpace_CKS, (0._CKS,0._CKS), (10._CKS,10._CKS), lopen = .true._LK)
147logSpace_CKS
148(+0.00000000, +0.00000000), (+2.50000000, +2.50000000), (+5.00000000, +5.00000000), (+7.50000000, +7.50000000)
149
150call setLinSpace(logSpace_CKS, (0._CKS,0._CKS), (10._CKS,10._CKS), fopen = .true._LK, lopen = .true._LK)
151logSpace_CKS
152(+1.25000000, +1.25000000), (+3.75000000, +3.75000000), (+6.25000000, +6.25000000), (+8.75000000, +8.75000000)
153
154
155call setLinSpace(logSpace_CKS, (10._CKS,-10._CKS), (0._CKS,0._CKS))
156logSpace_CKS
157(+10.0000000, -10.0000000), (+6.66666698, -6.66666698), (+3.33333349, -3.33333349), (+0.00000000, +0.00000000)
158
159call setLinSpace(logSpace_CKS, (10._CKS,-10._CKS), (0._CKS,0._CKS), fopen = .true._LK)
160logSpace_CKS
161(+7.50000000, -7.50000000), (+5.00000000, -5.00000000), (+2.50000000, -2.50000000), (+0.00000000, +0.00000000)
162
163call setLinSpace(logSpace_CKS, (10._CKS,-10._CKS), (0._CKS,0._CKS), lopen = .true._LK)
164logSpace_CKS
165(+10.0000000, -10.0000000), (+7.50000000, -7.50000000), (+5.00000000, -5.00000000), (+2.50000000, -2.50000000)
166
167call setLinSpace(logSpace_CKS, (10._CKS,-10._CKS), (0._CKS,0._CKS), fopen = .true._LK, lopen = .true._LK)
168logSpace_CKS
169(+8.75000000, -8.75000000), (+6.25000000, -6.25000000), (+3.75000000, -3.75000000), (+1.25000000, -1.25000000)
170
171
172!%%%%%%%%%%%%%%
173!64-bit complex
174!%%%%%%%%%%%%%%
175
176
177call setLinSpace(logSpace_CKD, (0._CKD,0._CKD), (10._CKD,10._CKD))
178logSpace_CKD
179(+0.0000000000000000, +0.0000000000000000), (+3.3333333333333335, +3.3333333333333335), (+6.6666666666666670, +6.6666666666666670), (+10.000000000000000, +10.000000000000000)
180
181call setLinSpace(logSpace_CKD, (0._CKD,0._CKD), (10._CKD,10._CKD), fopen = .true._LK)
182logSpace_CKD
183(+2.5000000000000000, +2.5000000000000000), (+5.0000000000000000, +5.0000000000000000), (+7.5000000000000000, +7.5000000000000000), (+10.000000000000000, +10.000000000000000)
184
185call setLinSpace(logSpace_CKD, (0._CKD,0._CKD), (10._CKD,10._CKD), lopen = .true._LK)
186logSpace_CKD
187(+0.0000000000000000, +0.0000000000000000), (+2.5000000000000000, +2.5000000000000000), (+5.0000000000000000, +5.0000000000000000), (+7.5000000000000000, +7.5000000000000000)
188
189call setLinSpace(logSpace_CKD, (0._CKD,0._CKD), (10._CKD,10._CKD), fopen = .true._LK, lopen = .true._LK)
190logSpace_CKD
191(+1.2500000000000000, +1.2500000000000000), (+3.7500000000000000, +3.7500000000000000), (+6.2500000000000000, +6.2500000000000000), (+8.7500000000000000, +8.7500000000000000)
192
193
194call setLinSpace(logSpace_CKD, (10._CKD,-10._CKD), (0._CKD,0._CKD))
195logSpace_CKD
196(+10.000000000000000, -10.000000000000000), (+6.6666666666666661, -6.6666666666666661), (+3.3333333333333330, -3.3333333333333330), (+0.0000000000000000, +0.0000000000000000)
197
198call setLinSpace(logSpace_CKD, (10._CKD,-10._CKD), (0._CKD,0._CKD), fopen = .true._LK)
199logSpace_CKD
200(+7.5000000000000000, -7.5000000000000000), (+5.0000000000000000, -5.0000000000000000), (+2.5000000000000000, -2.5000000000000000), (+0.0000000000000000, +0.0000000000000000)
201
202call setLinSpace(logSpace_CKD, (10._CKD,-10._CKD), (0._CKD,0._CKD), lopen = .true._LK)
203logSpace_CKD
204(+10.000000000000000, -10.000000000000000), (+7.5000000000000000, -7.5000000000000000), (+5.0000000000000000, -5.0000000000000000), (+2.5000000000000000, -2.5000000000000000)
205
206call setLinSpace(logSpace_CKD, (10._CKD,-10._CKD), (0._CKD,0._CKD), fopen = .true._LK, lopen = .true._LK)
207logSpace_CKD
208(+8.7500000000000000, -8.7500000000000000), (+6.2500000000000000, -6.2500000000000000), (+3.7500000000000000, -3.7500000000000000), (+1.2500000000000000, -1.2500000000000000)
209
210
211!%%%%%%%%%%%%%%%
212!128-bit complex
213!%%%%%%%%%%%%%%%
214
215
216call setLinSpace(logSpace_CKH, (0._CKH,0._CKH), (10._CKH,10._CKH))
217logSpace_CKH
218(+0.00000000000000000000000000000000000, +0.00000000000000000000000000000000000), (+3.33333333333333333333333333333333346, +3.33333333333333333333333333333333346), (+6.66666666666666666666666666666666692, +6.66666666666666666666666666666666692), (+10.0000000000000000000000000000000000, +10.0000000000000000000000000000000000)
219
220call setLinSpace(logSpace_CKH, (0._CKH,0._CKH), (10._CKH,10._CKH), fopen = .true._LK)
221logSpace_CKH
222(+2.50000000000000000000000000000000000, +2.50000000000000000000000000000000000), (+5.00000000000000000000000000000000000, +5.00000000000000000000000000000000000), (+7.50000000000000000000000000000000000, +7.50000000000000000000000000000000000), (+10.0000000000000000000000000000000000, +10.0000000000000000000000000000000000)
223
224call setLinSpace(logSpace_CKH, (0._CKH,0._CKH), (10._CKH,10._CKH), lopen = .true._LK)
225logSpace_CKH
226(+0.00000000000000000000000000000000000, +0.00000000000000000000000000000000000), (+2.50000000000000000000000000000000000, +2.50000000000000000000000000000000000), (+5.00000000000000000000000000000000000, +5.00000000000000000000000000000000000), (+7.50000000000000000000000000000000000, +7.50000000000000000000000000000000000)
227
228call setLinSpace(logSpace_CKH, (0._CKH,0._CKH), (10._CKH,10._CKH), fopen = .true._LK, lopen = .true._LK)
229logSpace_CKH
230(+1.25000000000000000000000000000000000, +1.25000000000000000000000000000000000), (+3.75000000000000000000000000000000000, +3.75000000000000000000000000000000000), (+6.25000000000000000000000000000000000, +6.25000000000000000000000000000000000), (+8.75000000000000000000000000000000000, +8.75000000000000000000000000000000000)
231
232
233call setLinSpace(logSpace_CKH, (10._CKH,-10._CKH), (0._CKH,0._CKH))
234logSpace_CKH
235(+10.0000000000000000000000000000000000, -10.0000000000000000000000000000000000), (+6.66666666666666666666666666666666615, -6.66666666666666666666666666666666615), (+3.33333333333333333333333333333333308, -3.33333333333333333333333333333333308), (+0.00000000000000000000000000000000000, +0.00000000000000000000000000000000000)
236
237call setLinSpace(logSpace_CKH, (10._CKH,-10._CKH), (0._CKH,0._CKH), fopen = .true._LK)
238logSpace_CKH
239(+7.50000000000000000000000000000000000, -7.50000000000000000000000000000000000), (+5.00000000000000000000000000000000000, -5.00000000000000000000000000000000000), (+2.50000000000000000000000000000000000, -2.50000000000000000000000000000000000), (+0.00000000000000000000000000000000000, +0.00000000000000000000000000000000000)
240
241call setLinSpace(logSpace_CKH, (10._CKH,-10._CKH), (0._CKH,0._CKH), lopen = .true._LK)
242logSpace_CKH
243(+10.0000000000000000000000000000000000, -10.0000000000000000000000000000000000), (+7.50000000000000000000000000000000000, -7.50000000000000000000000000000000000), (+5.00000000000000000000000000000000000, -5.00000000000000000000000000000000000), (+2.50000000000000000000000000000000000, -2.50000000000000000000000000000000000)
244
245call setLinSpace(logSpace_CKH, (10._CKH,-10._CKH), (0._CKH,0._CKH), fopen = .true._LK, lopen = .true._LK)
246logSpace_CKH
247(+8.75000000000000000000000000000000000, -8.75000000000000000000000000000000000), (+6.25000000000000000000000000000000000, -6.25000000000000000000000000000000000), (+3.75000000000000000000000000000000000, -3.75000000000000000000000000000000000), (+1.25000000000000000000000000000000000, -1.25000000000000000000000000000000000)
248
249
Test:
test_pm_arraySpace


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:
Fatemeh Bagheri, Tuesday 08:49 PM, August 10, 2021, Dallas, TX

Definition at line 324 of file pm_arraySpace.F90.


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