ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation. |
Generate and return the location of the first occurrence of the maximum of the input string(s).
More...
Generate and return the location of the first occurrence of the maximum of the input string(s).
[in] | str | : The input scalar or array of arbitrary rank of type character of kind any supported by the processor (e.g., SK, SKA, SKD , or SKU) of arbitrary len type parameter. |
[in] | mask | : The input vector of type logical of default kind LK of the same length as the len type parameter of the input str .If present, then only those characters of str corresponding to a .true. in mask will be considered to find maxLoc .When mask is present, str must be a scalar (the procedures are non-elemental when mask is present).(optional, default = [(.true., i = 1, len(str))] ) |
[in] | back | : The input scalar of type logical of default kind LK.If present and .true. , then the location of the last element of maximum value in str will be output.(optional, default = .false. ) |
maxLoc
: The output scalar or array of the same shape as the input str
of type integer
of default kind IK containing the location of the first character of maximum value in the input str
.len(str) == 0
on input, then maxLoc = 1_IK
on output, similar to the behavior of the Fortran intrinsic functions minloc
and maxloc
in the Intel Fortran compiler.
Possible calling interfaces ⛓
str
must have non-zero len
type-parameter.mask
vector must equal the length of the input str
.CHECK_ENABLED=1
.pure
procedure(s) documented herein become impure
when the ParaMonte library is compiled with preprocessor macro CHECK_ENABLED=1
.pure
in release
build and impure
in debug
and testing
builds.character
.maxloc
to also accept input scalar string arguments.
Example usage ⛓
ifort
compiler ⛓ ifort
compiler ⛓ gfortran
compiler ⛓
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.
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.
Definition at line 691 of file pm_str.F90.