Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question on the function merge_prefactor and Base.+ #89

Closed
peter0627ustc opened this issue Dec 11, 2022 · 1 comment
Closed

Question on the function merge_prefactor and Base.+ #89

peter0627ustc opened this issue Dec 11, 2022 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@peter0627ustc
Copy link
Collaborator

I found that the function merge_prefactor (in #58) has to confronted the different cases below and it seems a little messy, for g=propagator(𝑓⁺(1)𝑓⁻(2), factor=1):
(a)k1=(1*g+2*g)
(b)k2= linear_combination(g,g,1,2)
The structures of them are different:
(1) For k1:
k1
(2) For k2:
k2
I suggest these two cases should be unified to the second one in the Base.+ function.

@peter0627ustc peter0627ustc added the question Further information is requested label Dec 11, 2022
@dcerkoney
Copy link
Collaborator

dcerkoney commented Dec 11, 2022

This is supposed to be the job of function inplace_prod. I agree that we probably want to call it directly in Base.+ and Base.* to clean up trees like k1 immediately after construction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants