R/binary_search.R

Defines functions binary_search

Documented in binary_search

#[export]
binary_search <- function(x, v, index=FALSE) {
	if(index){
  		return (.Call(Rfast_lowerbound,x,v))
	}
	.Call(Rfast_binarysearch,x,v)
}

Try the Rfast package in your browser

Any scripts or data that you put into this service are public.

Rfast documentation built on Nov. 9, 2023, 5:06 p.m.