diff --git a/operators.R b/operators.R new file mode 100644 index 0000000000000000000000000000000000000000..0554065ef317983cf90ffba3a7da84a8b0c685df --- /dev/null +++ b/operators.R @@ -0,0 +1,23 @@ +source("harness.R") + +dd <- function() {as.integer(runif(10^s, 1, 100))} + +for (s in 4:sm) { + a <- list(dd(), dd(), dd(), dd(), dd(), dd(), dd(), dd(), dd(), dd()) + x <- dd() + dim(x) <- c(length(x),1) + attr(a, "row.names") <- 1:length(a[[1]]) + class(a) <- "data.frame" + + for (r in 1:5) { + timing <- system.time({ + m <- matrix(data=as.numeric(NA), ncol=1, nrow=ncol(a)) + for(i in 1:ncol(a)){ + m[i,]<-t(colSums(a[,i]*x)/sum(a[,i])) + } + print(m) + })[[3]] + log.result("operators", sys, conf, s, r, timing) + clearResultRecycler() + } +} \ No newline at end of file