File diff 1cdd4dffb04a → 4a904127877a
operators.R
Show inline comments
 
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"
 

	
 
	x <- runif(10^s, 1, 100)
 
	y <- seq(1:10^s)
 
	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)
 
			print(sum(sqrt(x+1)-y*x))
 
		})[[3]]
 
		log.result("operators", sys, conf, s, r, timing)
 
		clearResultRecycler()