Select a single (or multiple) element(s) from the input array of intrinsic type of arbitrary kind randomly uniformly or optionally according to the specified Probability Mass Function (PMF) of the input array
.
More...
Select a single (or multiple) element(s) from the input array of intrinsic type of arbitrary kind randomly uniformly or optionally according to the specified Probability Mass Function (PMF) of the input array
.
- Parameters
-
[in] | array | : The input contiguous array of non-zero size of shape (:) 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 of,
-
type
character of kind any supported by the processor (e.g., SK, SKA, SKD , or SKU) of non-zero length,
-
type
integer of kind any supported by the processor (e.g., IK, IK8, IK16, IK32, or IK64) of non-zero value,
whose element(s) will be selected randomly and returned in the output choice .
The input array must be of non-zero length or size (unless it is a scalar non-negative integer of arbitrary kind).
|
[in] | s1 | : The input non-negative scalar integer of default kind IK, representing the number of output choices (i.e., elements selected from the input array ).
(optional. If missing, the output is a scalar (of rank 0 ).) |
[in] | unique | : The input scalar logical of default kind LK.
If .true. , the elements of the output choice will be uniquely selected from the input array .
(optional, default = .false._LK . It can be present if and only if the input argument s1 is also present.) |
- Returns
choice
: The output object of the same type and kind as the input array
whose value is randomly selected from the elements of array
.
-
It is a scalar (of rank
0
, or a scalar character
of length 1
) if the input argument s1
is missing.
-
It is an array of size
s1
(or a scalar character
of length s1
) if the input argument s1
is present.
Possible calling interfaces ⛓
choice(
1:s1)
= getChoice(array, s1, unique
= unique)
Select a single (or multiple) element(s) from the input array of intrinsic type of arbitrary kind ran...
This module contains procedures and generic interfaces for selecting uniformly-distributed or arbitra...
- Warning
- The condition
0 < size(array)
for non-character
input array
or 0 < len(array)
for character
input array
must hold.
These conditions are verified only if the library is built with the preprocessor macro CHECK_ENABLED=1
.
- Developer Remark:
- The choice of the input argument name
s1
is deliberate to allow future expansion of the interface to output choice
of higher rank than 1
.
- Warning
- The condition
0 < size(array)
for non-character
input array
or 0 < len(array)
for character
input array
must hold.
The condition 0 < size(choice)
for non-character
input choice
or 0 < len(choice)
for character
input choice
must hold.
The condition len(choice) == len(array)
for an input choice
vector of character
must hold.
These conditions are verified only if the library is built with the preprocessor macro CHECK_ENABLED=1
.
- See also
- isHead
getChange
setChange
getChoice
setChoice
getUnifRand
setUnifRand
getShuffled
setShuffled
getRemapped
setRemapped
Example usage ⛓
15 integer(IK) :: count, itry, ntry
= 10
16 type(display_type) :: disp
20 character(:),
allocatable :: choice, array
24 call disp%show(
"count = getUnifRand(4, 10)")
26 call disp%show(
"array = getUnifRand(repeat('A', count), repeat('Z', count)) ! generate random array for illustration.")
27 array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
29 call disp%show( array, deliml
= SK_
"""" )
30 call disp%show(
"choice = getChoice(array)")
33 call disp%show( choice, deliml
= SK_
"""" )
34 call disp%show(
"count = getUnifRand(1, len(array))")
38 call disp%show(
"choice = getChoice(array, count) ! draw randomly only `count` elements with replacement.")
41 call disp%show( choice, deliml
= SK_
"""" )
42 call disp%show(
"choice = getChoice(array, count, unique = .true._LK) ! draw randomly only `count` elements without replacement.")
43 choice
= getChoice(array, count, unique
= .true._LK)
45 call disp%show( choice, deliml
= SK_
"""" )
51 character(
2),
allocatable :: choice(:), array(:)
55 call disp%show(
"count = getUnifRand(4, 10)")
57 call disp%show(
"array = getUnifRand('AA', 'ZZ', count) ! generate random array for illustration.")
60 call disp%show( array, deliml
= SK_
"""" )
61 call disp%show(
"choice = [getChoice(array)]")
64 call disp%show( choice, deliml
= SK_
"""" )
65 call disp%show(
"count = getUnifRand(1, len(array))")
69 call disp%show(
"choice = getChoice(array, count) ! draw randomly only `count` elements with replacement.")
72 call disp%show( choice, deliml
= SK_
"""" )
73 call disp%show(
"choice = getChoice(array, count, unique = .true._LK) ! draw randomly only `count` elements without replacement.")
74 choice
= getChoice(array, count, unique
= .true._LK)
76 call disp%show( choice, deliml
= SK_
"""" )
82 integer,
allocatable :: choice(:), array(:)
86 call disp%show(
"array = getUnifRand(1, 20, getUnifRand(4, 10)) ! generate random array for illustration.")
90 call disp%show(
"choice = [getChoice(array)]")
94 call disp%show(
"count = getUnifRand(1, size(array))")
98 call disp%show(
"choice = getChoice(array, count) ! draw randomly only `count` elements with replacement.")
102 call disp%show(
"choice = getChoice(array, count, unique = .true._LK) ! draw randomly only `count` elements without replacement.")
103 choice
= getChoice(array, count, unique
= .true._LK)
111 logical,
allocatable :: choice(:), array(:)
115 call disp%show(
"array = getUnifRand(.false., .true., getUnifRand(4, 10)) ! generate random array for illustration.")
119 call disp%show(
"choice = [getChoice(array)]")
123 call disp%show(
"count = getUnifRand(1, size(array))")
127 call disp%show(
"choice = getChoice(array, count) ! draw randomly only `count` elements with replacement.")
131 call disp%show(
"choice = getChoice(array, count, unique = .true._LK) ! draw randomly only `count` elements without replacement.")
132 choice
= getChoice(array, count, unique
= .true._LK)
140 complex,
allocatable :: choice(:), array(:)
144 call disp%show(
"array = getUnifRand((0., 0.), (1., 1.), getUnifRand(4, 10)) ! generate random array for illustration.")
148 call disp%show(
"choice = [getChoice(array)]")
152 call disp%show(
"count = getUnifRand(1, size(array))")
156 call disp%show(
"choice = getChoice(array, count) ! draw randomly only `count` elements with replacement.")
160 call disp%show(
"choice = getChoice(array, count, unique = .true._LK) ! draw randomly only `count` elements without replacement.")
161 choice
= getChoice(array, count, unique
= .true._LK)
169 real,
allocatable :: choice(:), array(:)
173 call disp%show(
"array = getUnifRand(0., 1., getUnifRand(4, 10)) ! generate random array for illustration.")
177 call disp%show(
"choice = [getChoice(array)]")
181 call disp%show(
"count = getUnifRand(1, size(array))")
185 call disp%show(
"choice = getChoice(array, count) ! draw randomly only `count` elements with replacement.")
189 call disp%show(
"choice = getChoice(array, count, unique = .true._LK) ! draw randomly only `count` elements without replacement.")
190 choice
= getChoice(array, count, unique
= .true._LK)
Generate minimally-spaced character, integer, real sequences or sequences at fixed intervals of size ...
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 procedures and generic interfaces for generating ranges of discrete character,...
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 RK
The default real kind in the ParaMonte library: real64 in Fortran, c_double in C-Fortran Interoperati...
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
integer, parameter CK
The default complex kind in the ParaMonte library: real64 in Fortran, c_double_complex in C-Fortran I...
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
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 ⛓
3array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
15choice
= getChoice(array, count, unique
= .true._LK)
20array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
32choice
= getChoice(array, count, unique
= .true._LK)
37array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
49choice
= getChoice(array, count, unique
= .true._LK)
54array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
66choice
= getChoice(array, count, unique
= .true._LK)
71array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
83choice
= getChoice(array, count, unique
= .true._LK)
88array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
100choice
= getChoice(array, count, unique
= .true._LK)
105array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
117choice
= getChoice(array, count, unique
= .true._LK)
122array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
134choice
= getChoice(array, count, unique
= .true._LK)
139array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
151choice
= getChoice(array, count, unique
= .true._LK)
156array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
168choice
= getChoice(array, count, unique
= .true._LK)
175"RH",
"ZA",
"DF",
"NV"
185choice
= getChoice(array, count, unique
= .true._LK)
192"FD",
"CW",
"AL",
"KD"
202choice
= getChoice(array, count, unique
= .true._LK)
209"RP",
"YW",
"EY",
"NH",
"HP",
"VT",
"KR",
"KJ",
"CQ"
219choice
= getChoice(array, count, unique
= .true._LK)
226"OU",
"DX",
"YI",
"EM",
"DX",
"KA"
236choice
= getChoice(array, count, unique
= .true._LK)
243"KZ",
"SQ",
"ZB",
"PF",
"WM",
"BZ",
"GN",
"JU",
"YY",
"XK"
253choice
= getChoice(array, count, unique
= .true._LK)
260"FI",
"AI",
"ZC",
"DJ"
270choice
= getChoice(array, count, unique
= .true._LK)
277"GO",
"US",
"EE",
"WR",
"AI",
"TT",
"CP"
287choice
= getChoice(array, count, unique
= .true._LK)
294"PY",
"HM",
"GK",
"QH",
"ZR",
"MZ"
304choice
= getChoice(array, count, unique
= .true._LK)
311"RP",
"UX",
"SH",
"AT",
"CJ"
321choice
= getChoice(array, count, unique
= .true._LK)
328"OH",
"WX",
"JO",
"GR",
"JI",
"PP",
"XX"
338choice
= getChoice(array, count, unique
= .true._LK)
354choice
= getChoice(array, count, unique
= .true._LK)
360+4,
+5,
+5,
+18,
+12,
+16,
+2
370choice
= getChoice(array, count, unique
= .true._LK)
376+3,
+11,
+5,
+20,
+16,
+4,
+20,
+14,
+6
385+11,
+14,
+14,
+11,
+5,
+3,
+6,
+14
386choice
= getChoice(array, count, unique
= .true._LK)
388+20,
+4,
+11,
+16,
+5,
+20,
+14,
+3
392+18,
+13,
+12,
+4,
+6,
+6,
+8,
+20,
+5
402choice
= getChoice(array, count, unique
= .true._LK)
408+14,
+20,
+1,
+8,
+18,
+17,
+11,
+6
417+20,
+18,
+20,
+18,
+1,
+17,
+20,
+20
418choice
= getChoice(array, count, unique
= .true._LK)
420+8,
+11,
+6,
+17,
+14,
+1,
+20,
+18
424+8,
+19,
+15,
+16,
+2,
+14,
+14
433+14,
+15,
+8,
+2,
+16,
+16,
+14
434choice
= getChoice(array, count, unique
= .true._LK)
436+15,
+2,
+19,
+14,
+14,
+16,
+8
440+18,
+5,
+19,
+14,
+13,
+11
450choice
= getChoice(array, count, unique
= .true._LK)
466choice
= getChoice(array, count, unique
= .true._LK)
482choice
= getChoice(array, count, unique
= .true._LK)
488+18,
+13,
+17,
+9,
+14,
+14,
+17,
+1
498choice
= getChoice(array, count, unique
= .true._LK)
504F, F, F, F, F, F, T, F, F
514choice
= getChoice(array, count, unique
= .true._LK)
530choice
= getChoice(array, count, unique
= .true._LK)
546choice
= getChoice(array, count, unique
= .true._LK)
562choice
= getChoice(array, count, unique
= .true._LK)
578choice
= getChoice(array, count, unique
= .true._LK)
584T, F, F, F, F, T, T, T, F
594choice
= getChoice(array, count, unique
= .true._LK)
600F, F, T, T, F, F, T, F
610choice
= getChoice(array, count, unique
= .true._LK)
626choice
= getChoice(array, count, unique
= .true._LK)
642choice
= getChoice(array, count, unique
= .true._LK)
648F, F, T, F, F, F, T, F, T
658choice
= getChoice(array, count, unique
= .true._LK)
664(
+0.374058187,
+0.885844290), (
+0.814485490,
+0.527484298), (
+0.141393721,
+0.691092193), (
+0.189022243,
+0.869544983)
667(
+0.189022243,
+0.869544983)
673(
+0.814485490,
+0.527484298)
674choice
= getChoice(array, count, unique
= .true._LK)
676(
+0.374058187,
+0.885844290)
680(
+0.740833998,
+0.512922227), (
+0.993209839,
+0.889324725), (
+0.580825150,
+0.791490197), (
+0.657337010,
+0.822503567), (
+0.377134383,
+0.195615947), (
+0.574374259,
+0.243366718), (
+0.986312687,
+0.312448144E-1), (
+0.377138674,
+0.792818904), (
+0.225421607,
+0.698013544)
683(
+0.986312687,
+0.312448144E-1)
689(
+0.574374259,
+0.243366718)
690choice
= getChoice(array, count, unique
= .true._LK)
692(
+0.993209839,
+0.889324725)
696(
+0.749982774,
+0.290094912), (
+0.320613801,
+0.167931437), (
+0.767354965E-1,
+0.518544376), (
+0.747789562,
+0.690199852), (
+0.365580320E-1,
+0.280780554), (
+0.267590582,
+0.185079396), (
+0.290184259,
+0.420109451)
699(
+0.290184259,
+0.420109451)
705(
+0.267590582,
+0.185079396), (
+0.365580320E-1,
+0.280780554), (
+0.365580320E-1,
+0.280780554), (
+0.267590582,
+0.185079396)
706choice
= getChoice(array, count, unique
= .true._LK)
708(
+0.267590582,
+0.185079396), (
+0.320613801,
+0.167931437), (
+0.747789562,
+0.690199852), (
+0.767354965E-1,
+0.518544376)
712(
+0.153354466,
+0.782560170), (
+0.179885149,
+0.287184238), (
+0.517073810,
+0.480103850), (
+0.376599550,
+0.268435717), (
+0.813954473,
+0.489808738), (
+0.134206593,
+0.983388007), (
+0.752331555,
+0.350939393)
715(
+0.517073810,
+0.480103850)
721(
+0.134206593,
+0.983388007), (
+0.179885149,
+0.287184238), (
+0.153354466,
+0.782560170), (
+0.813954473,
+0.489808738), (
+0.813954473,
+0.489808738), (
+0.517073810,
+0.480103850)
722choice
= getChoice(array, count, unique
= .true._LK)
724(
+0.813954473,
+0.489808738), (
+0.134206593,
+0.983388007), (
+0.179885149,
+0.287184238), (
+0.517073810,
+0.480103850), (
+0.376599550,
+0.268435717), (
+0.153354466,
+0.782560170)
728(
+0.219640076,
+0.984458566), (
+0.854711175,
+0.206710041), (
+0.769144773,
+0.496319950), (
+0.297916710,
+0.905627549), (
+0.681777596E-1,
+0.998073220E-1), (
+0.486514270,
+0.461860299E-1), (
+0.587306261,
+0.885457397E-1), (
+0.274841845,
+0.308029294)
731(
+0.274841845,
+0.308029294)
737(
+0.681777596E-1,
+0.998073220E-1), (
+0.297916710,
+0.905627549), (
+0.854711175,
+0.206710041), (
+0.486514270,
+0.461860299E-1), (
+0.297916710,
+0.905627549), (
+0.219640076,
+0.984458566), (
+0.219640076,
+0.984458566)
738choice
= getChoice(array, count, unique
= .true._LK)
740(
+0.769144773,
+0.496319950), (
+0.854711175,
+0.206710041), (
+0.486514270,
+0.461860299E-1), (
+0.587306261,
+0.885457397E-1), (
+0.681777596E-1,
+0.998073220E-1), (
+0.219640076,
+0.984458566), (
+0.274841845,
+0.308029294)
744(
+0.780369520,
+0.665161788), (
+0.467737496,
+0.575511754), (
+0.579532981,
+0.237561762), (
+0.304479957,
+0.450650632), (
+0.430912077,
+0.486155570), (
+0.556580067,
+0.160892963), (
+0.598245382,
+0.570949137)
747(
+0.780369520,
+0.665161788)
753(
+0.430912077,
+0.486155570), (
+0.598245382,
+0.570949137), (
+0.780369520,
+0.665161788), (
+0.467737496,
+0.575511754), (
+0.598245382,
+0.570949137), (
+0.467737496,
+0.575511754), (
+0.579532981,
+0.237561762)
754choice
= getChoice(array, count, unique
= .true._LK)
756(
+0.579532981,
+0.237561762), (
+0.780369520,
+0.665161788), (
+0.430912077,
+0.486155570), (
+0.304479957,
+0.450650632), (
+0.556580067,
+0.160892963), (
+0.598245382,
+0.570949137), (
+0.467737496,
+0.575511754)
760(
+0.382196307E-1,
+0.646403193), (
+0.573816180,
+0.382443428), (
+0.476363957,
+0.862502456), (
+0.468582988,
+0.915745318)
763(
+0.476363957,
+0.862502456)
769(
+0.476363957,
+0.862502456)
770choice
= getChoice(array, count, unique
= .true._LK)
772(
+0.382196307E-1,
+0.646403193)
776(
+0.157265902,
+0.306473672), (
+0.129909217,
+0.819146454), (
+0.560992420,
+0.624239743), (
+0.335772038E-1,
+0.709371448), (
+0.844024599,
+0.130358934), (
+0.144730389,
+0.277943552)
779(
+0.844024599,
+0.130358934)
785(
+0.129909217,
+0.819146454), (
+0.335772038E-1,
+0.709371448), (
+0.335772038E-1,
+0.709371448), (
+0.157265902,
+0.306473672), (
+0.844024599,
+0.130358934)
786choice
= getChoice(array, count, unique
= .true._LK)
788(
+0.844024599,
+0.130358934), (
+0.144730389,
+0.277943552), (
+0.157265902,
+0.306473672), (
+0.129909217,
+0.819146454), (
+0.560992420,
+0.624239743)
792(
+0.860566258,
+0.254181206), (
+0.806035638,
+0.653749287), (
+0.547289848E-3,
+0.895832658), (
+0.174979866,
+0.710737228), (
+0.324550867,
+0.729400098), (
+0.874350131,
+0.763191044), (
+0.470665693E-1,
+0.322290421), (
+0.598706663,
+0.351692140), (
+0.154040694,
+0.221372843E-1), (
+0.400613785,
+0.180302799)
795(
+0.547289848E-3,
+0.895832658)
801(
+0.874350131,
+0.763191044), (
+0.400613785,
+0.180302799), (
+0.860566258,
+0.254181206), (
+0.874350131,
+0.763191044), (
+0.470665693E-1,
+0.322290421)
802choice
= getChoice(array, count, unique
= .true._LK)
804(
+0.400613785,
+0.180302799), (
+0.598706663,
+0.351692140), (
+0.547289848E-3,
+0.895832658), (
+0.324550867,
+0.729400098), (
+0.174979866,
+0.710737228)
808(
+0.940184951,
+0.288660824), (
+0.389396012,
+0.768253326), (
+0.831772089E-1,
+0.584583640), (
+0.892511964,
+0.397785962), (
+0.842156053,
+0.274164438)
811(
+0.940184951,
+0.288660824)
817(
+0.831772089E-1,
+0.584583640), (
+0.842156053,
+0.274164438), (
+0.831772089E-1,
+0.584583640), (
+0.842156053,
+0.274164438)
818choice
= getChoice(array, count, unique
= .true._LK)
820(
+0.389396012,
+0.768253326), (
+0.842156053,
+0.274164438), (
+0.892511964,
+0.397785962), (
+0.831772089E-1,
+0.584583640)
824+0.202305079,
+0.746083915,
+0.998517990,
+0.347499311
834choice
= getChoice(array, count, unique
= .true._LK)
840+0.566712022E-1,
+0.124775052,
+0.718719244,
+0.386690915,
+0.290210545,
+0.142512619,
+0.763249397E-2
849+0.718719244,
+0.763249397E-2,
+0.566712022E-1
850choice
= getChoice(array, count, unique
= .true._LK)
852+0.386690915,
+0.142512619,
+0.763249397E-2
856+0.384990394,
+0.580645442,
+0.205262303,
+0.674935281
865+0.205262303,
+0.580645442,
+0.205262303
866choice
= getChoice(array, count, unique
= .true._LK)
868+0.580645442,
+0.674935281,
+0.384990394
872+0.261852562,
+0.968958497,
+0.151841581,
+0.618396819,
+0.690966845E-2,
+0.945225835
882choice
= getChoice(array, count, unique
= .true._LK)
888+0.825588107,
+0.132828295,
+0.528904259,
+0.123508573E-1,
+0.935625136,
+0.790401340,
+0.721885800,
+0.586476803
897+0.721885800,
+0.586476803,
+0.790401340,
+0.721885800,
+0.825588107,
+0.721885800
898choice
= getChoice(array, count, unique
= .true._LK)
900+0.825588107,
+0.586476803,
+0.123508573E-1,
+0.132828295,
+0.935625136,
+0.790401340
904+0.584203660,
+0.665777922E-1,
+0.716739953,
+0.435676455,
+0.153090060,
+0.651799262,
+0.150417447
913+0.435676455,
+0.716739953,
+0.716739953
914choice
= getChoice(array, count, unique
= .true._LK)
916+0.153090060,
+0.665777922E-1,
+0.716739953
920+0.558369160E-1,
+0.660697043,
+0.608680606,
+0.769476473,
+0.279466391,
+0.578054190,
+0.694419444,
+0.908959746,
+0.384919941,
+0.297638834
930choice
= getChoice(array, count, unique
= .true._LK)
936+0.196701229,
+0.470034361,
+0.984851182,
+0.343784690,
+0.109392703,
+0.776947677,
+0.970441043,
+0.841418386
945+0.841418386,
+0.109392703
946choice
= getChoice(array, count, unique
= .true._LK)
948+0.841418386,
+0.196701229
952+0.158900559,
+0.187494099,
+0.970411181,
+0.268743873,
+0.387034774,
+0.885374844,
+0.592745960
961+0.187494099,
+0.387034774,
+0.970411181,
+0.158900559,
+0.387034774,
+0.592745960
962choice
= getChoice(array, count, unique
= .true._LK)
964+0.268743873,
+0.970411181,
+0.592745960,
+0.187494099,
+0.885374844,
+0.387034774
968+0.415293813,
+0.677642643,
+0.341537535,
+0.665220141,
+0.851708829,
+0.853776336,
+0.155038118,
+0.345826805
977+0.677642643,
+0.677642643,
+0.341537535,
+0.415293813,
+0.155038118,
+0.345826805,
+0.677642643
978choice
= getChoice(array, count, unique
= .true._LK)
980+0.851708829,
+0.853776336,
+0.345826805,
+0.665220141,
+0.155038118,
+0.341537535,
+0.415293813
- Test:
- test_pm_arrayChoice
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, Monday March 6, 2017, 3:22 pm, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin.
Definition at line 137 of file pm_arrayChoice.F90.