From: Alina Quereilhac Date: Wed, 9 May 2012 13:05:47 +0000 (+0200) Subject: Simplifying factorial in examples/ccnx/planetlab_ccnx_multicast.py X-Git-Tag: nepi-3.0.0~163^2~9 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=1714e3e58c731288c6d79d701f43d6d91025c118;p=nepi.git Simplifying factorial in examples/ccnx/planetlab_ccnx_multicast.py --- diff --git a/examples/ccnx/planetlab_ccnx_multicast.py b/examples/ccnx/planetlab_ccnx_multicast.py index 7f0785ee..4bc18681 100644 --- a/examples/ccnx/planetlab_ccnx_multicast.py +++ b/examples/ccnx/planetlab_ccnx_multicast.py @@ -155,7 +155,7 @@ def create_ed(hostnames, vsys_vnet, slicename, plc_host, pl_user, pl_pwd, pl_ssh # Calculate the number of virtual networks required to connect all the nodes # with all other nodes as the binomial coeficient C(n, 2), with n = #nodes n = len(hostnames) - c = math.factorial(n) / (2 * math.factorial(n-2)) + c = n * (n-1) / 2 # Validate that we can get 'c' /30 subnetworks if c > math.pow(2, (30 - base.prefixlen)): @@ -231,7 +231,7 @@ if __name__ == '__main__': default_hostnames = ['openlab02.pl.sophia.inria.fr', 'ple4.ipv6.lip6.fr', 'planetlab2.di.unito.it', - #'merkur.planetlab.haw-hamburg.de', + 'merkur.planetlab.haw-hamburg.de', 'planetlab1.cs.uit.no', 'planetlab3.cs.st-andrews.ac.uk', 'planetlab2.cs.uoi.gr',