Mercurial > public > think_complexity
comparison ch5ex7.py @ 38:d876711b88b5
Comment out the calculation of L as it may take a long time.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 10 Jan 2013 20:24:56 -0600 |
parents | 931f60dee99e |
children |
comparison
equal
deleted
inserted
replaced
37:931f60dee99e | 38:d876711b88b5 |
---|---|
54 assert abs(sum(y) - 1.0) < 1e-6 | 54 assert abs(sum(y) - 1.0) < 1e-6 |
55 | 55 |
56 print 'Calculating clustering coefficient...' | 56 print 'Calculating clustering coefficient...' |
57 c = g.clustering_coefficient() | 57 c = g.clustering_coefficient() |
58 print 'c =', c | 58 print 'c =', c |
59 print 'Setting edge lengths...' | 59 |
60 g.set_edge_length(1) | 60 # This may take a looong time...... |
61 print 'Calculating characteristic length L...' | 61 #print 'Setting edge lengths...' |
62 l3 = g.big_l3() | 62 #g.set_edge_length(1) |
63 print 'L =', l3 | 63 #print 'Calculating characteristic length L...' |
64 #l3 = g.big_l3() | |
65 #print 'L =', l3 | |
64 | 66 |
65 print 'Plotting data...' | 67 print 'Plotting data...' |
66 pyplot.clf() | 68 pyplot.clf() |
67 pyplot.xscale('log') | 69 pyplot.xscale('log') |
68 pyplot.yscale('log') | 70 pyplot.yscale('log') |