Generate and return the result of the lexicographic comparison of two input objects of the same type, kind, and rank using the >=
operator.
For more information about the lexicographic comparisons defined in this generic procedure, in particular, in the context of complex
and logical
arrays, see the detailed description of pm_arrayCompareLex.
 Parameters

[in]  array1  : 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
integer of kind any supported by the processor (e.g., IK, IK8, IK16, IK32, or IK64) or,

type
logical of kind any supported by the processor (e.g., LK) 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,
or,

a scalar assumedlength
character of kind any supported by the processor (e.g., SK, SKA, SKD , or SKU),
whose contents will be lexicographically compared with the contents of array2 . 
[in]  array2  : The input of the same type, kind, and rank as array1 . 
 Returns
compares
: The output scalar of type logical
of default kind LK containing the result of the lexical comparison of the values of the two input objects.
Possible calling interfaces ⛓
logical(LK) :: compares
compares = array1 .lge. array2
This module contains procedures and generic interfaces for performing lexicographic comparisons of tw...
This module defines the relevant Fortran kind typeparameters frequently used in the ParaMonte librar...
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
 See also
 operator(.llt.)
operator(.lle.)
operator(.lge.)
operator(.lgt.)
Example usage ⛓
14 type(display_type) :: disp
19 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
20 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
21 call disp%show(
"! Lexically compare two scalar strings with the `< ` operator.")
22 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
23 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
26 call disp%show(
"SK_'ParaMonte' .lge. SK_'ParaMonte'")
27 call disp%show( SK_
'ParaMonte' .lge. SK_
'ParaMonte' )
30 call disp%show(
"SK_'ParaMonte' .lge. SK_'Paramonte'")
31 call disp%show( SK_
'ParaMonte' .lge. SK_
'Paramonte' )
34 call disp%show(
"SK_'ParaMonte' .lge. SK_'ParaMonteX'")
35 call disp%show( SK_
'ParaMonte' .lge. SK_
'ParaMonteX' )
38 call disp%show(
"SK_'ParaMonteX' .lge. SK_'ParaMonte'")
39 call disp%show( SK_
'ParaMonteX' .lge. SK_
'ParaMonte' )
42 call disp%show(
"SK_'ParaMonte' .lge. SK_'ParaMonte ' ! Compare with the Fortran intrinsic lexical comparison below.")
43 call disp%show( SK_
'ParaMonte' .lge. SK_
'ParaMonte ' )
46 call disp%show(
"SK_'ParaMonte' >= SK_'ParaMonte ' ! Compare with the lexical comparison above.")
47 call disp%show( SK_
'ParaMonte' >= SK_
'ParaMonte ' )
50 call disp%show(
"SK_'ParaMonte ' .lge. SK_'ParaMonte' ! Compare with the Fortran intrinsic lexical comparison below.")
51 call disp%show( SK_
'ParaMonte ' .lge. SK_
'ParaMonte' )
54 call disp%show(
"SK_'ParaMonte ' >= SK_'ParaMonte' ! Compare with the lexical comparison above.")
55 call disp%show( SK_
'ParaMonte ' >= SK_
'ParaMonte' )
59 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
60 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
61 call disp%show(
"! Lexically compare two vector of logical with the `< ` operator.")
62 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
63 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
66 call disp%show(
"[.false._LK] .lge. [.false._LK]")
67 call disp%show( [
.false._LK] .lge. [
.false._LK] )
70 call disp%show(
"[.false._LK] .lge. [.true._LK]")
71 call disp%show( [
.false._LK] .lge. [
.true._LK] )
74 call disp%show(
"[.true._LK] .lge. [.false._LK]")
75 call disp%show( [
.true._LK] .lge. [
.false._LK] )
78 call disp%show(
"[.true._LK] .lge. [.true._LK]")
79 call disp%show( [
.true._LK] .lge. [
.true._LK] )
82 call disp%show(
"[.true._LK] .lge. [.true._LK, .true._LK]")
83 call disp%show( [
.true._LK] .lge. [
.true._LK,
.true._LK] )
86 call disp%show(
"[.true._LK] .lge. [.false._LK, .true._LK]")
87 call disp%show( [
.true._LK] .lge. [
.false._LK,
.true._LK] )
90 call disp%show(
"[.true._LK, .true._LK] .lge. [.true._LK, .true._LK]")
91 call disp%show( [
.true._LK,
.true._LK] .lge. [
.true._LK,
.true._LK] )
94 call disp%show(
"[.true._LK, .false._LK] .lge. [.true._LK, .true._LK]")
95 call disp%show( [
.true._LK,
.false._LK] .lge. [
.true._LK,
.true._LK] )
98 call disp%show(
"[.true._LK, .true._LK] .lge. [.true._LK, .false._LK]")
99 call disp%show( [
.true._LK,
.true._LK] .lge. [
.true._LK,
.false._LK] )
103 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
104 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
105 call disp%show(
"! Lexically compare two vector of integer with the `< ` operator.")
106 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
107 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
110 call disp%show(
"[+0_IK] .lge. [1_IK]")
111 call disp%show( [
+0_IK] .lge. [
1_IK] )
114 call disp%show(
"[+0_IK] .lge. [+0_IK]")
115 call disp%show( [
+0_IK] .lge. [
+0_IK] )
118 call disp%show(
"[+0_IK] .lge. [+1_IK]")
119 call disp%show( [
+0_IK] .lge. [
+1_IK] )
122 call disp%show(
"[+0_IK] .lge. [+0_IK, 1_IK]")
123 call disp%show( [
+0_IK] .lge. [
+0_IK,
1_IK] )
126 call disp%show(
"[+0_IK] .lge. [+0_IK, +0_IK]")
127 call disp%show( [
+0_IK] .lge. [
+0_IK,
+0_IK] )
130 call disp%show(
"[+0_IK] .lge. [+0_IK, +1_IK]")
131 call disp%show( [
+0_IK] .lge. [
+0_IK,
+1_IK] )
134 call disp%show(
"[+0_IK, +0_IK] .lge. [1_IK, 1_IK]")
135 call disp%show( [
+0_IK,
+0_IK] .lge. [
1_IK,
1_IK] )
138 call disp%show(
"[+0_IK, +0_IK] .lge. [1_IK, +0_IK]")
139 call disp%show( [
+0_IK,
+0_IK] .lge. [
1_IK,
+0_IK] )
142 call disp%show(
"[+0_IK, +0_IK] .lge. [1_IK, +1_IK]")
143 call disp%show( [
+0_IK,
+0_IK] .lge. [
1_IK,
+1_IK] )
146 call disp%show(
"[+0_IK, +0_IK] .lge. [+0_IK, 1_IK]")
147 call disp%show( [
+0_IK,
+0_IK] .lge. [
+0_IK,
1_IK] )
150 call disp%show(
"[+0_IK, +0_IK] .lge. [+0_IK, +0_IK]")
151 call disp%show( [
+0_IK,
+0_IK] .lge. [
+0_IK,
+0_IK] )
154 call disp%show(
"[+0_IK, +0_IK] .lge. [+0_IK, +1_IK]")
155 call disp%show( [
+0_IK,
+0_IK] .lge. [
+0_IK,
+1_IK] )
158 call disp%show(
"[+0_IK, +0_IK] .lge. [+1_IK, 1_IK]")
159 call disp%show( [
+0_IK,
+0_IK] .lge. [
+1_IK,
1_IK] )
162 call disp%show(
"[+0_IK, +0_IK] .lge. [+1_IK, +0_IK]")
163 call disp%show( [
+0_IK,
+0_IK] .lge. [
+1_IK,
+0_IK] )
166 call disp%show(
"[+0_IK, +0_IK] .lge. [+1_IK, +1_IK]")
167 call disp%show( [
+0_IK,
+0_IK] .lge. [
+1_IK,
+1_IK] )
171 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
172 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
173 call disp%show(
"! Lexically compare two vector of real with the `< ` operator.")
174 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
175 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
178 call disp%show(
"[+0._RK] .lge. [1._RK]")
179 call disp%show( [
+0._RK] .lge. [
1._RK] )
182 call disp%show(
"[+0._RK] .lge. [+0._RK]")
183 call disp%show( [
+0._RK] .lge. [
+0._RK] )
186 call disp%show(
"[+0._RK] .lge. [+1._RK]")
187 call disp%show( [
+0._RK] .lge. [
+1._RK] )
190 call disp%show(
"[+0._RK] .lge. [+0._RK, 1._RK]")
191 call disp%show( [
+0._RK] .lge. [
+0._RK,
1._RK] )
194 call disp%show(
"[+0._RK] .lge. [+0._RK, +0._RK]")
195 call disp%show( [
+0._RK] .lge. [
+0._RK,
+0._RK] )
198 call disp%show(
"[+0._RK] .lge. [+0._RK, +1._RK]")
199 call disp%show( [
+0._RK] .lge. [
+0._RK,
+1._RK] )
202 call disp%show(
"[+0._RK, +0._RK] .lge. [1._RK, 1._RK]")
203 call disp%show( [
+0._RK,
+0._RK] .lge. [
1._RK,
1._RK] )
206 call disp%show(
"[+0._RK, +0._RK] .lge. [1._RK, +0._RK]")
207 call disp%show( [
+0._RK,
+0._RK] .lge. [
1._RK,
+0._RK] )
210 call disp%show(
"[+0._RK, +0._RK] .lge. [1._RK, +1._RK]")
211 call disp%show( [
+0._RK,
+0._RK] .lge. [
1._RK,
+1._RK] )
214 call disp%show(
"[+0._RK, +0._RK] .lge. [+0._RK, 1._RK]")
215 call disp%show( [
+0._RK,
+0._RK] .lge. [
+0._RK,
1._RK] )
218 call disp%show(
"[+0._RK, +0._RK] .lge. [+0._RK, +0._RK]")
219 call disp%show( [
+0._RK,
+0._RK] .lge. [
+0._RK,
+0._RK] )
222 call disp%show(
"[+0._RK, +0._RK] .lge. [+0._RK, +1._RK]")
223 call disp%show( [
+0._RK,
+0._RK] .lge. [
+0._RK,
+1._RK] )
226 call disp%show(
"[+0._RK, +0._RK] .lge. [+1._RK, 1._RK]")
227 call disp%show( [
+0._RK,
+0._RK] .lge. [
+1._RK,
1._RK] )
230 call disp%show(
"[+0._RK, +0._RK] .lge. [+1._RK, +0._RK]")
231 call disp%show( [
+0._RK,
+0._RK] .lge. [
+1._RK,
+0._RK] )
234 call disp%show(
"[+0._RK, +0._RK] .lge. [+1._RK, +1._RK]")
235 call disp%show( [
+0._RK,
+0._RK] .lge. [
+1._RK,
+1._RK] )
239 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
240 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
241 call disp%show(
"! Lexically compare two vector of integer with the `< ` operator.")
242 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
243 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
246 call disp%show(
"[(+0._RK, +0._RK)] .lge. [(1._RK, 1._RK)]")
247 call disp%show( [(
+0._RK,
+0._RK)] .lge. [(
1._RK,
1._RK)] )
250 call disp%show(
"[(+0._RK, +0._RK)] .lge. [(1._RK, +1._RK)]")
251 call disp%show( [(
+0._RK,
+0._RK)] .lge. [(
1._RK,
+1._RK)] )
254 call disp%show(
"[(+0._RK, +0._RK)] .lge. [(+0._RK, +0._RK)]")
255 call disp%show( [(
+0._RK,
+0._RK)] .lge. [(
+0._RK,
+0._RK)] )
258 call disp%show(
"[(+0._RK, +0._RK)] .lge. [(+1._RK, +1._RK)]")
259 call disp%show( [(
+0._RK,
+0._RK)] .lge. [(
+1._RK,
+1._RK)] )
262 call disp%show(
"[(+0._RK, +0._RK)] .lge. [(+1._RK, 1._RK)]")
263 call disp%show( [(
+0._RK,
+0._RK)] .lge. [(
+1._RK,
1._RK)] )
266 call disp%show(
"[(+0._RK, +0._RK)] .lge. [(+0._RK, +1._RK), (1._RK, 1._RK)]")
267 call disp%show( [(
+0._RK,
+0._RK)] .lge. [(
+0._RK,
+1._RK), (
1._RK,
1._RK)] )
270 call disp%show(
"[(+0._RK, +0._RK), (+0._RK, +0._RK)] .lge. [(+0._RK, +0._RK), (1._RK, 1._RK)]")
271 call disp%show( [(
+0._RK,
+0._RK), (
+0._RK,
+0._RK)] .lge. [(
+0._RK,
+0._RK), (
1._RK,
1._RK)] )
274 call disp%show(
"[(+0._RK, +0._RK), (+0._RK, +0._RK)] .lge. [(+0._RK, +0._RK), (+0._RK, 1._RK)]")
275 call disp%show( [(
+0._RK,
+0._RK), (
+0._RK,
+0._RK)] .lge. [(
+0._RK,
+0._RK), (
+0._RK,
1._RK)] )
278 call disp%show(
"[(+0._RK, +0._RK), (+0._RK, +0._RK)] .lge. [(+0._RK, +0._RK), (+0._RK, +1._RK)]")
279 call disp%show( [(
+0._RK,
+0._RK), (
+0._RK,
+0._RK)] .lge. [(
+0._RK,
+0._RK), (
+0._RK,
+1._RK)] )
282 call disp%show(
"[(+0._RK, +0._RK), (+0._RK, +0._RK)] .lge. [(+0._RK, +0._RK), (+1._RK, +1._RK)]")
283 call disp%show( [(
+0._RK,
+0._RK), (
+0._RK,
+0._RK)] .lge. [(
+0._RK,
+0._RK), (
+1._RK,
+1._RK)] )
Return a uniform random scalar or contiguous array of arbitrary rank of randomly uniformly distribute...
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.
integer, parameter RK
The default real kind in the ParaMonte library: real64 in Fortran, c_double in CFortran Interoperati...
integer, parameter CK
The default complex kind in the ParaMonte library: real64 in Fortran, c_double_complex in CFortran I...
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in CFortran Interoper...
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in CFortran Intero...
Generate and return an object of type display_type.
Example Unix compile command via Intel ifort
compiler ⛓
3ifort fpp standardsemantics 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 /standardsemantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran cpp ffreelinelengthnone O3 Wl,rpath,../../../lib I../../../inc main.F90 ../../../lib/libparamonte* o main.exe
Example output ⛓
8SK_
'ParaMonte' .lge. SK_
'ParaMonte'
11SK_
'ParaMonte' .lge. SK_
'Paramonte'
14SK_
'ParaMonte' .lge. SK_
'ParaMonteX'
17SK_
'ParaMonteX' .lge. SK_
'ParaMonte'
20SK_
'ParaMonte' .lge. SK_
'ParaMonte '
23SK_
'ParaMonte' >= SK_
'ParaMonte '
26SK_
'ParaMonte ' .lge. SK_
'ParaMonte'
29SK_
'ParaMonte ' >= SK_
'ParaMonte'
39[
.false._LK] .lge. [
.false._LK]
42[
.false._LK] .lge. [
.true._LK]
45[
.true._LK] .lge. [
.false._LK]
48[
.true._LK] .lge. [
.true._LK]
51[
.true._LK] .lge. [
.true._LK,
.true._LK]
54[
.true._LK] .lge. [
.false._LK,
.true._LK]
57[
.true._LK,
.true._LK] .lge. [
.true._LK,
.true._LK]
60[
.true._LK,
.false._LK] .lge. [
.true._LK,
.true._LK]
63[
.true._LK,
.true._LK] .lge. [
.true._LK,
.false._LK]
82[
+0_IK] .lge. [
+0_IK,
1_IK]
85[
+0_IK] .lge. [
+0_IK,
+0_IK]
88[
+0_IK] .lge. [
+0_IK,
+1_IK]
91[
+0_IK,
+0_IK] .lge. [
1_IK,
1_IK]
94[
+0_IK,
+0_IK] .lge. [
1_IK,
+0_IK]
97[
+0_IK,
+0_IK] .lge. [
1_IK,
+1_IK]
100[
+0_IK,
+0_IK] .lge. [
+0_IK,
1_IK]
103[
+0_IK,
+0_IK] .lge. [
+0_IK,
+0_IK]
106[
+0_IK,
+0_IK] .lge. [
+0_IK,
+1_IK]
109[
+0_IK,
+0_IK] .lge. [
+1_IK,
1_IK]
112[
+0_IK,
+0_IK] .lge. [
+1_IK,
+0_IK]
115[
+0_IK,
+0_IK] .lge. [
+1_IK,
+1_IK]
125[
+0._RK] .lge. [
1._RK]
128[
+0._RK] .lge. [
+0._RK]
131[
+0._RK] .lge. [
+1._RK]
134[
+0._RK] .lge. [
+0._RK,
1._RK]
137[
+0._RK] .lge. [
+0._RK,
+0._RK]
140[
+0._RK] .lge. [
+0._RK,
+1._RK]
143[
+0._RK,
+0._RK] .lge. [
1._RK,
1._RK]
146[
+0._RK,
+0._RK] .lge. [
1._RK,
+0._RK]
149[
+0._RK,
+0._RK] .lge. [
1._RK,
+1._RK]
152[
+0._RK,
+0._RK] .lge. [
+0._RK,
1._RK]
155[
+0._RK,
+0._RK] .lge. [
+0._RK,
+0._RK]
158[
+0._RK,
+0._RK] .lge. [
+0._RK,
+1._RK]
161[
+0._RK,
+0._RK] .lge. [
+1._RK,
1._RK]
164[
+0._RK,
+0._RK] .lge. [
+1._RK,
+0._RK]
167[
+0._RK,
+0._RK] .lge. [
+1._RK,
+1._RK]
177[(
+0._RK,
+0._RK)] .lge. [(
1._RK,
1._RK)]
180[(
+0._RK,
+0._RK)] .lge. [(
1._RK,
+1._RK)]
183[(
+0._RK,
+0._RK)] .lge. [(
+0._RK,
+0._RK)]
186[(
+0._RK,
+0._RK)] .lge. [(
+1._RK,
+1._RK)]
189[(
+0._RK,
+0._RK)] .lge. [(
+1._RK,
1._RK)]
192[(
+0._RK,
+0._RK)] .lge. [(
+0._RK,
+1._RK), (
1._RK,
1._RK)]
195[(
+0._RK,
+0._RK), (
+0._RK,
+0._RK)] .lge. [(
+0._RK,
+0._RK), (
1._RK,
1._RK)]
198[(
+0._RK,
+0._RK), (
+0._RK,
+0._RK)] .lge. [(
+0._RK,
+0._RK), (
+0._RK,
1._RK)]
201[(
+0._RK,
+0._RK), (
+0._RK,
+0._RK)] .lge. [(
+0._RK,
+0._RK), (
+0._RK,
+1._RK)]
204[(
+0._RK,
+0._RK), (
+0._RK,
+0._RK)] .lge. [(
+0._RK,
+0._RK), (
+1._RK,
+1._RK)]
 Test:
 test_pm_arrayCompareLex
 Todo:
 Very Low Priority: The functionality of this generic interface should be extended to input container arguments, also to arrays of higher ranks.
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 at Austin
Definition at line 1039 of file pm_arrayCompareLex.F90.