aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/sgcf.spad.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-06-21 03:14:17 +0000
committerdos-reis <gdr@axiomatics.org>2010-06-21 03:14:17 +0000
commit640d839b4de4d0daf0dde00ba08eab6d264160ad (patch)
tree3b5565cbc731bd2455a13c72a9a9c539f3088310 /src/algebra/sgcf.spad.pamphlet
parentbf21f6c3c98ea62bbd952ecd2382b63f4cd370bb (diff)
downloadopen-axiom-640d839b4de4d0daf0dde00ba08eab6d264160ad.tar.gz
* algebra/sgcf.spad.pamphlet (SymmetricGroupCombinatoricFunctions)
[listYoungTableaus]: Fix thinko. Don't use lattice in its own initialization before it is defined.
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