QEDjl-project / QEDcore.jl

[WIP] Core types and functions for QED.jl
https://qedjl-project.github.io/QEDcore.jl/stable/
MIT License
0 stars 3 forks source link

Misleading implementation of 'dot' #21

Open szabo137 opened 1 year ago

szabo137 commented 1 year ago

The function

dot(::AbstractLorentzVector,::AbstractLorentzVector)

implemented here seems misleading.

First, there is a function LinearAlgebra.dot that has similar behavior but QEDbase.dot is not added to the methods of the former. Second, it seems misleading, that QEDbase.dot redirects directly to QEDbase.mdot, which is the Minkowski inner product.

In conclusion, I suggest removing the QEDbase.dot and sticking with QEDbase.mdot to underline the difference between Minkowski and Euclidian inner product.

However, the implementation of QEDbase.* seems valuable, and clear and should stay. Maybe it would be more explicit to add this implementation directly to Base.* instead of using import Base: *.