Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Optimizing the skew_by() function.
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis Scrimshaw committed Feb 9, 2022
1 parent bfe5203 commit a3571ea
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/sage/combinat/sf/sfa.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
from sage.combinat.free_module import CombinatorialFreeModule
from sage.matrix.constructor import matrix
from sage.misc.misc_c import prod
from sage.data_structures.blas_dict import coerce_remove_zeros
from sage.data_structures.blas_dict import coerce_remove_zeros, linear_combination
from copy import copy
from functools import reduce

Expand Down Expand Up @@ -5280,14 +5280,11 @@ def skew_by(self, x):
zero = s.zero()
R = parent.base_ring()
import sage.libs.lrcalc.lrcalc as lrcalc
def f(part1, part2):
if not part1.contains(part2):
return zero
skewschur = lrcalc.skew(part1, part2)
for k in skewschur:
skewschur[k] = R(skewschur[k])
return s._from_dict(skewschur)
return parent(s._apply_multi_module_morphism(s(self), s(x), f))
ret = linear_combination((coerce_remove_zeros(lrcalc.skew(p1, p2), R), c1 * c2)
for p1, c1 in s(self)._monomial_coefficients.items()
for p2, c2 in s(x)._monomial_coefficients.items()
if p1.contains(p2))
return parent(s.element_class(s, ret))

def hl_creation_operator(self, nu, t = None):
r"""
Expand Down

0 comments on commit a3571ea

Please sign in to comment.