Closed ghseeli closed 6 years ago
Can you add some tests to test_all.py
showing how you would plug in t=1 when creating a catalan function? Make sure all tests in test_all.py
continue to pass.
The tests normally pass in under 6 seconds.
Sym = SymmetricFunctions(QQ['t'])
hl = Sym.hall_littlewood().Qp()
p = Partition([5, 5, 3, 3, 1, 1])
a(compositional_hall_littlewood_Qp(p), hl(p))
is the slow point. I think something in your changes causes a slow down.
The slow down ultimately comes from passing t
into SymmetricFunctions(self.base_ring).hall_littlewood(t=t).Qp()
. Using SymmetricFunctions(self.base_ring).hall_littlewood().Qp()
is significantly faster.
The only thing that I don't understand is your change of compositional_hall_littlewood_Qp(gamma, t=s.t, base_ring=s.base_ring())
. Do we need that change?
Re the repr
comment, the problem is that the code does not specify t
in the init
method, it instead gets evaluated at the eval()
method. This was the least work way to modify the catalan functions.
Odd that it causes such a slowdown, I can change it up slightly.
I put tests in the docstring, but I can add them to test_all.py
, too.
As for issue #9 , it seems that the line return H(gamma)(HLQp.one())
was the culprit. I forgot to pass in the base ring. Now it's return H(gamma, base_ring=base_ring)(HLQp.one())
.
Pushing my version up shortly.
For more information on my in-line comment, the compositional hall-littlewood needs to be passed a t because specializing t affects both the raising operator expression AND what they act on (using the hall-littlewood definition).
I think passing in t
in return compositional_hall_littlewood_Qp(gamma, base_ring=basis.base_ring(), t=basis.t)
may slow down things in certain situations. Hopefully won't become a problem though
Thanks, George!!
I added the interface to specialize
t
in the evaluation method of aCatalanFunction
. This seemed like the best place to put it without modifying any of the existing code too heavily.