Generate and return the component-wise minimum value of (both real and imaginary parts of) the input complex
.
More...
Generate and return the component-wise minimum value of (both real and imaginary parts of) the input complex
.
- Parameters
-
[in] | a1 | : The input scalar or array of arbitrary rank of type complex of kind any supported by the processor (e.g., CK, CK32, CK64, or CK128). |
[in] | a2 | : The input scalar or array of arbitrary rank of the same type and kind as a1 . |
- Returns
val
: The output scalar or array of the same rank and shape as a1
whose real and imaginary parts are set to the minimum values of the corresponding real and imaginary parts of the input a1
and a2
.
Possible calling interfaces ⛓
val = min(a1, a2) ! = cmplx(min(a1%re, a2%re), min(a1%im, a2%im), kind(a1))
Generate and return the component-wise minimum value of (both real and imaginary parts of) the input ...
This module contains procedures and generic interfaces for computing element-wise minimum/maximum val...
- See also
- min
max
minval
maxval
minloc
maxloc
pm_complexCompareAll
pm_complexCompareAny
pm_complexCompareLex
pm_arrayMinMax
pm_mathMinMax
Example usage ⛓
10 integer(IK) :: lb, ub, lenarr
11 integer(IK) :: itry, ntry
= 5
12 type(display_type) :: disp
17 complex(CKG) :: a1, a2
18 complex(CKG),
allocatable :: array1(:)
23 call disp%show(
"a1 = cmplx(getUnifRand(lb, ub), getUnifRand(lb, ub), CKG)")
25 call disp%show(
"a2 = cmplx(getUnifRand(lb, ub), getUnifRand(lb, ub), CKG)")
31 call disp%show(
"lenarr = getUnifRand(2, 5)")
33 call disp%show(
"array1 = getUnifRand((-9._CKG, -9._CKG), (+9._CKG, +9._CKG), lenarr)")
34 array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
45 complex(CKG),
allocatable :: array1(:)
46 complex(CKG) :: a1, a2
51 call disp%show(
"a1 = cmplx(getUnifRand(lb, ub), getUnifRand(lb, ub), CKG)")
53 call disp%show(
"a2 = cmplx(getUnifRand(lb, ub), getUnifRand(lb, ub), CKG)")
59 call disp%show(
"lenarr = getUnifRand(2, 5)")
61 call disp%show(
"array1 = getUnifRand((-9._CKG, -9._CKG), (+9._CKG, +9._CKG), lenarr)")
62 array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
73 complex(CKG) :: a1, a2
74 complex(CKG),
allocatable :: array1(:)
79 call disp%show(
"a1 = cmplx(getUnifRand(lb, ub), getUnifRand(lb, ub), CKG)")
81 call disp%show(
"a2 = cmplx(getUnifRand(lb, ub), getUnifRand(lb, ub), CKG)")
87 call disp%show(
"lenarr = getUnifRand(2, 5)")
89 call disp%show(
"array1 = getUnifRand((-9._CKG, -9._CKG), (+9._CKG, +9._CKG), lenarr)")
90 array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
Generate and return a scalar or a contiguous array of rank 1 of length s1 of randomly uniformly distr...
This is a generic method of the derived type display_type with pass attribute.
This is a generic method of the derived type display_type with pass attribute.
This module contains classes and procedures for computing various statistical quantities related to t...
This module contains classes and procedures for input/output (IO) or generic display operations on st...
type(display_type) disp
This is a scalar module variable an object of type display_type for general display.
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
integer, parameter CKH
The scalar integer constant of intrinsic default kind, representing the highest-precision complex kin...
integer, parameter CKS
The single-precision complex kind in Fortran mode. On most platforms, this is a 32-bit real kind.
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
integer, parameter CKD
The double precision complex kind in Fortran mode. On most platforms, this is a 64-bit real kind.
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
Generate and return an object of type display_type.
Example Unix compile command via Intel ifort
compiler ⛓
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example Windows Batch compile command via Intel ifort
compiler ⛓
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example output ⛓
6(
-9.00000000,
+7.00000000), (
-3.00000000,
-4.00000000)
8(
-9.00000000,
-4.00000000)
10array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
12(
-3.00000000,
-6.82141495), (
-3.00000000,
-4.00000000), (
-7.34416771,
-4.00000000), (
-3.00000000,
-4.00000000), (
-3.00000000,
-4.00000000)
14(
-3.00000000,
-6.82141495), (
-3.00000000,
-4.00000000), (
-7.34416771,
-4.00000000), (
-3.00000000,
-4.00000000), (
-3.00000000,
-4.00000000)
20(
+6.00000000,
+6.00000000), (
+1.00000000,
-4.00000000)
22(
+1.00000000,
-4.00000000)
24array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
26(
-4.92376995,
-6.79630375), (
-7.01217222,
-7.55761909)
28(
-4.92376995,
-6.79630375), (
-7.01217222,
-7.55761909)
34(
+8.00000000,
-8.00000000), (
+9.00000000,
-4.00000000)
36(
+8.00000000,
-8.00000000)
38array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
40(
+5.95021057,
-4.00000000), (
-5.77251148,
-8.92519569)
42(
+5.95021057,
-4.00000000), (
-5.77251148,
-8.92519569)
48(
-1.00000000,
+5.00000000), (
+9.00000000,
+2.00000000)
50(
-1.00000000,
+2.00000000)
52array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
54(
-8.64567566,
-0.663967133), (
-5.64995575,
-4.94761753), (
+7.35679817,
-3.78381920)
56(
-8.64567566,
-0.663967133), (
-5.64995575,
-4.94761753), (
+7.35679817,
-3.78381920)
62(
+5.00000000,
-8.00000000), (
-2.00000000,
+1.00000000)
64(
-2.00000000,
-8.00000000)
66array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
68(
-2.00000000,
+1.00000000), (
-5.58189583,
+0.726246834)
70(
-2.00000000,
+1.00000000), (
-5.58189583,
+0.726246834)
77(
-7.0000000000000000,
+6.0000000000000000), (
+5.0000000000000000,
+7.0000000000000000)
79(
-7.0000000000000000,
+6.0000000000000000)
81array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
83(
-3.3071242831295518,
-3.0976691929507925), (
-6.6349188013123914,
+3.7379224221376757), (
-5.7248919906592590,
-2.2445145909106219), (
+3.7685557269688559,
+7.0000000000000000)
85(
-3.3071242831295518,
-3.0976691929507925), (
-6.6349188013123914,
+3.7379224221376757), (
-5.7248919906592590,
-2.2445145909106219), (
+3.7685557269688559,
+7.0000000000000000)
91(
+3.0000000000000000,
+5.0000000000000000), (
+0.0000000000000000,
-7.0000000000000000)
93(
+0.0000000000000000,
-7.0000000000000000)
95array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
97(
-6.7585382272723074,
-7.0000000000000000), (
+0.0000000000000000,
-7.0000000000000000), (
-1.8206891901291287,
-8.6720780744129229), (
+0.0000000000000000,
-7.0000000000000000)
99(
-6.7585382272723074,
-7.0000000000000000), (
+0.0000000000000000,
-7.0000000000000000), (
-1.8206891901291287,
-8.6720780744129229), (
+0.0000000000000000,
-7.0000000000000000)
105(
+4.0000000000000000,
+6.0000000000000000), (
+2.0000000000000000,
+5.0000000000000000)
107(
+2.0000000000000000,
+5.0000000000000000)
109array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
111(
-6.7240207607983997,
-0.46335721432093457), (
-4.9782296227393807,
-1.7761121950059278), (
+1.1901100049844615,
+1.1386970179338776), (
-7.4598335018785065,
-3.0484996521518855)
113(
-6.7240207607983997,
-0.46335721432093457), (
-4.9782296227393807,
-1.7761121950059278), (
+1.1901100049844615,
+1.1386970179338776), (
-7.4598335018785065,
-3.0484996521518855)
119(
+5.0000000000000000,
+4.0000000000000000), (
+6.0000000000000000,
-2.0000000000000000)
121(
+5.0000000000000000,
-2.0000000000000000)
123array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
125(
+6.0000000000000000,
-2.0000000000000000), (
+6.0000000000000000,
-2.0000000000000000), (
-3.2662167450879367,
-2.8202535951074768), (
+2.5770635409581732,
-2.0000000000000000), (
+4.5116529215418417,
-2.0000000000000000)
127(
+6.0000000000000000,
-2.0000000000000000), (
+6.0000000000000000,
-2.0000000000000000), (
-3.2662167450879367,
-2.8202535951074768), (
+2.5770635409581732,
-2.0000000000000000), (
+4.5116529215418417,
-2.0000000000000000)
133(
-7.0000000000000000,
+7.0000000000000000), (
+2.0000000000000000,
+9.0000000000000000)
135(
-7.0000000000000000,
+7.0000000000000000)
137array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
139(
-4.9103666364708758,
+7.0334896839663728), (
+1.7749278550954988,
+7.3979589948660340), (
-4.0939711725460288,
+3.0917948952413976), (
-3.1576966731019627,
-8.0829010345399226), (
+2.0000000000000000,
-1.7288262373318557)
141(
-4.9103666364708758,
+7.0334896839663728), (
+1.7749278550954988,
+7.3979589948660340), (
-4.0939711725460288,
+3.0917948952413976), (
-3.1576966731019627,
-8.0829010345399226), (
+2.0000000000000000,
-1.7288262373318557)
148(
+7.00000000000000000000000000000000000,
-8.00000000000000000000000000000000000), (
-1.00000000000000000000000000000000000,
-5.00000000000000000000000000000000000)
150(
-1.00000000000000000000000000000000000,
-8.00000000000000000000000000000000000)
152array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
154(
-3.45896612547210112115362720618881404,
-8.58405514832196938672084337007412860), (
-8.41054916462987186492759217147583121,
-5.00000000000000000000000000000000000)
156(
-3.45896612547210112115362720618881404,
-8.58405514832196938672084337007412860), (
-8.41054916462987186492759217147583121,
-5.00000000000000000000000000000000000)
162(
-7.00000000000000000000000000000000000,
+1.00000000000000000000000000000000000), (
+7.00000000000000000000000000000000000,
+5.00000000000000000000000000000000000)
164(
-7.00000000000000000000000000000000000,
+1.00000000000000000000000000000000000)
166array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
168(
-6.72250575187416770946118562314194507,
-6.85743364887671850033656728936927833), (
-0.423781691186082667222407738584607936,
+2.22248077608852463926955828815646081), (
+6.14491061711832587643455970875211323,
-7.20429272850775312902573237367994742), (
+3.17679971944665277908775334702368991,
+3.85717870337616663421013982844722769), (
-0.239233789046460017477579558377216677,
+5.00000000000000000000000000000000000)
170(
-6.72250575187416770946118562314194507,
-6.85743364887671850033656728936927833), (
-0.423781691186082667222407738584607936,
+2.22248077608852463926955828815646081), (
+6.14491061711832587643455970875211323,
-7.20429272850775312902573237367994742), (
+3.17679971944665277908775334702368991,
+3.85717870337616663421013982844722769), (
-0.239233789046460017477579558377216677,
+5.00000000000000000000000000000000000)
176(
+2.00000000000000000000000000000000000,
+5.00000000000000000000000000000000000), (
+2.00000000000000000000000000000000000,
-7.00000000000000000000000000000000000)
178(
+2.00000000000000000000000000000000000,
-7.00000000000000000000000000000000000)
180array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
182(
+2.00000000000000000000000000000000000,
-7.00000000000000000000000000000000000), (
+2.00000000000000000000000000000000000,
-7.00000000000000000000000000000000000), (
+2.00000000000000000000000000000000000,
-7.00000000000000000000000000000000000), (
-3.47428169546166324445756140926294982,
-7.00000000000000000000000000000000000)
184(
+2.00000000000000000000000000000000000,
-7.00000000000000000000000000000000000), (
+2.00000000000000000000000000000000000,
-7.00000000000000000000000000000000000), (
+2.00000000000000000000000000000000000,
-7.00000000000000000000000000000000000), (
-3.47428169546166324445756140926294982,
-7.00000000000000000000000000000000000)
190(
-7.00000000000000000000000000000000000,
+1.00000000000000000000000000000000000), (
-6.00000000000000000000000000000000000,
-9.00000000000000000000000000000000000)
192(
-7.00000000000000000000000000000000000,
-9.00000000000000000000000000000000000)
194array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
196(
-6.00000000000000000000000000000000000,
-9.00000000000000000000000000000000000), (
-6.00000000000000000000000000000000000,
-9.00000000000000000000000000000000000), (
-6.00000000000000000000000000000000000,
-9.00000000000000000000000000000000000)
198(
-6.00000000000000000000000000000000000,
-9.00000000000000000000000000000000000), (
-6.00000000000000000000000000000000000,
-9.00000000000000000000000000000000000), (
-6.00000000000000000000000000000000000,
-9.00000000000000000000000000000000000)
204(
-2.00000000000000000000000000000000000,
+3.00000000000000000000000000000000000), (
-1.00000000000000000000000000000000000,
+0.00000000000000000000000000000000000)
206(
-2.00000000000000000000000000000000000,
+0.00000000000000000000000000000000000)
208array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
210(
-4.71626214393363257961423191796263723,
-1.20081028940108193403541625689479997), (
-6.56280469748368986880916127906188083,
+0.00000000000000000000000000000000000), (
-1.00000000000000000000000000000000000,
-3.70873620971012322528818252588143896), (
-1.00000000000000000000000000000000000,
+0.00000000000000000000000000000000000)
212(
-4.71626214393363257961423191796263723,
-1.20081028940108193403541625689479997), (
-6.56280469748368986880916127906188083,
+0.00000000000000000000000000000000000), (
-1.00000000000000000000000000000000000,
-3.70873620971012322528818252588143896), (
-1.00000000000000000000000000000000000,
+0.00000000000000000000000000000000000)
- Test:
- test_pm_complexMinMax
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.
-
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.
-
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.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, September 1, 2017, 12:00 AM, Institute for Computational Engineering and Sciences (ICES), The University of Texas Austin
Definition at line 103 of file pm_complexMinMax.F90.