search for: find_interv_vec

Displaying 6 results from an estimated 6 matches for "find_interv_vec".

2011 Apr 04
2
General binary search?
...t<https://stat.ethz.ch/pipermail/r-help/2008-September/174584.html>: though its documentation says it runs in O(n * log(N)), it actually runs in O(n * log(N) + N), which is quite noticeable for largish N. But that is easy enough to work around by writing a variant of findInterval which calls find_interv_vec without checking. -s PS Yes, binary search is a one-liner in R, but I always prefer to use standard, fast native libraries when possible.... binarysearch <- function(val,tab,L,H) {while (H>=L) { M=L+(H-L) %/% 2; if (tab[M]>val) H<-M-1 else if (tab[M]<val) L<-M+1 els...
2008 Sep 22
1
findInterval(), binary search, log(N) complexity
Dear R users, the help for findInterval(x,vec) suggests a logarithmic dependence on N (=length(vec)), which would imply a binary search type algorithm. However, when I "test" this hypothesis, in the following manner: set.seed(-3645); l <- vector(); N.seq <- c(5000, 500000, 1000000, 10000000, 50000000);k <- 1 for (N in N.seq){ tmp <- sort(round(stats::rt(N, df=2), 2));
2007 Jan 30
1
Solaris 10 compilation issue
...optimize.o rcont2 random.o R_pretty0 engine.o setulb optim.o Rf_qcauchy arithmetic.o UsingReadline platform.o Rf_pwilcox arithmetic.o find_interv_vec registration.o Rf_qnchisq arithmetic.o Rf_qnbinom arithmetic.o Rf_rcauchy random.o Rf_trigamma arithmetic.o massdist registration.o pcre_info...
2007 Jan 30
1
Difficulty with compiling R-2.4.1 on solaris 10
...optimize.o rcont2 random.o R_pretty0 engine.o setulb optim.o Rf_qcauchy arithmetic.o UsingReadline platform.o Rf_pwilcox arithmetic.o find_interv_vec registration.o Rf_qnchisq arithmetic.o Rf_qnbinom arithmetic.o Rf_rcauchy random.o Rf_trigamma arithmetic.o massdist registration.o pcre_info...
2007 Jan 30
0
R Compiling issue
...gistration.o lowess registration.o machar platform.o ptr_R_loadhistory ../unix/libunix.a(stubs.o) Rf_pnchisq arithmetic.o Rf_pnbinom arithmetic.o optif9 optimize.o rcont2 random.o R_pretty0 engine.o setulb optim.o Rf_qcauchy arithmetic.o UsingReadline platform.o Rf_pwilcox arithmetic.o find_interv_vec registration.o Rf_qnchisq arithmetic.o Rf_qnbinom arithmetic.o Rf_rcauchy random.o Rf_trigamma arithmetic.o massdist registration.o pcre_info pcre.o pcre_exec character.o Rf_beta arithmetic.o Rf_dexp arithmetic.o Rf_pexp arithmetic.o Rf_qexp arithmetic.o Rf_rexp random.o Rf_sign arithm...
2007 Jan 30
0
Issue with compiling R on solaris 10
...optimize.o rcont2 random.o R_pretty0 engine.o setulb optim.o Rf_qcauchy arithmetic.o UsingReadline platform.o Rf_pwilcox arithmetic.o find_interv_vec registration.o Rf_qnchisq arithmetic.o Rf_qnbinom arithmetic.o Rf_rcauchy random.o Rf_trigamma arithmetic.o massdist registration.o pcre_info...