schubmult 1.3.0__tar.gz → 1.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. {schubmult-1.3.0 → schubmult-1.3.2}/PKG-INFO +1 -1
  2. {schubmult-1.3.0 → schubmult-1.3.2}/schubmult/perm_lib.py +14 -11
  3. {schubmult-1.3.0 → schubmult-1.3.2}/schubmult/schubmult_q/schubmult_q.py +12 -12
  4. {schubmult-1.3.0 → schubmult-1.3.2}/schubmult.egg-info/PKG-INFO +1 -1
  5. {schubmult-1.3.0 → schubmult-1.3.2}/setup.py +1 -1
  6. {schubmult-1.3.0 → schubmult-1.3.2}/LICENSE +0 -0
  7. {schubmult-1.3.0 → schubmult-1.3.2}/README.md +0 -0
  8. {schubmult-1.3.0 → schubmult-1.3.2}/schubmult/__init__.py +0 -0
  9. {schubmult-1.3.0 → schubmult-1.3.2}/schubmult/schubmult_double/__init__.py +0 -0
  10. {schubmult-1.3.0 → schubmult-1.3.2}/schubmult/schubmult_double/__main__.py +0 -0
  11. {schubmult-1.3.0 → schubmult-1.3.2}/schubmult/schubmult_double/schubmult_double.py +0 -0
  12. {schubmult-1.3.0 → schubmult-1.3.2}/schubmult/schubmult_py/__init__.py +0 -0
  13. {schubmult-1.3.0 → schubmult-1.3.2}/schubmult/schubmult_py/__main__.py +0 -0
  14. {schubmult-1.3.0 → schubmult-1.3.2}/schubmult/schubmult_py/schubmult_py.py +0 -0
  15. {schubmult-1.3.0 → schubmult-1.3.2}/schubmult/schubmult_q/__init__.py +0 -0
  16. {schubmult-1.3.0 → schubmult-1.3.2}/schubmult/schubmult_q/__main__.py +0 -0
  17. {schubmult-1.3.0 → schubmult-1.3.2}/schubmult/schubmult_yz/__init__.py +0 -0
  18. {schubmult-1.3.0 → schubmult-1.3.2}/schubmult/schubmult_yz/__main__.py +0 -0
  19. {schubmult-1.3.0 → schubmult-1.3.2}/schubmult/schubmult_yz/schubmult_yz.py +0 -0
  20. {schubmult-1.3.0 → schubmult-1.3.2}/schubmult.egg-info/SOURCES.txt +0 -0
  21. {schubmult-1.3.0 → schubmult-1.3.2}/schubmult.egg-info/dependency_links.txt +0 -0
  22. {schubmult-1.3.0 → schubmult-1.3.2}/schubmult.egg-info/entry_points.txt +0 -0
  23. {schubmult-1.3.0 → schubmult-1.3.2}/schubmult.egg-info/requires.txt +0 -0
  24. {schubmult-1.3.0 → schubmult-1.3.2}/schubmult.egg-info/top_level.txt +0 -0
  25. {schubmult-1.3.0 → schubmult-1.3.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: schubmult
3
- Version: 1.3.0
3
+ Version: 1.3.2
4
4
  Summary: Computing Littlewood-Richardson coefficients of Schubert polynomials
5
5
  Home-page: https://github.com/matthematics/schubmult
6
6
  Author: Matt Samuel
@@ -98,10 +98,10 @@ def count_bruhat(perm,i,j):
98
98
  else:
99
99
  up_amount = -1
100
100
  for k in range(i+1,j):
101
- if perm[i]<perm[k] and perm[j]>perm[k]:
102
- up_amount+=1
103
- elif perm[i]>perm[k] and perm[j]<perm[k]:
104
- up_amount-=1
101
+ if perm[i]<perm[k] and perm[k]<perm[j]:
102
+ up_amount+=2
103
+ elif perm[i]>perm[k] and perm[k]>perm[j]:
104
+ up_amount-=2
105
105
  return up_amount
106
106
 
107
107
 
@@ -145,24 +145,27 @@ def elem_sym_perms_q(orig_perm,p,k):
145
145
  up_perm_list = [(orig_perm,1,1000)]
146
146
  for pp in range(p):
147
147
  perm_list = []
148
- for up_perm, last, last_j in up_perm_list:
148
+ for up_perm, val, last_j in up_perm_list:
149
149
  up_perm2 = [*up_perm,len(up_perm)+1]
150
150
  if len(up_perm2) < k + 1:
151
151
  up_perm2 += [i+1 for i in range(len(up_perm2),k+2)]
152
- pos_list = [i for i in range(k) if i>=len(orig_perm) or up_perm2[i] == orig_perm[i]]
153
- for j in range(min(last_j,len(up_perm2)-1),k-1,-1):
152
+ pos_list = [i for i in range(k) if (i>=len(orig_perm) and up_perm2[i]==i+1) or (i<len(orig_perm) and up_perm2[i] == orig_perm[i])]
153
+ for j in range(min(len(up_perm2)-1,last_j),k-1,-1):
154
154
  for i in pos_list:
155
155
  ct = count_bruhat(up_perm2,i,j)
156
+ #print(f"{up_perm2=} {ct=} {i=} {j=} {k=} {pp=}")
156
157
  if ct == 1 or ct == 2*(i-j)+1:
157
158
  new_perm = [*up_perm2]
158
159
  new_perm[i],new_perm[j] = new_perm[j],new_perm[i]
159
160
  new_perm_add = tuple(permtrim(new_perm))
160
- new_last = last
161
+ new_val = val
161
162
  if ct<0:
162
- new_last *= np.prod([q_var[index] for index in range(i+1,j+1)])
163
- perm_list += [(new_perm_add,new_last,j)]
164
- total_list+=[(new_perm_add,pp+1,new_last)]
163
+ new_val *= np.prod([q_var[index] for index in range(i+1,j+1)])
164
+ #print(f"{ct=} {i=} {j=} {k=} {last_j=} {pp=} {up_perm2=} {new_perm_add=} {new_val=}")
165
+ perm_list += [(new_perm_add,new_val,j)]
166
+ total_list+=[(new_perm_add,pp+1,new_val)]
165
167
  up_perm_list = perm_list
168
+ #print(f"{total_list=}")
166
169
  return total_list
167
170
 
168
171
 
@@ -6,9 +6,10 @@ import sys
6
6
 
7
7
  def schubmult(perm_dict,v):
8
8
  vn1 = inverse(v)
9
- th = [len(v)-i for i in range(1,len(v))]
9
+ th = [len(v)-i for i in range(1,len(v)+1)]
10
10
  mu = permtrim(uncode(th))
11
11
  vmu = permtrim(mulperm([*v],mu))
12
+ #print(f"{th=} {mu=} {vmu=}")
12
13
  inv_vmu = inv(vmu)
13
14
  inv_mu = inv(mu)
14
15
  ret_dict = {}
@@ -29,17 +30,16 @@ def schubmult(perm_dict,v):
29
30
  newpathsums = {}
30
31
  for up in vpathsums:
31
32
  newperms = elem_sym_perms_q(up,mx_th,th[index])
32
- for vp in vpathsums[up]:
33
- sumval = vpathsums[up][vp]
34
- if sumval == 0:
35
- continue
36
- for v2,vdiff,s in vpathdicts[index][vp]:
37
- addsumval = s*sumval
38
- for up2, udiff, mul_val in newperms:
39
- if vdiff + udiff == th[index]:
40
- if up2 not in newpathsums:
41
- newpathsums[up2]={}
42
- newpathsums[up2][v2] = newpathsums[up2].get(v2,0)+mul_val*addsumval
33
+ for up2, udiff, mul_val in newperms:
34
+ if up2 not in newpathsums:
35
+ newpathsums[up2]={}
36
+ for v in vpathdicts[index]:
37
+ sumval = vpathsums[up].get(v,zero)
38
+ if sumval == 0:
39
+ continue
40
+ for v2,vdiff,s in vpathdicts[index][v]:
41
+ if udiff+vdiff==th[index]:
42
+ newpathsums[up2][v2] = newpathsums[up2].get(v2,zero)+s*sumval*mul_val
43
43
  vpathsums = newpathsums
44
44
  toget = tuple(vmu)
45
45
  ret_dict = add_perm_dict({ep: vpathsums[ep].get(toget,0) for ep in vpathsums},ret_dict)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: schubmult
3
- Version: 1.3.0
3
+ Version: 1.3.2
4
4
  Summary: Computing Littlewood-Richardson coefficients of Schubert polynomials
5
5
  Home-page: https://github.com/matthematics/schubmult
6
6
  Author: Matt Samuel
@@ -6,7 +6,7 @@ long_description = (this_directory / "README.md").read_text()
6
6
 
7
7
  setup(
8
8
  name="schubmult",
9
- version="1.3.0",
9
+ version="1.3.2",
10
10
  description="Computing Littlewood-Richardson coefficients of Schubert polynomials",
11
11
  long_description=long_description,
12
12
  long_description_content_type='text/markdown',
File without changes
File without changes
File without changes