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

Remove mul from exported functions and rename to _mul #110

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/QEDbase.jl
Original file line number Diff line number Diff line change
@@ -26,7 +26,6 @@ export AbstractFourMomentum
export isonshell, assert_onshell

export AbstractDiracVector, AbstractDiracMatrix
export mul

export AbstractGammaRepresentation

8 changes: 4 additions & 4 deletions src/interfaces/lorentz_vectors/dirac_interaction.jl
Original file line number Diff line number Diff line change
@@ -8,15 +8,15 @@ Product of generic Lorentz vector with a Dirac tensor from the left. Basically,
!!! note "Multiplication operator"
This also overloads the `*` operator for this types.
"""
function mul(
function _mul(
DM::T, L::TL
) where {T<:Union{AbstractDiracMatrix,AbstractDiracVector},TL<:AbstractLorentzVector}
return constructorof(TL)(DM * L[1], DM * L[2], DM * L[3], DM * L[4])
end
@inline function *(
DM::T, L::TL
) where {T<:Union{AbstractDiracMatrix,AbstractDiracVector},TL<:AbstractLorentzVector}
return mul(DM, L)
return _mul(DM, L)
end

"""
@@ -28,13 +28,13 @@ Product of generic Lorentz vector with a Dirac tensor from the right. Basically,
This also overloads the `*` operator for this types.
"""
function mul(
function _mul(
L::TL, DM::T
) where {TL<:AbstractLorentzVector,T<:Union{AbstractDiracMatrix,AbstractDiracVector}}
return constructorof(TL)(L[1] * DM, L[2] * DM, L[3] * DM, L[4] * DM)
end
@inline function *(
L::TL, DM::T
) where {TL<:AbstractLorentzVector,T<:Union{AbstractDiracMatrix,AbstractDiracVector}}
return mul(L, DM)
return _mul(L, DM)
end