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

Generate count evenly spaced points over the interval [x1, x2] if x1 < x2, or [x2, x1] if x2 < x1. More...

Detailed Description

Generate count evenly spaced points over the interval [x1, x2] if x1 < x2, or [x2, x1] if x2 < x1.

Parameters
[in]x1: The input scalar of either
  • type complex of kind any supported by the processor (e.g., CK, CK32, CK64, or CK128) or
  • type real of kind any supported by the processor (e.g., RK, RK32, RK64, or RK128)
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]count: The input scalar of type integer of default kind IK representing the length of linSpace to generate.
[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.)
Returns
linSpace : The output array of shape (1:count) of the same type and kind as the input x1 containing the evenly-spaced sequence within the interval specified by x1 and x2.


Possible calling interfaces

linSpace = getLinSpace(x1, x2, count)
linSpace = getLinSpace(x1, x2, count, fopen)
linSpace = getLinSpace(x1, x2, count, fopen, lopen)
linSpace = getLinSpace(x1, x2, count, lopen = lopen)
Generate count evenly spaced points over the interval [x1, x2] if x1 < x2, or [x2,...
This module contains procedures and generic interfaces for generating arrays with linear or logarithm...
Warning
The condition 0 < count must hold for the corresponding input arguments.
This condition is verified only if the library is built with the preprocessor macro CHECK_ENABLED=1.
The pure procedure(s) documented herein become impure when the ParaMonte library is compiled with preprocessor macro CHECK_ENABLED=1.
By default, these procedures are pure in release build and impure in debug and testing builds.
Remarks
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 count == 1 holds 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, IK, LK
4 use pm_io, only: display_type
5 use pm_kind, only: RKS, RKD, RKH, CKS, CKD, CKH
6 use pm_arraySpace, only: getLinSpace
7
8 implicit none
9
10 type(display_type) :: disp
11 disp = display_type(file = "main.out.F90")
12
13 call disp%skip
14 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%")
15 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%")
16 call disp%show("!Generate real linspace.")
17 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%")
18 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%")
19 call disp%skip
20
21 call disp%skip
22 call disp%show("!%%%%%%%%%%%")
23 call disp%show("!32-bit real")
24 call disp%show("!%%%%%%%%%%%")
25 call disp%skip
26
27 call disp%skip
28 call disp%show("getLinSpace(0._RKS, 10._RKS, 4_IK)")
29 call disp%show( getLinSpace(0._RKS, 10._RKS, 4_IK) )
30 call disp%skip
31 call disp%show("getLinSpace(0._RKS, 10._RKS, 4_IK, fopen = .true._LK)")
32 call disp%show( getLinSpace(0._RKS, 10._RKS, 4_IK, fopen = .true._LK) )
33 call disp%skip
34 call disp%show("getLinSpace(0._RKS, 10._RKS, 4_IK, lopen = .true._LK)")
35 call disp%show( getLinSpace(0._RKS, 10._RKS, 4_IK, lopen = .true._LK) )
36 call disp%skip
37 call disp%show("getLinSpace(0._RKS, 10._RKS, 4_IK, fopen = .true._LK, lopen = .true._LK)")
38 call disp%show( getLinSpace(0._RKS, 10._RKS, 4_IK, fopen = .true._LK, lopen = .true._LK) )
39 call disp%skip
40
41 ! Generate sequence in reverse.
42
43 call disp%skip
44 call disp%show("getLinSpace(10._RKS, 0._RKS, 4_IK)")
45 call disp%show( getLinSpace(10._RKS, 0._RKS, 4_IK) )
46 call disp%skip
47 call disp%show("getLinSpace(10._RKS, 0._RKS, 4_IK, fopen = .true._LK)")
48 call disp%show( getLinSpace(10._RKS, 0._RKS, 4_IK, fopen = .true._LK) )
49 call disp%skip
50 call disp%show("getLinSpace(10._RKS, 0._RKS, 4_IK, lopen = .true._LK)")
51 call disp%show( getLinSpace(10._RKS, 0._RKS, 4_IK, lopen = .true._LK) )
52 call disp%skip
53 call disp%show("getLinSpace(10._RKS, 0._RKS, 4_IK, fopen = .true._LK, lopen = .true._LK)")
54 call disp%show( getLinSpace(10._RKS, 0._RKS, 4_IK, fopen = .true._LK, lopen = .true._LK) )
55 call disp%skip
56
57 call disp%skip
58 call disp%show("!%%%%%%%%%%%")
59 call disp%show("!64-bit real")
60 call disp%show("!%%%%%%%%%%%")
61 call disp%skip
62
63 call disp%skip
64 call disp%show("getLinSpace(0._RKD, 10._RKD, 4_IK)")
65 call disp%show( getLinSpace(0._RKD, 10._RKD, 4_IK) )
66 call disp%skip
67 call disp%show("getLinSpace(0._RKD, 10._RKD, 4_IK, fopen = .true._LK)")
68 call disp%show( getLinSpace(0._RKD, 10._RKD, 4_IK, fopen = .true._LK) )
69 call disp%skip
70 call disp%show("getLinSpace(0._RKD, 10._RKD, 4_IK, lopen = .true._LK)")
71 call disp%show( getLinSpace(0._RKD, 10._RKD, 4_IK, lopen = .true._LK) )
72 call disp%skip
73 call disp%show("getLinSpace(0._RKD, 10._RKD, 4_IK, fopen = .true._LK, lopen = .true._LK)")
74 call disp%show( getLinSpace(0._RKD, 10._RKD, 4_IK, fopen = .true._LK, lopen = .true._LK) )
75 call disp%skip
76
77 ! Generate sequence in reverse.
78
79 call disp%skip
80 call disp%show("getLinSpace(10._RKD, 0._RKD, 4_IK)")
81 call disp%show( getLinSpace(10._RKD, 0._RKD, 4_IK) )
82 call disp%skip
83 call disp%show("getLinSpace(10._RKD, 0._RKD, 4_IK, fopen = .true._LK)")
84 call disp%show( getLinSpace(10._RKD, 0._RKD, 4_IK, fopen = .true._LK) )
85 call disp%skip
86 call disp%show("getLinSpace(10._RKD, 0._RKD, 4_IK, lopen = .true._LK)")
87 call disp%show( getLinSpace(10._RKD, 0._RKD, 4_IK, lopen = .true._LK) )
88 call disp%skip
89 call disp%show("getLinSpace(10._RKD, 0._RKD, 4_IK, fopen = .true._LK, lopen = .true._LK)")
90 call disp%show( getLinSpace(10._RKD, 0._RKD, 4_IK, fopen = .true._LK, lopen = .true._LK) )
91 call disp%skip
92
93 call disp%skip
94 call disp%show("!%%%%%%%%%%%%")
95 call disp%show("!128-bit real")
96 call disp%show("!%%%%%%%%%%%%")
97 call disp%skip
98
99 call disp%skip
100 call disp%show("getLinSpace(0._RKH, 10._RKH, 4_IK)")
101 call disp%show( getLinSpace(0._RKH, 10._RKH, 4_IK) )
102 call disp%skip
103 call disp%show("getLinSpace(0._RKH, 10._RKH, 4_IK, fopen = .true._LK)")
104 call disp%show( getLinSpace(0._RKH, 10._RKH, 4_IK, fopen = .true._LK) )
105 call disp%skip
106 call disp%show("getLinSpace(0._RKH, 10._RKH, 4_IK, lopen = .true._LK)")
107 call disp%show( getLinSpace(0._RKH, 10._RKH, 4_IK, lopen = .true._LK) )
108 call disp%skip
109 call disp%show("getLinSpace(0._RKH, 10._RKH, 4_IK, fopen = .true._LK, lopen = .true._LK)")
110 call disp%show( getLinSpace(0._RKH, 10._RKH, 4_IK, fopen = .true._LK, lopen = .true._LK) )
111 call disp%skip
112
113 ! Generate sequence in reverse.
114
115 call disp%skip
116 call disp%show("getLinSpace(10._RKH, 0._RKH, 4_IK)")
117 call disp%show( getLinSpace(10._RKH, 0._RKH, 4_IK) )
118 call disp%skip
119 call disp%show("getLinSpace(10._RKH, 0._RKH, 4_IK, fopen = .true._LK)")
120 call disp%show( getLinSpace(10._RKH, 0._RKH, 4_IK, fopen = .true._LK) )
121 call disp%skip
122 call disp%show("getLinSpace(10._RKH, 0._RKH, 4_IK, lopen = .true._LK)")
123 call disp%show( getLinSpace(10._RKH, 0._RKH, 4_IK, lopen = .true._LK) )
124 call disp%skip
125 call disp%show("getLinSpace(10._RKH, 0._RKH, 4_IK, fopen = .true._LK, lopen = .true._LK)")
126 call disp%show( getLinSpace(10._RKH, 0._RKH, 4_IK, fopen = .true._LK, lopen = .true._LK) )
127 call disp%skip
128
129
130 call disp%skip
131 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%")
132 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%")
133 call disp%show("!Generate complex linspace.")
134 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%")
135 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%")
136 call disp%skip
137
138
139 call disp%skip
140 call disp%show("!%%%%%%%%%%%%%%")
141 call disp%show("!32-bit complex")
142 call disp%show("!%%%%%%%%%%%%%%")
143 call disp%skip
144
145 call disp%skip
146 call disp%show("getLinSpace((0._CKS,0._CKS), (10._CKS,10._CKS), 4_IK)")
147 call disp%show( getLinSpace((0._CKS,0._CKS), (10._CKS,10._CKS), 4_IK) )
148 call disp%skip
149 call disp%show("getLinSpace((0._CKS,0._CKS), (10._CKS,10._CKS), 4_IK, fopen = .true._LK)")
150 call disp%show( getLinSpace((0._CKS,0._CKS), (10._CKS,10._CKS), 4_IK, fopen = .true._LK) )
151 call disp%skip
152 call disp%show("getLinSpace((0._CKS,0._CKS), (10._CKS,10._CKS), 4_IK, lopen = .true._LK)")
153 call disp%show( getLinSpace((0._CKS,0._CKS), (10._CKS,10._CKS), 4_IK, lopen = .true._LK) )
154 call disp%skip
155 call disp%show("getLinSpace((0._CKS,0._CKS), (10._CKS,10._CKS), 4_IK, fopen = .true._LK, lopen = .true._LK)")
156 call disp%show( getLinSpace((0._CKS,0._CKS), (10._CKS,10._CKS), 4_IK, fopen = .true._LK, lopen = .true._LK) )
157 call disp%skip
158
159 ! Generate sequence in reverse.
160
161 call disp%skip
162 call disp%show("getLinSpace((10._CKS,-10._CKS), (0._CKS,0._CKS), 4_IK)")
163 call disp%show( getLinSpace((10._CKS,-10._CKS), (0._CKS,0._CKS), 4_IK) )
164 call disp%skip
165 call disp%show("getLinSpace((10._CKS,-10._CKS), (0._CKS,0._CKS), 4_IK, fopen = .true._LK)")
166 call disp%show( getLinSpace((10._CKS,-10._CKS), (0._CKS,0._CKS), 4_IK, fopen = .true._LK) )
167 call disp%skip
168 call disp%show("getLinSpace((10._CKS,-10._CKS), (0._CKS,0._CKS), 4_IK, lopen = .true._LK)")
169 call disp%show( getLinSpace((10._CKS,-10._CKS), (0._CKS,0._CKS), 4_IK, lopen = .true._LK) )
170 call disp%skip
171 call disp%show("getLinSpace((10._CKS,-10._CKS), (0._CKS,0._CKS), 4_IK, fopen = .true._LK, lopen = .true._LK)")
172 call disp%show( getLinSpace((10._CKS,-10._CKS), (0._CKS,0._CKS), 4_IK, fopen = .true._LK, lopen = .true._LK) )
173 call disp%skip
174
175 call disp%skip
176 call disp%show("!%%%%%%%%%%%%%%")
177 call disp%show("!64-bit complex")
178 call disp%show("!%%%%%%%%%%%%%%")
179 call disp%skip
180
181 call disp%skip
182 call disp%show("getLinSpace((0._CKD,0._CKD), (10._CKD,10._CKD), 4_IK)")
183 call disp%show( getLinSpace((0._CKD,0._CKD), (10._CKD,10._CKD), 4_IK) )
184 call disp%skip
185 call disp%show("getLinSpace((0._CKD,0._CKD), (10._CKD,10._CKD), 4_IK, fopen = .true._LK)")
186 call disp%show( getLinSpace((0._CKD,0._CKD), (10._CKD,10._CKD), 4_IK, fopen = .true._LK) )
187 call disp%skip
188 call disp%show("getLinSpace((0._CKD,0._CKD), (10._CKD,10._CKD), 4_IK, lopen = .true._LK)")
189 call disp%show( getLinSpace((0._CKD,0._CKD), (10._CKD,10._CKD), 4_IK, lopen = .true._LK) )
190 call disp%skip
191 call disp%show("getLinSpace((0._CKD,0._CKD), (10._CKD,10._CKD), 4_IK, fopen = .true._LK, lopen = .true._LK)")
192 call disp%show( getLinSpace((0._CKD,0._CKD), (10._CKD,10._CKD), 4_IK, fopen = .true._LK, lopen = .true._LK) )
193 call disp%skip
194
195 ! Generate sequence in reverse.
196
197 call disp%skip
198 call disp%show("getLinSpace((10._CKD,-10._CKD), (0._CKD,0._CKD), 4_IK)")
199 call disp%show( getLinSpace((10._CKD,-10._CKD), (0._CKD,0._CKD), 4_IK) )
200 call disp%skip
201 call disp%show("getLinSpace((10._CKD,-10._CKD), (0._CKD,0._CKD), 4_IK, fopen = .true._LK)")
202 call disp%show( getLinSpace((10._CKD,-10._CKD), (0._CKD,0._CKD), 4_IK, fopen = .true._LK) )
203 call disp%skip
204 call disp%show("getLinSpace((10._CKD,-10._CKD), (0._CKD,0._CKD), 4_IK, lopen = .true._LK)")
205 call disp%show( getLinSpace((10._CKD,-10._CKD), (0._CKD,0._CKD), 4_IK, lopen = .true._LK) )
206 call disp%skip
207 call disp%show("getLinSpace((10._CKD,-10._CKD), (0._CKD,0._CKD), 4_IK, fopen = .true._LK, lopen = .true._LK)")
208 call disp%show( getLinSpace((10._CKD,-10._CKD), (0._CKD,0._CKD), 4_IK, fopen = .true._LK, lopen = .true._LK) )
209 call disp%skip
210
211 call disp%skip
212 call disp%show("!%%%%%%%%%%%%%%%")
213 call disp%show("!128-bit complex")
214 call disp%show("!%%%%%%%%%%%%%%%")
215 call disp%skip
216
217 call disp%skip
218 call disp%show("getLinSpace((0._CKH,0._CKH), (10._CKH,10._CKH), 4_IK)")
219 call disp%show( getLinSpace((0._CKH,0._CKH), (10._CKH,10._CKH), 4_IK) )
220 call disp%skip
221 call disp%show("getLinSpace((0._CKH,0._CKH), (10._CKH,10._CKH), 4_IK, fopen = .true._LK)")
222 call disp%show( getLinSpace((0._CKH,0._CKH), (10._CKH,10._CKH), 4_IK, fopen = .true._LK) )
223 call disp%skip
224 call disp%show("getLinSpace((0._CKH,0._CKH), (10._CKH,10._CKH), 4_IK, lopen = .true._LK)")
225 call disp%show( getLinSpace((0._CKH,0._CKH), (10._CKH,10._CKH), 4_IK, lopen = .true._LK) )
226 call disp%skip
227 call disp%show("getLinSpace((0._CKH,0._CKH), (10._CKH,10._CKH), 4_IK, fopen = .true._LK, lopen = .true._LK)")
228 call disp%show( getLinSpace((0._CKH,0._CKH), (10._CKH,10._CKH), 4_IK, fopen = .true._LK, lopen = .true._LK) )
229 call disp%skip
230
231 ! Generate sequence in reverse.
232
233 call disp%skip
234 call disp%show("getLinSpace((10._CKH,-10._CKH), (0._CKH,0._CKH), 4_IK)")
235 call disp%show( getLinSpace((10._CKH,-10._CKH), (0._CKH,0._CKH), 4_IK) )
236 call disp%skip
237 call disp%show("getLinSpace((10._CKH,-10._CKH), (0._CKH,0._CKH), 4_IK, fopen = .true._LK)")
238 call disp%show( getLinSpace((10._CKH,-10._CKH), (0._CKH,0._CKH), 4_IK, fopen = .true._LK) )
239 call disp%skip
240 call disp%show("getLinSpace((10._CKH,-10._CKH), (0._CKH,0._CKH), 4_IK, lopen = .true._LK)")
241 call disp%show( getLinSpace((10._CKH,-10._CKH), (0._CKH,0._CKH), 4_IK, lopen = .true._LK) )
242 call disp%skip
243 call disp%show("getLinSpace((10._CKH,-10._CKH), (0._CKH,0._CKH), 4_IK, fopen = .true._LK, lopen = .true._LK)")
244 call disp%show( getLinSpace((10._CKH,-10._CKH), (0._CKH,0._CKH), 4_IK, fopen = .true._LK, lopen = .true._LK) )
245 call disp%skip
246
247end 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
14getLinSpace(0._RKS, 10._RKS, 4_IK)
15+0.00000000, +3.33333325, +6.66666651, +10.0000000
16
17getLinSpace(0._RKS, 10._RKS, 4_IK, fopen = .true._LK)
18+2.50000000, +5.00000000, +7.50000000, +10.0000000
19
20getLinSpace(0._RKS, 10._RKS, 4_IK, lopen = .true._LK)
21+0.00000000, +2.50000000, +5.00000000, +7.50000000
22
23getLinSpace(0._RKS, 10._RKS, 4_IK, fopen = .true._LK, lopen = .true._LK)
24+1.25000000, +3.75000000, +6.25000000, +8.75000000
25
26
27getLinSpace(10._RKS, 0._RKS, 4_IK)
28+10.0000000, +6.66666698, +3.33333349, +0.00000000
29
30getLinSpace(10._RKS, 0._RKS, 4_IK, fopen = .true._LK)
31+7.50000000, +5.00000000, +2.50000000, +0.00000000
32
33getLinSpace(10._RKS, 0._RKS, 4_IK, lopen = .true._LK)
34+10.0000000, +7.50000000, +5.00000000, +2.50000000
35
36getLinSpace(10._RKS, 0._RKS, 4_IK, fopen = .true._LK, lopen = .true._LK)
37+8.75000000, +6.25000000, +3.75000000, +1.25000000
38
39
40!%%%%%%%%%%%
41!64-bit real
42!%%%%%%%%%%%
43
44
45getLinSpace(0._RKD, 10._RKD, 4_IK)
46+0.0000000000000000, +3.3333333333333335, +6.6666666666666670, +10.000000000000000
47
48getLinSpace(0._RKD, 10._RKD, 4_IK, fopen = .true._LK)
49+2.5000000000000000, +5.0000000000000000, +7.5000000000000000, +10.000000000000000
50
51getLinSpace(0._RKD, 10._RKD, 4_IK, lopen = .true._LK)
52+0.0000000000000000, +2.5000000000000000, +5.0000000000000000, +7.5000000000000000
53
54getLinSpace(0._RKD, 10._RKD, 4_IK, fopen = .true._LK, lopen = .true._LK)
55+1.2500000000000000, +3.7500000000000000, +6.2500000000000000, +8.7500000000000000
56
57
58getLinSpace(10._RKD, 0._RKD, 4_IK)
59+10.000000000000000, +6.6666666666666661, +3.3333333333333330, +0.0000000000000000
60
61getLinSpace(10._RKD, 0._RKD, 4_IK, fopen = .true._LK)
62+7.5000000000000000, +5.0000000000000000, +2.5000000000000000, +0.0000000000000000
63
64getLinSpace(10._RKD, 0._RKD, 4_IK, lopen = .true._LK)
65+10.000000000000000, +7.5000000000000000, +5.0000000000000000, +2.5000000000000000
66
67getLinSpace(10._RKD, 0._RKD, 4_IK, fopen = .true._LK, lopen = .true._LK)
68+8.7500000000000000, +6.2500000000000000, +3.7500000000000000, +1.2500000000000000
69
70
71!%%%%%%%%%%%%
72!128-bit real
73!%%%%%%%%%%%%
74
75
76getLinSpace(0._RKH, 10._RKH, 4_IK)
77+0.00000000000000000000000000000000000, +3.33333333333333333333333333333333346, +6.66666666666666666666666666666666692, +10.0000000000000000000000000000000000
78
79getLinSpace(0._RKH, 10._RKH, 4_IK, fopen = .true._LK)
80+2.50000000000000000000000000000000000, +5.00000000000000000000000000000000000, +7.50000000000000000000000000000000000, +10.0000000000000000000000000000000000
81
82getLinSpace(0._RKH, 10._RKH, 4_IK, lopen = .true._LK)
83+0.00000000000000000000000000000000000, +2.50000000000000000000000000000000000, +5.00000000000000000000000000000000000, +7.50000000000000000000000000000000000
84
85getLinSpace(0._RKH, 10._RKH, 4_IK, fopen = .true._LK, lopen = .true._LK)
86+1.25000000000000000000000000000000000, +3.75000000000000000000000000000000000, +6.25000000000000000000000000000000000, +8.75000000000000000000000000000000000
87
88
89getLinSpace(10._RKH, 0._RKH, 4_IK)
90+10.0000000000000000000000000000000000, +6.66666666666666666666666666666666615, +3.33333333333333333333333333333333308, +0.00000000000000000000000000000000000
91
92getLinSpace(10._RKH, 0._RKH, 4_IK, fopen = .true._LK)
93+7.50000000000000000000000000000000000, +5.00000000000000000000000000000000000, +2.50000000000000000000000000000000000, +0.00000000000000000000000000000000000
94
95getLinSpace(10._RKH, 0._RKH, 4_IK, lopen = .true._LK)
96+10.0000000000000000000000000000000000, +7.50000000000000000000000000000000000, +5.00000000000000000000000000000000000, +2.50000000000000000000000000000000000
97
98getLinSpace(10._RKH, 0._RKH, 4_IK, fopen = .true._LK, lopen = .true._LK)
99+8.75000000000000000000000000000000000, +6.25000000000000000000000000000000000, +3.75000000000000000000000000000000000, +1.25000000000000000000000000000000000
100
101
102!%%%%%%%%%%%%%%%%%%%%%%%%%%
103!%%%%%%%%%%%%%%%%%%%%%%%%%%
104!Generate complex linspace.
105!%%%%%%%%%%%%%%%%%%%%%%%%%%
106!%%%%%%%%%%%%%%%%%%%%%%%%%%
107
108
109!%%%%%%%%%%%%%%
110!32-bit complex
111!%%%%%%%%%%%%%%
112
113
114getLinSpace((0._CKS,0._CKS), (10._CKS,10._CKS), 4_IK)
115(+0.00000000, +0.00000000), (+3.33333325, +3.33333325), (+6.66666651, +6.66666651), (+10.0000000, +10.0000000)
116
117getLinSpace((0._CKS,0._CKS), (10._CKS,10._CKS), 4_IK, fopen = .true._LK)
118(+2.50000000, +2.50000000), (+5.00000000, +5.00000000), (+7.50000000, +7.50000000), (+10.0000000, +10.0000000)
119
120getLinSpace((0._CKS,0._CKS), (10._CKS,10._CKS), 4_IK, lopen = .true._LK)
121(+0.00000000, +0.00000000), (+2.50000000, +2.50000000), (+5.00000000, +5.00000000), (+7.50000000, +7.50000000)
122
123getLinSpace((0._CKS,0._CKS), (10._CKS,10._CKS), 4_IK, fopen = .true._LK, lopen = .true._LK)
124(+1.25000000, +1.25000000), (+3.75000000, +3.75000000), (+6.25000000, +6.25000000), (+8.75000000, +8.75000000)
125
126
127getLinSpace((10._CKS,-10._CKS), (0._CKS,0._CKS), 4_IK)
128(+10.0000000, -10.0000000), (+6.66666698, -6.66666698), (+3.33333349, -3.33333349), (+0.00000000, +0.00000000)
129
130getLinSpace((10._CKS,-10._CKS), (0._CKS,0._CKS), 4_IK, fopen = .true._LK)
131(+7.50000000, -7.50000000), (+5.00000000, -5.00000000), (+2.50000000, -2.50000000), (+0.00000000, +0.00000000)
132
133getLinSpace((10._CKS,-10._CKS), (0._CKS,0._CKS), 4_IK, lopen = .true._LK)
134(+10.0000000, -10.0000000), (+7.50000000, -7.50000000), (+5.00000000, -5.00000000), (+2.50000000, -2.50000000)
135
136getLinSpace((10._CKS,-10._CKS), (0._CKS,0._CKS), 4_IK, fopen = .true._LK, lopen = .true._LK)
137(+8.75000000, -8.75000000), (+6.25000000, -6.25000000), (+3.75000000, -3.75000000), (+1.25000000, -1.25000000)
138
139
140!%%%%%%%%%%%%%%
141!64-bit complex
142!%%%%%%%%%%%%%%
143
144
145getLinSpace((0._CKD,0._CKD), (10._CKD,10._CKD), 4_IK)
146(+0.0000000000000000, +0.0000000000000000), (+3.3333333333333335, +3.3333333333333335), (+6.6666666666666670, +6.6666666666666670), (+10.000000000000000, +10.000000000000000)
147
148getLinSpace((0._CKD,0._CKD), (10._CKD,10._CKD), 4_IK, fopen = .true._LK)
149(+2.5000000000000000, +2.5000000000000000), (+5.0000000000000000, +5.0000000000000000), (+7.5000000000000000, +7.5000000000000000), (+10.000000000000000, +10.000000000000000)
150
151getLinSpace((0._CKD,0._CKD), (10._CKD,10._CKD), 4_IK, lopen = .true._LK)
152(+0.0000000000000000, +0.0000000000000000), (+2.5000000000000000, +2.5000000000000000), (+5.0000000000000000, +5.0000000000000000), (+7.5000000000000000, +7.5000000000000000)
153
154getLinSpace((0._CKD,0._CKD), (10._CKD,10._CKD), 4_IK, fopen = .true._LK, lopen = .true._LK)
155(+1.2500000000000000, +1.2500000000000000), (+3.7500000000000000, +3.7500000000000000), (+6.2500000000000000, +6.2500000000000000), (+8.7500000000000000, +8.7500000000000000)
156
157
158getLinSpace((10._CKD,-10._CKD), (0._CKD,0._CKD), 4_IK)
159(+10.000000000000000, -10.000000000000000), (+6.6666666666666661, -6.6666666666666661), (+3.3333333333333330, -3.3333333333333330), (+0.0000000000000000, +0.0000000000000000)
160
161getLinSpace((10._CKD,-10._CKD), (0._CKD,0._CKD), 4_IK, fopen = .true._LK)
162(+7.5000000000000000, -7.5000000000000000), (+5.0000000000000000, -5.0000000000000000), (+2.5000000000000000, -2.5000000000000000), (+0.0000000000000000, +0.0000000000000000)
163
164getLinSpace((10._CKD,-10._CKD), (0._CKD,0._CKD), 4_IK, lopen = .true._LK)
165(+10.000000000000000, -10.000000000000000), (+7.5000000000000000, -7.5000000000000000), (+5.0000000000000000, -5.0000000000000000), (+2.5000000000000000, -2.5000000000000000)
166
167getLinSpace((10._CKD,-10._CKD), (0._CKD,0._CKD), 4_IK, fopen = .true._LK, lopen = .true._LK)
168(+8.7500000000000000, -8.7500000000000000), (+6.2500000000000000, -6.2500000000000000), (+3.7500000000000000, -3.7500000000000000), (+1.2500000000000000, -1.2500000000000000)
169
170
171!%%%%%%%%%%%%%%%
172!128-bit complex
173!%%%%%%%%%%%%%%%
174
175
176getLinSpace((0._CKH,0._CKH), (10._CKH,10._CKH), 4_IK)
177(+0.00000000000000000000000000000000000, +0.00000000000000000000000000000000000), (+3.33333333333333333333333333333333346, +3.33333333333333333333333333333333346), (+6.66666666666666666666666666666666692, +6.66666666666666666666666666666666692), (+10.0000000000000000000000000000000000, +10.0000000000000000000000000000000000)
178
179getLinSpace((0._CKH,0._CKH), (10._CKH,10._CKH), 4_IK, fopen = .true._LK)
180(+2.50000000000000000000000000000000000, +2.50000000000000000000000000000000000), (+5.00000000000000000000000000000000000, +5.00000000000000000000000000000000000), (+7.50000000000000000000000000000000000, +7.50000000000000000000000000000000000), (+10.0000000000000000000000000000000000, +10.0000000000000000000000000000000000)
181
182getLinSpace((0._CKH,0._CKH), (10._CKH,10._CKH), 4_IK, lopen = .true._LK)
183(+0.00000000000000000000000000000000000, +0.00000000000000000000000000000000000), (+2.50000000000000000000000000000000000, +2.50000000000000000000000000000000000), (+5.00000000000000000000000000000000000, +5.00000000000000000000000000000000000), (+7.50000000000000000000000000000000000, +7.50000000000000000000000000000000000)
184
185getLinSpace((0._CKH,0._CKH), (10._CKH,10._CKH), 4_IK, fopen = .true._LK, lopen = .true._LK)
186(+1.25000000000000000000000000000000000, +1.25000000000000000000000000000000000), (+3.75000000000000000000000000000000000, +3.75000000000000000000000000000000000), (+6.25000000000000000000000000000000000, +6.25000000000000000000000000000000000), (+8.75000000000000000000000000000000000, +8.75000000000000000000000000000000000)
187
188
189getLinSpace((10._CKH,-10._CKH), (0._CKH,0._CKH), 4_IK)
190(+10.0000000000000000000000000000000000, -10.0000000000000000000000000000000000), (+6.66666666666666666666666666666666615, -6.66666666666666666666666666666666615), (+3.33333333333333333333333333333333308, -3.33333333333333333333333333333333308), (+0.00000000000000000000000000000000000, +0.00000000000000000000000000000000000)
191
192getLinSpace((10._CKH,-10._CKH), (0._CKH,0._CKH), 4_IK, fopen = .true._LK)
193(+7.50000000000000000000000000000000000, -7.50000000000000000000000000000000000), (+5.00000000000000000000000000000000000, -5.00000000000000000000000000000000000), (+2.50000000000000000000000000000000000, -2.50000000000000000000000000000000000), (+0.00000000000000000000000000000000000, +0.00000000000000000000000000000000000)
194
195getLinSpace((10._CKH,-10._CKH), (0._CKH,0._CKH), 4_IK, lopen = .true._LK)
196(+10.0000000000000000000000000000000000, -10.0000000000000000000000000000000000), (+7.50000000000000000000000000000000000, -7.50000000000000000000000000000000000), (+5.00000000000000000000000000000000000, -5.00000000000000000000000000000000000), (+2.50000000000000000000000000000000000, -2.50000000000000000000000000000000000)
197
198getLinSpace((10._CKH,-10._CKH), (0._CKH,0._CKH), 4_IK, fopen = .true._LK, lopen = .true._LK)
199(+8.75000000000000000000000000000000000, -8.75000000000000000000000000000000000), (+6.25000000000000000000000000000000000, -6.25000000000000000000000000000000000), (+3.75000000000000000000000000000000000, -3.75000000000000000000000000000000000), (+1.25000000000000000000000000000000000, -1.25000000000000000000000000000000000)
200
201
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 108 of file pm_arraySpace.F90.


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