Displaying 1 result from an estimated 1 matches for "noflevel".
Did you mean:
noflevels
2012 Jul 27
1
C code validation
...ckage: lpSolve
> benchmark <- function(x, y) {
+ index <- 0
+ while((index <- index + 1) < length(x)) {
+ x <- setdiff(x, findSubsets(y + 1, x[index], max(x)))
+ }
+ return(x)
+ }
>
> set.seed(12345)
> exprnec <- sort(sample(13:19683, 500))
> noflevels <- rep(2, 9)
> mbase <- rev(c(1, cumprod(rev(noflevels + 1))))[-1]
> foo1 <- benchmark(exprnec, noflevels)
> foo2 <- .Call("removeRedundants", exprnec, noflevels, mbase)
>
> all.equal(foo1, foo2)
[1] "Numeric: lengths (184, 181) differ"
>
>
>...