Skip a fő tartalomhoz

//ERDDAP/com.cohort.util/ScriptMath2/binaryFindFirstGE

binaryFindFirstGE

[JVM]
open fun binaryFindFirstGE(dar: Array<Double>, x: Double): Int

Find the first element which is >= x in an ascending sorted array.

If firstGE >lastLE, there are no matching elements (because the requested range is less than or greater than all the values, or between two adjacent values).

Return

the index of the first element which is >= x in an ascending sorted array. If x <the smallest element, this returns 0. If x >the largest element, this returns dar.length (no element is appropriate). If x is NaN, this is currently undefined.

Parameters

JVM

daran ascending sorted double[] which currently may not have duplicate values
x