aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/sgcf.spad.pamphlet
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra/sgcf.spad.pamphlet')
-rw-r--r--src/algebra/sgcf.spad.pamphlet15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/algebra/sgcf.spad.pamphlet b/src/algebra/sgcf.spad.pamphlet
index 72669658..20fdb544 100644
--- a/src/algebra/sgcf.spad.pamphlet
+++ b/src/algebra/sgcf.spad.pamphlet
@@ -212,11 +212,12 @@ SymmetricGroupCombinatoricFunctions(): public == private where
for t in 0..(m-2) repeat
s : I := 0
sOld: I
- y : I
- for y in 0..n repeat
+ y : I := 0
+ while y <= n repeat
sOld := s
s := s + numberOfImproperPartitions(n-y,m-t-1)
if s > k then leave
+ y := y + 1
l := append(l,list(y)$(L I))$(L I)
k := k - sOld
n := n - y
@@ -241,12 +242,13 @@ SymmetricGroupCombinatoricFunctions(): public == private where
s : I := 0
cm := cm - 1
sOld : I
- y : I
- for y in n..1 by -1 repeat --determination of the next son
+ y : I := n
+ while y >= 1 repeat --determination of the next son
sOld := s -- remember old s
-- this functions counts the number of elements in a subtree
s := s + numberOfImproperPartitionsInternal(n-y,m,cm)
if s > k then leave
+ y := y - 1
-- y is the next son, so put it into the pathlist "nonZero"
nonZeros := append(nonZeros,list(y)$(L I))$(L I)
k := k - sOld --updating
@@ -270,9 +272,10 @@ SymmetricGroupCombinatoricFunctions(): public == private where
mm : I := k
s : I := m
for t in 0..(m-1) repeat
- y : Integer
- for y in (s-1)..(n+1) repeat
+ y : Integer := s-1
+ while y <= (n+1) repeat
if binomial$ICF (y,s) > mm then leave
+ y := y + 1
l := append (l,list(y-1)$(L I))
mm := mm - binomial$ICF (y-1,s)
s := s-1