From 1714e3e58c731288c6d79d701f43d6d91025c118 Mon Sep 17 00:00:00 2001 From: Alina Quereilhac Date: Wed, 9 May 2012 15:05:47 +0200 Subject: [PATCH 1/1] Simplifying factorial in examples/ccnx/planetlab_ccnx_multicast.py --- examples/ccnx/planetlab_ccnx_multicast.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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', -- 2.43.0