|
|
|
@ -42,15 +42,15 @@ SAMPLE_SIZE=1000
|
|
|
|
|
def time_measurement(n, sample_size):
|
|
|
|
|
sample = []
|
|
|
|
|
|
|
|
|
|
print(f"SAMPLE_SIZE = {SAMPLE_SIZE}")
|
|
|
|
|
for i in range(sample_size):
|
|
|
|
|
_, duration = generate(n)
|
|
|
|
|
print(i)
|
|
|
|
|
sample.append(duration)
|
|
|
|
|
|
|
|
|
|
print("sali")
|
|
|
|
|
npsample = np.array(sample)
|
|
|
|
|
|
|
|
|
|
print(np.mean(npsample))
|
|
|
|
|
print(np.median(npsample))
|
|
|
|
|
print(f"AVG: {np.mean(npsample)} seconds")
|
|
|
|
|
print(f"MEDIAN: {np.median(npsample)} seconds")
|
|
|
|
|
|
|
|
|
|
time_measurement(N, SAMPLE_SIZE)
|