Den tisdag 1 mars 2016 kl. 08:49:57 UTC+1 skrev Ian: > It's not at all clear what the problem is from your description. What > is it that you expect the code to do? What is it doing instead that > violates your expectation? Why are you asking for Javascript help on a > Python mailing list? > > On Mon, Feb 29, 2016 at 10:40 PM, <jonas.thornv...@gmail.com> wrote: > > I've been looking at the code for two days so i am a bit crosseyed. > > If anyone could help me set the condition so the loop catch the last > > pair/pairs, it is kind of weird that it succeed sometimes and break to > > early and report fail others. > > > > I would be very greatful if anyone can see why it break to early and return > > fail. Although it is clearly a succes looking at the last remaining pair > > none connected pair.It should report fail for the network permutations that > > stall due to link exhausting, but not stall creating last pair. > > > > It just a minor bug due to some condition that i just not get. > > Have a go 5 munutes maybe someone catch the faulthy condition. > > > > http://jt.node365.se/mydebug1.html > > -- > > https://mail.python.org/mailman/listinfo/python-list
Here is example output and as you can see there is no reason to not create the last pair, the link is not a copy it should be created but condition somehow wrong *sometimes*. Hurray failed generate network ***not quite if single pair two nodes missing 0'st NODE Links-> 7,3,5 1'st NODE Links-> 4,6,3 2'st NODE Links-> 5,9,3 3'st NODE Links-> 0,1,2 4'st NODE Links-> 1,8,5 5'st NODE Links-> 0,2,4 6'st NODE Links-> 1,7,9 7'st NODE Links-> 0,6,8 8'st NODE Links-> 4,7 9'st NODE Links-> 2,6 -- https://mail.python.org/mailman/listinfo/python-list