Skip to content

Commit

Permalink
Remove mul from exported functions and rename to _mul (#110)
Browse files Browse the repository at this point in the history
Fixes #109
  • Loading branch information
AntonReinhard authored Aug 9, 2024
1 parent 03af046 commit d36c735
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/QEDbase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export AbstractFourMomentum
export isonshell, assert_onshell

export AbstractDiracVector, AbstractDiracMatrix
export mul

export AbstractGammaRepresentation

Expand Down
8 changes: 4 additions & 4 deletions src/interfaces/lorentz_vectors/dirac_interaction.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

"""
Expand All @@ -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

0 comments on commit d36c735

Please sign in to comment.