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

Generate and return an arrayNew of the same type and kind as the input array, in which the requested instances of the input pattern have been replaced with the input replacement. More...

Detailed Description

Generate and return an arrayNew of the same type and kind as the input array, in which the requested instances of the input pattern have been replaced with the input replacement.

If an input vector of instance is specified, representing the specific instances of pattern to change, then only those specific instances will be changed.

Parameters
[in]array: The input contiguous array of rank 1 of either
  • type character of kind any supported by the processor (e.g., SK, SKA, SKD , or SKU), or
  • type logical of kind any supported by the processor (e.g., LK), or
  • type integer of kind any supported by the processor (e.g., IK, IK8, IK16, IK32, or IK64), or
  • 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),
or
  • a scalar character of kind any supported by the processor (e.g., SK, SKA, SKD , or SKU),
within which the specific instances of the input pattern must be replaced.
[in]pattern: The input contiguous array of rank 1 of the same type and kind as the input array, containing the pattern whose instances will have to be replaced in the input array.
[in]replacement: The input contiguous array of rank 1 of the same type and kind as the input array, containing the replacement that will replace in the instances of pattern in the input array.
iseq: The external user-specified function that takes either two input assumed-length character arguments (if the input array is also an assumed-length character) or two array-valued explicit-shape arguments of the same type and kind as the input array.
It must return a scalar of type logical of default kind LK that is .true. if all elements of the two input arguments are equivalent (e.g., equal) according to the user-defined criterion, otherwise, it is .false..
The the input array is array-valued, then the last argument to iseq is the length of the input pattern.
The following illustrates the generic interface of iseq where pattern is array-valued,
function iseq(segment, pattern, lenPattern) result(equivalent)
use pm_kind, only: IK, LK
integer(IK) , intent(in) :: lenPattern
TYPE(KIND) , intent(in) :: segment(lenPattern), pattern(lenPattern)
logical(LK) :: equivalent
end function
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 IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
Definition: pm_kind.F90:540
where TYPE(KIND) represents the type and kind of the input argument array, which can be one of the following,
character(*, SK), intent(in) :: segment(lenPattern), pattern(lenPattern)
integer(IK) , intent(in) :: segment(lenPattern), pattern(lenPattern)
logical(LK) , intent(in) :: segment(lenPattern), pattern(lenPattern)
complex(CK) , intent(in) :: segment(lenPattern), pattern(lenPattern)
real(RK) , intent(in) :: segment(lenPattern), pattern(lenPattern)
where the kinds SKG, IKG, LKG, CKG, RK, can refer to any kind type parameter that is supported by the processor.
The following illustrates the generic interface of iseq where pattern is scalar-valued (including Fortran scalar strings),
function iseq(segment, pattern) result(equivalent)
use pm_kind, only: LK
TYPE(KIND) , intent(in) :: segment, pattern
logical(LK) :: equivalent
end function
where TYPE(KIND) represents the type and kind of the input argument array, which can be one of the following,
use pm_kind, only: SK, IK, LK, CK, RK
character(*, SK), intent(in) :: segment, pattern
integer(IK) , intent(in) :: segment, pattern
logical(LK) , intent(in) :: segment, pattern
complex(CK) , intent(in) :: segment, pattern
real(RK) , intent(in) :: segment, pattern
integer, parameter RK
The default real kind in the ParaMonte library: real64 in Fortran, c_double in C-Fortran Interoperati...
Definition: pm_kind.F90:543
integer, parameter CK
The default complex kind in the ParaMonte library: real64 in Fortran, c_double_complex in C-Fortran I...
Definition: pm_kind.F90:542
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
where the kinds SK, IK, LK, CK, RK, can refer to any kind type parameter that is supported by the processor.
This user-defined equivalence check is extremely useful where an equivalence test other than exact identity is needed, for example, when the array segments should match the input pattern only within a given threshold or, when the case-sensitivity in character comparisons do not matter.
In such cases, user can define a custom equivalence criterion within the user-defined external function iseq to achieve the goal.
(optional, the default equivalence operator is .eqv. if the input array is logical, otherwise ==)
[in]instance: The input contiguous array of rank 1 of type integer of default kind IK, containing the instances of the input pattern in the input array that should be replaced with the input replacement.
Any element of instance that points to an out-of-scope instance of pattern in the input array will be ignored.
Any element of instance that is negatively valued will be counted from end of the input array.
For example, instance = [2,-1] requests replacing the second instance of pattern in array from the beginning and replacing the first instance of pattern starting from the end of array.
(optional, the default value corresponds to replacing all instances of pattern with replacement in array)
[in]sorted: The input logical of default kind LK indicating whether the elements of the specified input instance are all in ascending-order.
This includes the negative elements of instance after they are translated to the corresponding positive instances from the beginning of the input array.
Setting sorted = .true. will lead to faster runtime of the procedure.
However, the onus will be strictly on the user to ensure all elements of instance are in ascending-order.
This is generally not an easy guarantee to make if there are negative elements in instance.
Therefore, set sorted = .true. only if you can guarantee the validity of the condition.
(optional, default = .false.. It can be present as input argument only if the input argument instance is present.)
[in]unique: The input logical of default kind LK indicating whether the elements of the specified input instance are all unique.
This includes the negative elements of instance after they are translated to the corresponding positive instances from the beginning of the input array.
Setting unique = .true. will lead to faster runtime of the procedure.
However, the onus will be strictly on the user to ensure all elements of instance are unique.
This is generally not an easy guarantee to make if there are negative elements in instance.
Therefore, set unique = .true. only if you can guarantee the validity of the condition.
(optional, default = .false.. It can be present as input argument only if the input argument instance is present.)
Returns
arrayNew : The output allocatable array of the same type and kind as the input array in which all requested instances of the input pattern have been replaced with the input replacement.


