blob: 86fe5f863425361acd802780e08e7c7e1aa6c3b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
from statistics import mean
from data2 import trials, fancy
print('\\tabrule Size & Interruption & Reclusive & Dead & Pits formed &\
Nearest Neighbor (avg) & Width (avg) & Depth (avg)\\cr\\tabrule')
for trial in trials:
print('& '.join(['$'+'\\times'.join([str(el) for el in trial.size])+'$',
fancy[trial.method], str(trial.recl), str(trial.dead),
str(len(trial.pits)), '%.2fin' % mean(trial.nearest_neighbor()),
'%.2fcm' % mean([pit.diam for pit in trial.pits]),
'%.2fcm' % mean([pit.depth for pit in trial.pits])])+'\\cr\\tabrule')
|