<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 4: Permutation does not iterate over whole set</title><link href="https://sourceforge.net/p/probstat/bugs/4/" rel="alternate"/><link href="https://sourceforge.net/p/probstat/bugs/4/feed.atom" rel="self"/><id>https://sourceforge.net/p/probstat/bugs/4/</id><updated>2007-01-17T18:02:38Z</updated><subtitle>Recent changes to 4: Permutation does not iterate over whole set</subtitle><entry><title>Permutation does not iterate over whole set</title><link href="https://sourceforge.net/p/probstat/bugs/4/" rel="alternate"/><published>2007-01-17T18:02:38Z</published><updated>2007-01-17T18:02:38Z</updated><author><name>Tim Coote</name><uri>https://sourceforge.net/u/timcoote/</uri></author><id>https://sourceforge.net354c31833b44ea0c0dab274fae704fcb1d07bce9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I'm not getting complete permutations. if I try to get all of the permutations of the numbers from 1 to 14, using a simple script, it terminates early.  I've tried this on fc5 native and fc6 as a vmware guest and get the same result. it appears to stop cleanly, just early.&lt;/p&gt;
&lt;p&gt;Have I built the code wrongly or something? I took that standard _0.912 tarball. I cannot even work out how to debug this. The reproduceability on different platforms makes me think it's an overflow problem, but I don't see anything obvious in that loop value. I see no symptoms of memory leakage.&lt;/p&gt;
&lt;p&gt;this program:&lt;/p&gt;
&lt;p&gt;---cut here---&lt;br /&gt;
import probstat&lt;/p&gt;
&lt;p&gt;values = [i+1 for i in range (14)]&lt;/p&gt;
&lt;p&gt;gen = probstat.Permutation (values)&lt;br /&gt;
loop = 1&lt;br /&gt;
for i in gen:&lt;br /&gt;
if loop %1000000 == 0: print loop&lt;br /&gt;
loop += 1&lt;/p&gt;
&lt;p&gt;-- cut here --&lt;br /&gt;
stops after it has printed 1278000000.  loop is 1278945281, i is:&lt;br /&gt;
[1, 4, 11, 2, 8, 7, 13, 14, 12, 5, 9, 6, 10, 3]&lt;/p&gt;
&lt;p&gt;loop should be around 87 billion, not 1.27 billion&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>