Possible calling interfaces

arrayNew = getReplaced(array, pattern, replacement)
arrayNew = getReplaced(array, pattern, replacement, iseq)
arrayNew = getReplaced(array, pattern, replacement, instance, sorted = sorted, unique = unique)
arrayNew = getReplaced(array, pattern, replacement, iseq, instance, sorted = sorted, unique = unique)
Generate and return an arrayNew of the same type and kind as the input array, in which the requested ...
This module contains procedures and generic interfaces for replacing patterns within arrays of variou...
Warning
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.
The procedures under this generic interface are impure when the user-specified external procedure iseq is specified as input argument.
Note that in Fortran, trailing blanks are ignored in character comparison, that is, "Fortran" == "Fortran " yields .true..
Remarks
The functions under this generic interface are slightly slower than the setReplaced subroutine implementations.
See pm_arrayReplace for the relevant benchmarks.
See also
setReplaced
setInserted
setRemoved
setSplit


Example usage

1program example
2
3 use pm_kind, only: LK
4 use pm_kind, only: SK ! All kinds are supported.
5 use pm_kind, only: IK ! All kinds are supported.
6 use pm_kind, only: CK ! All kinds are supported.
7 use pm_kind, only: RK ! All kinds are supported.
8 use pm_io, only: display_type
10
11 implicit none
12
13 integer(IK) , allocatable :: instance(:) ! Must be of default kind IK
14 character(:, SK), allocatable :: string_SK , stringPattern_SK , stringReplacement_SK
15 character(9, SK), allocatable :: Array_SK(:) , ArrayPattern_SK(:), ArrayReplacement_SK(:) ! Can be any processor-supported kind.
16 integer(IK) , allocatable :: Array_IK(:) , ArrayPattern_IK(:), ArrayReplacement_IK(:) ! Can be any processor-supported kind.
17 complex(CK) , allocatable :: Array_CK(:) , ArrayPattern_CK(:), ArrayReplacement_CK(:) ! Can be any processor-supported kind.
18 real(RK) , allocatable :: Array_RK(:) , ArrayPattern_RK(:), ArrayReplacement_RK(:) ! Can be any processor-supported kind.
19 logical(LK) , allocatable :: Array_LK(:) , ArrayPattern_LK(:), ArrayReplacement_LK(:)
20
21 type(display_type) :: disp
22
23 disp = display_type(file = "main.out.F90")
24
25 call disp%skip()
26 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
27 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
28 call disp%show("! Replace all instances of pattern in array.")
29 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
30 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
31 call disp%skip()
32
33 string_SK = "ParaMonte is a Monte Carlo Library."
34 Array_SK = ["ParaMonte", "is ", "a ", "Monte ", "Carlo ", "Library. "]
35 Array_IK = [1_IK, 2_IK, 3_IK, 4_IK]
36 Array_RK = [1._RK, 2._RK, 3._RK, 4._RK]
37 Array_CK = [(1._CK, -1._CK), (2._CK, -2._CK), (3._CK, -3._CK), (4._CK, -4._CK)]
38 Array_LK = [.false._LK, .true._LK, .true._LK, .false._LK]
39
40 stringPattern_SK = "a Monte Carlo"
41 ArrayPattern_SK = ["a ", "Monte ", "Carlo "]
42 ArrayPattern_IK = [3_IK]
43 ArrayPattern_RK = [3._RK]
44 ArrayPattern_CK = [(3._CK, -3._CK)]
45 ArrayPattern_LK = [.true._LK, .true._LK]
46
47 stringReplacement_SK = "now a Machine Learning"
48 ArrayReplacement_SK = ["now ", "a ", "Machine ", "Learning "]
49 ArrayReplacement_IK = [-1_IK, 0_IK, 1_IK]
50 ArrayReplacement_RK = [-1._RK, 0._RK, 1._RK]
51 ArrayReplacement_CK = [(-1._CK, +1._CK), (0._CK, 0._CK), (+1._CK, -1._CK)]
52 ArrayReplacement_LK = [.false._LK]
53
54 call disp%skip()
55 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%")
56 call disp%show("! Replace character scalar.")
57 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%")
58 call disp%skip()
59
60 call disp%show("string_SK")
61 call disp%show( string_SK, deliml = SK_"""" )
62 call disp%show("stringPattern_SK")
63 call disp%show( stringPattern_SK, deliml = SK_"""" )
64 call disp%show("stringReplacement_SK")
65 call disp%show( stringReplacement_SK, deliml = SK_"""" )
66 call disp%show("getReplaced(string_SK, stringPattern_SK, stringReplacement_SK)")
67 call disp%show( getReplaced(string_SK, stringPattern_SK, stringReplacement_SK), deliml = SK_"""" )
68
69 call disp%skip()
70 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%")
71 call disp%show("! Replace character array.")
72 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%")
73 call disp%skip()
74
75 call disp%show("Array_SK")
76 call disp%show( Array_SK, deliml = SK_"""" )
77 call disp%show("ArrayPattern_SK")
78 call disp%show( ArrayPattern_SK, deliml = SK_"""" )
79 call disp%show("ArrayReplacement_SK")
80 call disp%show( ArrayReplacement_SK, deliml = SK_"""" )
81 call disp%show("getReplaced(Array_SK, ArrayPattern_SK, ArrayReplacement_SK)")
82 call disp%show("getReplaced(Array_SK, ArrayPattern_SK, ArrayReplacement_SK)") ! gfortran 11 bug: does not allow allocatable deferred length array because the interface is assumed-length allocatable.
83
84 call disp%skip()
85 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%")
86 call disp%show("! Replace logical array.")
87 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%")
88 call disp%skip()
89
90 call disp%show("Array_LK")
91 call disp%show( Array_LK )
92 call disp%show("ArrayPattern_LK")
93 call disp%show( ArrayPattern_LK )
94 call disp%show("ArrayReplacement_LK")
95 call disp%show( ArrayReplacement_LK )
96 call disp%show("getReplaced(Array_LK, ArrayPattern_LK, ArrayReplacement_LK)")
97 call disp%show( getReplaced(Array_LK, ArrayPattern_LK, ArrayReplacement_LK) )
98
99 call disp%skip()
100 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%")
101 call disp%show("! Replace integer array.")
102 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%")
103 call disp%skip()
104
105 call disp%show("Array_IK")
106 call disp%show( Array_IK )
107 call disp%show("ArrayPattern_IK")
108 call disp%show( ArrayPattern_IK )
109 call disp%show("ArrayReplacement_IK")
110 call disp%show( ArrayReplacement_IK )
111 call disp%show("getReplaced(Array_IK, ArrayPattern_IK, ArrayReplacement_IK)")
112 call disp%show( getReplaced(Array_IK, ArrayPattern_IK, ArrayReplacement_IK) )
113
114 call disp%skip()
115 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%")
116 call disp%show("! Replace complex array.")
117 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%")
118 call disp%skip()
119
120 call disp%show("Array_CK")
121 call disp%show( Array_CK )
122 call disp%show("ArrayPattern_CK")
123 call disp%show( ArrayPattern_CK )
124 call disp%show("ArrayReplacement_CK")
125 call disp%show( ArrayReplacement_CK )
126 call disp%show("getReplaced(Array_CK, ArrayPattern_CK, ArrayReplacement_CK)")
127 call disp%show( getReplaced(Array_CK, ArrayPattern_CK, ArrayReplacement_CK) )
128
129 call disp%skip()
130 call disp%show("!%%%%%%%%%%%%%%%%%%%%")
131 call disp%show("! Replace real array.")
132 call disp%show("!%%%%%%%%%%%%%%%%%%%%")
133 call disp%skip()
134
135 call disp%show("Array_RK")
136 call disp%show( Array_RK )
137 call disp%show("ArrayPattern_RK")
138 call disp%show( ArrayPattern_RK )
139 call disp%show("ArrayReplacement_RK")
140 call disp%show( ArrayReplacement_RK )
141 call disp%show("getReplaced(Array_RK, ArrayPattern_RK, ArrayReplacement_RK)")
142 call disp%show( getReplaced(Array_RK, ArrayPattern_RK, ArrayReplacement_RK) )
143
144 call disp%skip()
145 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
146 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
147 call disp%show("! Replace only particular instances of pattern in array.")
148 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
149 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
150 call disp%skip()
151
152 string_SK = "1ParaMonte-2ParaMonte-3ParaMonte-4ParaMonte-5ParaMonte"
153 !Array_SK = ["ParaMonte", "ParaMonte", "ParaMonte", "ParaMonte", "ParaMonte"]
154 Array_IK = [1_IK, 1_IK, 1_IK, 1_IK, 1_IK]
155 Array_RK = [1._RK, 1._RK, 1._RK, 1._RK, 1._RK]
156 Array_CK = [(+1._CK, -1._CK), (+1._CK, -1._CK), (+1._CK, -1._CK), (+1._CK, -1._CK), (+1._CK, -1._CK)]
157
158 stringPattern_SK = "ParaMonte"
159 !ArrayPattern_SK = "ParaMonte"
160 ArrayPattern_IK = [1_IK]
161 ArrayPattern_RK = [1._RK]
162 ArrayPattern_CK = [(+1._CK, -1._CK)]
163
164 stringReplacement_SK = ""
165 !ArrayReplacement_SK = ["XXXXXXXXX"]
166 ArrayReplacement_IK = [-2_IK,-3_IK]
167 ArrayReplacement_RK = [-2._RK,-3._RK]
168 ArrayReplacement_CK = [(-2._CK, +2._CK), (-3._CK, +3._CK)]
169
170 ! Replace only the second occurrence from the beginning as well as the first and the second occurrences from the end.
171
172 instance = [-1_IK, -2_IK, 2_IK]
173
174 call disp%skip()
175 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
176 call disp%show("! Replace specific instances within the character scalar.")
177 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
178 call disp%skip()
179
180 call disp%show("string_SK")
181 call disp%show( string_SK, deliml = SK_"""" )
182 call disp%show("stringPattern_SK")
183 call disp%show( stringPattern_SK, deliml = SK_"""" )
184 call disp%show("stringReplacement_SK")
185 call disp%show( stringReplacement_SK, deliml = SK_"""" )
186 call disp%show("instance")
187 call disp%show( instance )
188 call disp%show("getReplaced(string_SK, stringPattern_SK, stringReplacement_SK, instance)")
189 call disp%show( getReplaced(string_SK, stringPattern_SK, stringReplacement_SK, instance), deliml = SK_"""" )
190
191 call disp%skip()
192 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
193 call disp%show("! Replace specific instances within the character array.")
194 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
195 call disp%skip()
196
197 call disp%show("Array_SK")
198 call disp%show( Array_SK, deliml = SK_"""" )
199 call disp%show("ArrayPattern_SK")
200 call disp%show( ArrayPattern_SK, deliml = SK_"""" )
201 call disp%show("ArrayReplacement_SK")
202 call disp%show( ArrayReplacement_SK, deliml = SK_"""" )
203 call disp%show("instance")
204 call disp%show( instance )
205 call disp%show("getReplaced(Array_SK, ArrayPattern_SK, ArrayReplacement_SK, instance)")
206 Array_SK = getReplaced(Array_SK, ArrayPattern_SK, ArrayReplacement_SK, instance) ! gfortran 11 bug: does not allow passing function result directly to `disp%show()`.
207 call disp%show( Array_SK, deliml = SK_"""" )
208
209 call disp%skip()
210 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
211 call disp%show("! Replace specific instances within the integer array.")
212 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
213 call disp%skip()
214
215 call disp%show("Array_IK")
216 call disp%show( Array_IK )
217 call disp%show("ArrayPattern_IK")
218 call disp%show( ArrayPattern_IK )
219 call disp%show("ArrayReplacement_IK")
220 call disp%show( ArrayReplacement_IK )
221 call disp%show("instance")
222 call disp%show( instance )
223 call disp%show("getReplaced(Array_IK, ArrayPattern_IK, ArrayReplacement_IK, instance)")
224 call disp%show( getReplaced(Array_IK, ArrayPattern_IK, ArrayReplacement_IK, instance) )
225
226 call disp%skip()
227 call disp%show("Array_IK = [integer(IK) :: 5, 8, 4, 7, 5, 5, 5]")
228 Array_IK = [integer(IK) :: 5, 8, 4, 7, 5, 5, 5]
229 call disp%show("ArrayPattern_IK = [5_IK]")
230 ArrayPattern_IK = [5_IK]
231 call disp%show("ArrayReplacement_IK")
232 ArrayReplacement_IK = [integer(IK) ::]
233 call disp%show("instance = [integer(IK) :: -2, 3, 2, -13, -11, 6, 4, -7, 8]")
234 instance = [integer(IK) :: -2, 3, 2, -13, -11, 6, 4, -7, 8]
235 call disp%show("getReplaced(Array_IK, ArrayPattern_IK(1), ArrayReplacement_IK, instance, sorted = .false._LK, unique = .false._LK)")
236 call disp%show( getReplaced(Array_IK, ArrayPattern_IK(1), ArrayReplacement_IK, instance, sorted = .false._LK, unique = .false._LK) )
237
238 call disp%skip()
239 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
240 call disp%show("! Replace specific instances within the logical array.")
241 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
242 call disp%skip()
243
244 call disp%show("Array_LK = [logical(LK) :: .false., .true., .true., .false., .false., .true., .false., .false., .false., .true., .false., .false., .false., .true., .false.]")
245 Array_LK = [logical(LK) :: .false., .true., .true., .false., .false., .true., .false., .false., .false., .true., .false., .false., .false., .true., .false.]
246 call disp%show("ArrayPattern_LK = [logical(LK) :: .true.]")
247 ArrayPattern_LK = [logical(LK) :: .true.]
248 call disp%show("ArrayReplacement_LK")
249 ArrayReplacement_LK = [logical(LK) ::]
250 call disp%show("instance = [integer(IK) :: 3]")
251 instance = [integer(IK) :: 3]
252 call disp%show("getReplaced(Array_LK, ArrayPattern_LK, ArrayReplacement_LK, instance, sorted = .false._LK, unique = .false._LK)")
253 call disp%show( getReplaced(Array_LK, ArrayPattern_LK, ArrayReplacement_LK, instance, sorted = .false._LK, unique = .false._LK) )
254
255 call disp%skip()
256 call disp%show("Array_LK = [logical(LK) :: .false.]")
257 Array_LK = [logical(LK) :: .false.]
258 call disp%show("ArrayPattern_LK = [logical(LK) :: .false.]")
259 ArrayPattern_LK = [logical(LK) :: .false.]
260 call disp%show("ArrayReplacement_LK = [logical(LK) ::]")
261 ArrayReplacement_LK = [logical(LK) ::]
262 call disp%show("instance = [integer(IK) :: 0]")
263 instance = [integer(IK) :: 0]
264 call disp%show("getReplaced(Array_LK, ArrayPattern_LK(1), ArrayReplacement_LK, instance, sorted = .false._LK, unique = .false._LK)")
265 call disp%show( getReplaced(Array_LK, ArrayPattern_LK(1), ArrayReplacement_LK, instance, sorted = .false._LK, unique = .false._LK) )
266
267 call disp%skip()
268 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
269 call disp%show("! Replace specific instances within the complex array.")
270 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
271 call disp%skip()
272
273 call disp%show("Array_CK")
274 call disp%show( Array_CK )
275 call disp%show("ArrayPattern_CK")
276 call disp%show( ArrayPattern_CK )
277 call disp%show("ArrayReplacement_CK")
278 call disp%show( ArrayReplacement_CK )
279 call disp%show("instance")
280 call disp%show( instance )
281 call disp%show("getReplaced(Array_CK, ArrayPattern_CK, ArrayReplacement_CK, instance)")
282 call disp%show( getReplaced(Array_CK, ArrayPattern_CK, ArrayReplacement_CK, instance) )
283
284 call disp%skip()
285 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
286 call disp%show("! Replace specific instances within the real array.")
287 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
288 call disp%skip()
289
290 call disp%show("Array_RK")
291 call disp%show( Array_RK )
292 call disp%show("ArrayPattern_RK")
293 call disp%show( ArrayPattern_RK )
294 call disp%show("ArrayReplacement_RK")
295 call disp%show( ArrayReplacement_RK )
296 call disp%show("instance")
297 call disp%show( instance )
298 call disp%show("getReplaced(Array_RK, ArrayPattern_RK, ArrayReplacement_RK, instance)")
299 call disp%show( getReplaced(Array_RK, ArrayPattern_RK, ArrayReplacement_RK, instance) )
300
301 call disp%skip()
302 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
303 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
304 call disp%show("! Replace specific instances with a user-defined equality test.")
305 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
306 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
307 call disp%skip()
308
309 call disp%skip()
310 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
311 call disp%show("! Replace specific instances within the real array.")
312 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
313 call disp%skip()
314
315 Array_RK = [1.01_RK, 1.04_RK, 0.98_RK, 1.0_RK, 1.02_RK]
316 ArrayPattern_RK = [-1._RK, 1._RK]
317 ArrayReplacement_RK = [0._RK,0._RK]
318 instance = [-2]
319
320 call disp%show("Array_RK")
321 call disp%show( Array_RK )
322 call disp%show("ArrayPattern_RK")
323 call disp%show( ArrayPattern_RK )
324 call disp%show("ArrayReplacement_RK")
325 call disp%show( ArrayReplacement_RK )
326 call disp%show("instance")
327 call disp%show( instance )
328 call disp%show("getReplaced(Array_RK, ArrayPattern_RK, ArrayReplacement_RK, iseq = iseq_RK, instance = instance)")
329 call disp%show( getReplaced(Array_RK, ArrayPattern_RK, ArrayReplacement_RK, iseq = iseq_RK, instance = instance) )
330
331 call disp%skip()
332 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
333 call disp%show("! Replace case-insensitive instances within the character array.")
334 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
335 call disp%skip()
336
337 string_SK = "ABBAbbA"
338 stringPattern_SK = "bb"
339 stringReplacement_SK = "x"
340
341 call disp%show("string_SK")
342 call disp%show( string_SK, deliml = SK_"""" )
343 call disp%show("stringPattern_SK")
344 call disp%show( stringPattern_SK, deliml = SK_"""" )
345 call disp%show("stringReplacement_SK")
346 call disp%show( stringReplacement_SK, deliml = SK_"""" )
347 call disp%show("getReplaced(string_SK, stringPattern_SK, stringReplacement_SK, iseq = iseq_SK)")
348 call disp%show( getReplaced(string_SK, stringPattern_SK, stringReplacement_SK, iseq = iseq_SK), deliml = SK_"""" )
349
350contains
351
352 function iseq_RK(Segment, pattern, lenPattren) result(equivalent)
353 integer(IK) , intent(in) :: lenPattren
354 real(RK) , intent(in) :: Segment(lenPattren)
355 real(RK) , intent(in) :: pattern(lenPattren)
356 logical(LK) :: equivalent
357 equivalent = all(abs(abs(pattern) - abs(Segment)) < 0.05_RK)
358 end function
359
360 function iseq_SK(segment, pattern) result(equivalent)
361 use pm_strASCII, only: getStrLower
362 character(*, SK), intent(in) :: segment, pattern
363 logical(LK) :: equivalent
364 equivalent = getStrLower(segment) == pattern
365 end function
366
367end 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
Generate and return the input string where the uppercase English alphabets are all converted to lower...
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 contains the uncommon and hardly representable ASCII characters as well as procedures for...
Definition: pm_strASCII.F90:61
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! Replace all instances of pattern in array.
5!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7
8
9!%%%%%%%%%%%%%%%%%%%%%%%%%%
10! Replace character scalar.
11!%%%%%%%%%%%%%%%%%%%%%%%%%%
12
13string_SK
14"ParaMonte is a Monte Carlo Library."
15stringPattern_SK
16"a Monte Carlo"
17stringReplacement_SK
18"now a Machine Learning"
19getReplaced(string_SK, stringPattern_SK, stringReplacement_SK)
20"ParaMonte is now a Machine Learning Library."
21
22!%%%%%%%%%%%%%%%%%%%%%%%%%
23! Replace character array.
24!%%%%%%%%%%%%%%%%%%%%%%%%%
25
26Array_SK
27"ParaMonte", "is ", "a ", "Monte ", "Carlo ", "Library. "
28ArrayPattern_SK
29"a ", "Monte ", "Carlo "
30ArrayReplacement_SK
31"now ", "a ", "Machine ", "Learning "
32getReplaced(Array_SK, ArrayPattern_SK, ArrayReplacement_SK)
33getReplaced(Array_SK, ArrayPattern_SK, ArrayReplacement_SK)
34
35!%%%%%%%%%%%%%%%%%%%%%%%
36! Replace logical array.
37!%%%%%%%%%%%%%%%%%%%%%%%
38
39Array_LK
40F, T, T, F
41ArrayPattern_LK
42T, T
43ArrayReplacement_LK
44F
45getReplaced(Array_LK, ArrayPattern_LK, ArrayReplacement_LK)
46F, F, F
47
48!%%%%%%%%%%%%%%%%%%%%%%%
49! Replace integer array.
50!%%%%%%%%%%%%%%%%%%%%%%%
51
52Array_IK
53+1, +2, +3, +4
54ArrayPattern_IK
55+3
56ArrayReplacement_IK
57-1, +0, +1
58getReplaced(Array_IK, ArrayPattern_IK, ArrayReplacement_IK)
59+1, +2, -1, +0, +1, +4
60
61!%%%%%%%%%%%%%%%%%%%%%%%
62! Replace complex array.
63!%%%%%%%%%%%%%%%%%%%%%%%
64
65Array_CK
66(+1.0000000000000000, -1.0000000000000000), (+2.0000000000000000, -2.0000000000000000), (+3.0000000000000000, -3.0000000000000000), (+4.0000000000000000, -4.0000000000000000)
67ArrayPattern_CK
68(+3.0000000000000000, -3.0000000000000000)
69ArrayReplacement_CK
70(-1.0000000000000000, +1.0000000000000000), (+0.0000000000000000, +0.0000000000000000), (+1.0000000000000000, -1.0000000000000000)
71getReplaced(Array_CK, ArrayPattern_CK, ArrayReplacement_CK)
72(+1.0000000000000000, -1.0000000000000000), (+2.0000000000000000, -2.0000000000000000), (-1.0000000000000000, +1.0000000000000000), (+0.0000000000000000, +0.0000000000000000), (+1.0000000000000000, -1.0000000000000000), (+4.0000000000000000, -4.0000000000000000)
73
74!%%%%%%%%%%%%%%%%%%%%
75! Replace real array.
76!%%%%%%%%%%%%%%%%%%%%
77
78Array_RK
79+1.0000000000000000, +2.0000000000000000, +3.0000000000000000, +4.0000000000000000
80ArrayPattern_RK
81+3.0000000000000000
82ArrayReplacement_RK
83-1.0000000000000000, +0.0000000000000000, +1.0000000000000000
84getReplaced(Array_RK, ArrayPattern_RK, ArrayReplacement_RK)
85+1.0000000000000000, +2.0000000000000000, -1.0000000000000000, +0.0000000000000000, +1.0000000000000000, +4.0000000000000000
86
87!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
88!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
89! Replace only particular instances of pattern in array.
90!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
91!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
92
93
94!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
95! Replace specific instances within the character scalar.
96!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
97
98string_SK
99"1ParaMonte-2ParaMonte-3ParaMonte-4ParaMonte-5ParaMonte"
100stringPattern_SK
101"ParaMonte"
102stringReplacement_SK
103""
104instance
105-1, -2, +2
106getReplaced(string_SK, stringPattern_SK, stringReplacement_SK, instance)
107"1ParaMonte-2-3ParaMonte-4-5"
108
109!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
110! Replace specific instances within the character array.
111!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
112
113Array_SK
114"ParaMonte", "is ", "a ", "Monte ", "Carlo ", "Library. "
115ArrayPattern_SK
116"a ", "Monte ", "Carlo "
117ArrayReplacement_SK
118"now ", "a ", "Machine ", "Learning "
119instance
120-1, -2, +2
121getReplaced(Array_SK, ArrayPattern_SK, ArrayReplacement_SK, instance)
122"ParaMonte", "is ", "now ", "a ", "Machine ", "Learning ", "Library. "
123
124!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
125! Replace specific instances within the integer array.
126!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
127
128Array_IK
129+1, +1, +1, +1, +1
130ArrayPattern_IK
131+1
132ArrayReplacement_IK
133-2, -3
134instance
135-1, -2, +2
136getReplaced(Array_IK, ArrayPattern_IK, ArrayReplacement_IK, instance)
137+1, -2, -3, +1, -2, -3, -2, -3
138
139Array_IK = [integer(IK) :: 5, 8, 4, 7, 5, 5, 5]
140ArrayPattern_IK = [5_IK]
141ArrayReplacement_IK
142instance = [integer(IK) :: -2, 3, 2, -13, -11, 6, 4, -7, 8]
143getReplaced(Array_IK, ArrayPattern_IK(1), ArrayReplacement_IK, instance, sorted = .false._LK, unique = .false._LK)
144+5, +8, +4, +7
145
146!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
147! Replace specific instances within the logical array.
148!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
149
150Array_LK = [logical(LK) :: .false., .true., .true., .false., .false., .true., .false., .false., .false., .true., .false., .false., .false., .true., .false.]
151ArrayPattern_LK = [logical(LK) :: .true.]
152ArrayReplacement_LK
153instance = [integer(IK) :: 3]
154getReplaced(Array_LK, ArrayPattern_LK, ArrayReplacement_LK, instance, sorted = .false._LK, unique = .false._LK)
155F, T, T, F, F, F, F, F, T, F, F, F, T, F
156
157Array_LK = [logical(LK) :: .false.]
158ArrayPattern_LK = [logical(LK) :: .false.]
159ArrayReplacement_LK = [logical(LK) ::]
160instance = [integer(IK) :: 0]
161getReplaced(Array_LK, ArrayPattern_LK(1), ArrayReplacement_LK, instance, sorted = .false._LK, unique = .false._LK)
162F
163
164!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
165! Replace specific instances within the complex array.
166!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
167
168Array_CK
169(+1.0000000000000000, -1.0000000000000000), (+1.0000000000000000, -1.0000000000000000), (+1.0000000000000000, -1.0000000000000000), (+1.0000000000000000, -1.0000000000000000), (+1.0000000000000000, -1.0000000000000000)
170ArrayPattern_CK
171(+1.0000000000000000, -1.0000000000000000)
172ArrayReplacement_CK
173(-2.0000000000000000, +2.0000000000000000), (-3.0000000000000000, +3.0000000000000000)
174instance
175+0
176getReplaced(Array_CK, ArrayPattern_CK, ArrayReplacement_CK, instance)
177(+1.0000000000000000, -1.0000000000000000), (+1.0000000000000000, -1.0000000000000000), (+1.0000000000000000, -1.0000000000000000), (+1.0000000000000000, -1.0000000000000000), (+1.0000000000000000, -1.0000000000000000)
178
179!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
180! Replace specific instances within the real array.
181!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
182
183Array_RK
184+1.0000000000000000, +1.0000000000000000, +1.0000000000000000, +1.0000000000000000, +1.0000000000000000
185ArrayPattern_RK
186+1.0000000000000000
187ArrayReplacement_RK
188-2.0000000000000000, -3.0000000000000000
189instance
190+0
191getReplaced(Array_RK, ArrayPattern_RK, ArrayReplacement_RK, instance)
192+1.0000000000000000, +1.0000000000000000, +1.0000000000000000, +1.0000000000000000, +1.0000000000000000
193
194!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
195!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
196! Replace specific instances with a user-defined equality test.
197!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
198!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
199
200
201!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
202! Replace specific instances within the real array.
203!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
204
205Array_RK
206+1.0100000000000000, +1.0400000000000000, +0.97999999999999998, +1.0000000000000000, +1.0200000000000000
207ArrayPattern_RK
208-1.0000000000000000, +1.0000000000000000
209ArrayReplacement_RK
210+0.0000000000000000, +0.0000000000000000
211instance
212-2
213getReplaced(Array_RK, ArrayPattern_RK, ArrayReplacement_RK, iseq = iseq_RK, instance = instance)
214+0.0000000000000000, +0.0000000000000000, +0.97999999999999998, +1.0000000000000000, +1.0200000000000000
215
216!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
217! Replace case-insensitive instances within the character array.
218!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
219
220string_SK
221"ABBAbbA"
222stringPattern_SK
223"bb"
224stringReplacement_SK
225"x"
226getReplaced(string_SK, stringPattern_SK, stringReplacement_SK, iseq = iseq_SK)
227"AxAxA"
228
Test:
test_pm_arrayReplace
Bug:

Status: Unresolved
Source: Intel Classic Fortran Compiler ifort version 2021.2.0, GNU Fortran Compiler gfortran version 10, 11
Description: The Intel Classic Fortran Compiler ifort version 2021.2.0 has a bug for the following interface definition,
character(len(array)) , allocatable :: arrayNew(:)

leading to an internal compiler error.

Remedy (as of ParaMonte Library version 2.0.0): For now, the remedy seems to be to redefine the interface as,

character(:, SK), allocatable :: arrayNew(:)

and changing the allocation method accordingly in the implementation to,

allocate(character(len(array, kind = IK)) :: arrayNew(lenArrayNew))

However, this introduces internal compiler error: Segmentation fault with gfortran versions 10 and 11. Here is a code snippet to regenerate the bug in Intel ifort (uncomment the commented line to reproduce the gfortran bug),

module pm_explicitLenResult
implicit none
interface
pure module function bug(array) result(arrayNew)
character(*, SK), intent(in), contiguous :: array(:)
character(len(array),SK) , allocatable :: arrayNew(:) ! catastrophic internal error with ifort 2021.2. Fine with gfortran 10.3
!character(:, SK) , allocatable :: arrayNew(:) ! catastrophic internal error with gfortran 10.3. Fine with ifort 2021.2
end function
end interface
end module pm_explicitLenResult
submodule (pm_explicitLenResult) routines
implicit none
contains
module procedure bug
allocate(arrayNew, source = array)
end procedure
end submodule routines
program main
use pm_explicitLenResult, only: bug
character(2) :: array(3) = ["AA", "BB", "CC"]
character(2), allocatable :: arrayNew(:)
arrayNew = bug(array)
end program main
program main
This is main entry to the tests of the ParaMonte kernel library.
Definition: main.F90:27

It turns out that both gfortran and Intel do not tolerate the separation of interface from implementation in the above code snippet. If one duplicates the interface in the implementation submodule, then both compilers compile and run the code with no errors. This is the remedy that is currently used in this getReplaced generic interface (interface duplication where the bug exists). Here is a workaround example for the bug in the above code snippet,

module pm_explicitLenResult
implicit none
interface
pure module function bug(array) result(arrayNew)
character(*, SK), intent(in), contiguous :: array(:)
character(len(array)) , allocatable :: arrayNew(:) ! catastrophic internal error with ifort 2021.2. Fine with gfortran 10.3
end function
end interface
end module pm_explicitLenResult
submodule (pm_explicitLenResult) routines
implicit none
contains
module procedure bug
allocate(arrayNew, source = array)
end procedure
end submodule routines
program main
use pm_explicitLenResult, only: bug
character(2) :: array(3) = ["AA", "BB", "CC"]
character(2), allocatable :: arrayNew(:)
arrayNew = bug(array)
end program main
Bug:

Status: Unresolved
Source: GNU Fortran Compiler gfortran version 10, 11
Description: The GNU Fortran Compiler gfortran cannot run examples that use procedure dummy arguments iseq() with explicit interface, yielding the following error:
Fortran runtime error: array bound mismatch for dimension 1 of array 'segment' (0/7021782950660276225)

The Intel Classic Fortran Compiler ifort version 2021.6 can successfully compile and run the examples.

Remedy (as of ParaMonte Library version 2.0.0): For now, all iseq() procedure dummy argument interfaces are kept implicit.

Todo:
The internal compiler error with Intel Classic Fortran Compiler ifort and GNU Fortran Compiler gfortran has to be fixed in the future versions.
Todo:
Low Priority: This generic interface can be extended to 2D input objects.
Todo:
High Priority: This generic interface can be extended to scalar input pattern and replacement arguments.
Such an extension will likely lead to runtime performance gain for cases where pattern and replacement are arrays of length 1.
See pm_arraySplit for a relevant benchmark about this matter.
Todo:
High Priority: A benchmark comparing the performance of setReplaced with and without sorted, unique optional input arguments should be added.


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:
Amir Shahmoradi, September 1, 2017, 12:00 AM, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin

Definition at line 986 of file pm_arrayReplace.F90.


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