@twinfinity/geometryFunctionsnthElementnthElement CallablenthElement(indices: Int32Array<ArrayBufferLike>, keys: Float64Array<ArrayBufferLike>, lo: number, hi: number, k: number): voidIn-place quickselect (Floyd-Rivest inspired) to partition indices so that indices[k] holds the element that would be at position k if sorted by keys[]. Everything in [lo..k) <= keys[indices[k]] and everything in (k..hi] >= keys[indices[k]].Parametersindices: Int32Array<ArrayBufferLike>keys: Float64Array<ArrayBufferLike>lo: numberhi: numberk: numberReturns void
In-place quickselect (Floyd-Rivest inspired) to partition indices so that indices[k] holds the element that would be at position k if sorted by keys[]. Everything in [lo..k) <= keys[indices[k]] and everything in (k..hi] >= keys[indices[k]].