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(
-2.00000000,
+2.00000000), (
-4.00000000,
+4.00000000)
8(
-4.00000000,
+2.00000000)
10array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
12(
-4.00000000,
+1.39551711), (
-4.51397514,
+1.09302711), (
-4.00000000,
+2.94664478), (
-4.00000000,
-2.05127311)
14(
-4.00000000,
+1.39551711), (
-4.51397514,
+1.09302711), (
-4.00000000,
+2.94664478), (
-4.00000000,
-2.05127311)
20(
-9.00000000,
-3.00000000), (
-2.00000000,
-3.00000000)
22(
-9.00000000,
-3.00000000)
24array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
26(
-2.00000000,
-3.00000000), (
-3.10982919,
-5.29856014), (
-6.77618980,
-3.00000000)
28(
-2.00000000,
-3.00000000), (
-3.10982919,
-5.29856014), (
-6.77618980,
-3.00000000)
34(
-2.00000000,
-8.00000000), (
-8.00000000,
-2.00000000)
36(
-8.00000000,
-8.00000000)
38array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
40(
-8.00000000,
-2.16555667), (
-8.00000000,
-8.11646080), (
-8.00000000,
-3.11470985)
42(
-8.00000000,
-2.16555667), (
-8.00000000,
-8.11646080), (
-8.00000000,
-3.11470985)
48(
-8.00000000,
+5.00000000), (
+7.00000000,
+4.00000000)
50(
-8.00000000,
+4.00000000)
52array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
54(
+6.04376030,
+0.580659866), (
-0.119367599,
+1.39978147), (
-2.62679863,
+3.88327885), (
-7.74138021,
+4.00000000), (
+7.00000000,
-5.93101788)
56(
+6.04376030,
+0.580659866), (
-0.119367599,
+1.39978147), (
-2.62679863,
+3.88327885), (
-7.74138021,
+4.00000000), (
+7.00000000,
-5.93101788)
62(
+2.00000000,
-3.00000000), (
+7.00000000,
+4.00000000)
64(
+2.00000000,
-3.00000000)
66array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
68(
-2.77536774,
+4.00000000), (
-1.18967342,
+3.65522671), (
-6.63766098,
-3.69844627), (
+2.96300602,
+4.00000000)
70(
-2.77536774,
+4.00000000), (
-1.18967342,
+3.65522671), (
-6.63766098,
-3.69844627), (
+2.96300602,
+4.00000000)
77(
+2.0000000000000000,
+4.0000000000000000), (
-1.0000000000000000,
+0.0000000000000000)
79(
-1.0000000000000000,
+0.0000000000000000)
81array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
83(
-8.2974631564795409,
-7.0255530247125222), (
-1.0000000000000000,
+0.0000000000000000), (
-1.0000000000000000,
-5.4242595093821677)
85(
-8.2974631564795409,
-7.0255530247125222), (
-1.0000000000000000,
+0.0000000000000000), (
-1.0000000000000000,
-5.4242595093821677)
91(
+4.0000000000000000,
-7.0000000000000000), (
+8.0000000000000000,
-2.0000000000000000)
93(
+4.0000000000000000,
-7.0000000000000000)
95array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
97(
-0.76605493399717339,
-4.8660450262730297), (
+3.3785022794035204,
-2.0000000000000000), (
-6.0140433980219701,
-2.6255875251885503), (
-5.0344649629259060,
-2.0000000000000000), (
+8.0000000000000000,
-2.0000000000000000)
99(
-0.76605493399717339,
-4.8660450262730297), (
+3.3785022794035204,
-2.0000000000000000), (
-6.0140433980219701,
-2.6255875251885503), (
-5.0344649629259060,
-2.0000000000000000), (
+8.0000000000000000,
-2.0000000000000000)
105(
-5.0000000000000000,
+4.0000000000000000), (
+8.0000000000000000,
+7.0000000000000000)
107(
-5.0000000000000000,
+4.0000000000000000)
109array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
111(
-2.3791671447930636,
+2.5699041814127437), (
+2.6984747029690284,
-0.47575660228585726)
113(
-2.3791671447930636,
+2.5699041814127437), (
+2.6984747029690284,
-0.47575660228585726)
119(
-4.0000000000000000,
+1.0000000000000000), (
-2.0000000000000000,
-3.0000000000000000)
121(
-4.0000000000000000,
-3.0000000000000000)
123array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
125(
-8.1236791206453880,
-6.2370594158625678), (
-2.0000000000000000,
-3.3270519230458824), (
-7.5315542643841376,
-8.2514717691556747), (
-2.0000000000000000,
-7.4829975580787753)
127(
-8.1236791206453880,
-6.2370594158625678), (
-2.0000000000000000,
-3.3270519230458824), (
-7.5315542643841376,
-8.2514717691556747), (
-2.0000000000000000,
-7.4829975580787753)
133(
-8.0000000000000000,
+3.0000000000000000), (
+1.0000000000000000,
+1.0000000000000000)
135(
-8.0000000000000000,
+1.0000000000000000)
137array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
139(
+0.80670771469196012,
-1.8864314178908845), (
+1.0000000000000000,
-6.7677855815529355), (
-1.9181420700275553,
+1.0000000000000000), (
-1.1346125985513194,
-8.3810608565567861)
141(
+0.80670771469196012,
-1.8864314178908845), (
+1.0000000000000000,
-6.7677855815529355), (
-1.9181420700275553,
+1.0000000000000000), (
-1.1346125985513194,
-8.3810608565567861)
148(
+7.00000000000000000000000000000000000,
+0.00000000000000000000000000000000000), (
+4.00000000000000000000000000000000000,
+0.00000000000000000000000000000000000)
150(
+4.00000000000000000000000000000000000,
+0.00000000000000000000000000000000000)
152array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
154(
+1.91537702215694979588996173962362058,
-2.98768063772100521859141453563268657), (
+1.09576564299457061480910897598804908,
+0.00000000000000000000000000000000000), (
+4.00000000000000000000000000000000000,
+0.00000000000000000000000000000000000), (
-6.63911597321813016161642172591224161,
+0.00000000000000000000000000000000000)
156(
+1.91537702215694979588996173962362058,
-2.98768063772100521859141453563268657), (
+1.09576564299457061480910897598804908,
+0.00000000000000000000000000000000000), (
+4.00000000000000000000000000000000000,
+0.00000000000000000000000000000000000), (
-6.63911597321813016161642172591224161,
+0.00000000000000000000000000000000000)
162(
+3.00000000000000000000000000000000000,
-3.00000000000000000000000000000000000), (
+6.00000000000000000000000000000000000,
+2.00000000000000000000000000000000000)
164(
+3.00000000000000000000000000000000000,
-3.00000000000000000000000000000000000)
166array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
168(
-3.70222268177764928791582663950773379,
-1.41072614509827757782919285937577928), (
-2.67955682004846624792983067629255724,
-0.776283927368696000508241838688576264), (
-6.70637009316095733542849218620799783,
-7.52752922425246216586838497827814395), (
-5.47868160118563739244376157308980797,
-2.75257019008290958955564428576742978)
170(
-3.70222268177764928791582663950773379,
-1.41072614509827757782919285937577928), (
-2.67955682004846624792983067629255724,
-0.776283927368696000508241838688576264), (
-6.70637009316095733542849218620799783,
-7.52752922425246216586838497827814395), (
-5.47868160118563739244376157308980797,
-2.75257019008290958955564428576742978)
176(
-1.00000000000000000000000000000000000,
+3.00000000000000000000000000000000000), (
-1.00000000000000000000000000000000000,
+6.00000000000000000000000000000000000)
178(
-1.00000000000000000000000000000000000,
+3.00000000000000000000000000000000000)
180array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
182(
-1.00000000000000000000000000000000000,
-0.525567654346852204913162236219754708), (
-1.87291957658069798879118452444385672,
-8.17233261266536770126050120758013935), (
-3.84292443880597405216266777352896325,
-1.33822838488345677788271045724538878), (
-1.00000000000000000000000000000000000,
+6.00000000000000000000000000000000000), (
-1.00000000000000000000000000000000000,
+5.14861107270589691875163942498473935)
184(
-1.00000000000000000000000000000000000,
-0.525567654346852204913162236219754708), (
-1.87291957658069798879118452444385672,
-8.17233261266536770126050120758013935), (
-3.84292443880597405216266777352896325,
-1.33822838488345677788271045724538878), (
-1.00000000000000000000000000000000000,
+6.00000000000000000000000000000000000), (
-1.00000000000000000000000000000000000,
+5.14861107270589691875163942498473935)
190(
+5.00000000000000000000000000000000000,
+8.00000000000000000000000000000000000), (
+6.00000000000000000000000000000000000,
+0.00000000000000000000000000000000000)
192(
+5.00000000000000000000000000000000000,
+0.00000000000000000000000000000000000)
194array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
196(
+4.50125858706431435786956306720494674,
+0.00000000000000000000000000000000000), (
+1.73637803891347130899986731920464290,
+0.00000000000000000000000000000000000), (
-0.926029873540508842901954374198725265,
+0.00000000000000000000000000000000000)
198(
+4.50125858706431435786956306720494674,
+0.00000000000000000000000000000000000), (
+1.73637803891347130899986731920464290,
+0.00000000000000000000000000000000000), (
-0.926029873540508842901954374198725265,
+0.00000000000000000000000000000000000)
204(
+7.00000000000000000000000000000000000,
-6.00000000000000000000000000000000000), (
-1.00000000000000000000000000000000000,
-2.00000000000000000000000000000000000)
206(
-1.00000000000000000000000000000000000,
-6.00000000000000000000000000000000000)
208array1
= getUnifRand((
-9._CKG,
-9._CKG), (
+9._CKG,
+9._CKG), lenarr)
210(
-1.00000000000000000000000000000000000,
-2.00000000000000000000000000000000000), (
-1.00000000000000000000000000000000000,
-2.00000000000000000000000000000000000), (
-4.52429372503346217994802188129103543,
-2.00000000000000000000000000000000000)
212(
-1.00000000000000000000000000000000000,
-2.00000000000000000000000000000000000), (
-1.00000000000000000000000000000000000,
-2.00000000000000000000000000000000000), (
-4.52429372503346217994802188129103543,
-2.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.