k=int(args.k) t=int(args.t) b=int(args.b) if len(sys.argv) != 11: print "Incomplete arguments, type 'python run_ranked_insert.py -h' " exit() # Calculate the budget: budget = b # Calculate the number of iterations iterations = 50*math.log(0.51*(n+1)) print "Number of vectors " + str(n) print "Size of vectors " + str(m) print "The 'k' in top k " + str(k) print "Type of data " + str(t) print "Budget " + str(b) print "Number of iterations "+str(iterations) print "** ** ** " print "Result" print "** ** ** " # Initialize sorted vectors vectors,means = data.getSortedVectors(n,m,10000,t) tk.topk(vectors,means,k,budget,iterations,"runs") exit()
t=int(args.t) b=int(args.b) if len(sys.argv) != 11: print "Incomplete arguments, type 'python run_ranked_insert.py -h' " exit() # Calculate the budget: budget = b # Calculate the number of iterations iterations = 50*math.log(0.51*(n+1)) print "Number of vectors " + str(n) print "Size of vectors " + str(m) print "Maximum number of vectors " + str(k) print "Type of data " + str(t) print "Budget " + str(b) print "Number of iterations "+str(iterations) print "** ** ** " # Initialize sorted vectors vectors,means = data.getSortedVectors(n,m,k,t) # Initialize a random vector to be inserted in the sorted vectors target_vector,target_mean = data.getRandomVector(m,k,t) ri.rankedInsert(vectors,means,target_vector,target_mean,budget,iterations,"runs") exit()