Note
Function that returns the location of an element in a vector.
Given an array xx(1: n) , and given a value x , it returns a value j such that x is between xx( j ) and xx( j + 1 ).
xx must be monotonic, either increasing or decreasing. j = 0 or j = n is returned to indicate that x is out of range.
The difference with locate is the use of eps for comparisons of reals.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I4), | intent(in) | :: | n |
vector length |
||
real(kind=R8), | intent(in), | dimension(1:n) | :: | xx |
vector |
|
real(kind=R8), | intent(in) | :: | x |
value to locate |
||
real(kind=R8), | intent(in) | :: | eps |
small value for comparisons of reals |