From db551c2fe17a9ab42d9bf99f5b1011a1bc7416d8 Mon Sep 17 00:00:00 2001 From: AntonReinhard Date: Sat, 22 Jun 2024 00:37:42 +0200 Subject: [PATCH] Move imports to where they are used --- src/QEDcore.jl | 4 ---- src/algebraic_objects/dirac_tensors/multiplication.jl | 3 +++ src/algebraic_objects/four_momentum.jl | 1 + src/algebraic_objects/lorentz_vector.jl | 1 + src/particles/states.jl | 2 ++ 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/QEDcore.jl b/src/QEDcore.jl index 38bb48b..352b5c8 100644 --- a/src/QEDcore.jl +++ b/src/QEDcore.jl @@ -1,9 +1,5 @@ module QEDcore -import Base: * -import StaticArrays: similar_type -import QEDbase: base_state - # lorentz vectors export SLorentzVector, MLorentzVector diff --git a/src/algebraic_objects/dirac_tensors/multiplication.jl b/src/algebraic_objects/dirac_tensors/multiplication.jl index 29d9e64..21c8e84 100644 --- a/src/algebraic_objects/dirac_tensors/multiplication.jl +++ b/src/algebraic_objects/dirac_tensors/multiplication.jl @@ -3,6 +3,9 @@ # Concrete implementation of multiplication for Dirac Tensors # ####### + +import Base: * + """ $(TYPEDSIGNATURES) diff --git a/src/algebraic_objects/four_momentum.jl b/src/algebraic_objects/four_momentum.jl index a3da97d..f39ddfe 100644 --- a/src/algebraic_objects/four_momentum.jl +++ b/src/algebraic_objects/four_momentum.jl @@ -5,6 +5,7 @@ ####### import QEDbase: getT, getX, getY, getZ, setT!, setX!, setY!, setZ! +import StaticArrays: similar_type """ $(TYPEDEF) diff --git a/src/algebraic_objects/lorentz_vector.jl b/src/algebraic_objects/lorentz_vector.jl index a0cfcfc..f83b422 100644 --- a/src/algebraic_objects/lorentz_vector.jl +++ b/src/algebraic_objects/lorentz_vector.jl @@ -5,6 +5,7 @@ ####### import QEDbase: getT, getX, getY, getZ, setT!, setX!, setY!, setZ! +import StaticArrays: similar_type ####### # diff --git a/src/particles/states.jl b/src/particles/states.jl index a575b70..54affde 100644 --- a/src/particles/states.jl +++ b/src/particles/states.jl @@ -1,3 +1,5 @@ +import QEDbase: base_state + function _booster_fermion(mom::QEDbase.AbstractFourMomentum, mass::Real) return (slashed(mom) + mass * one(DiracMatrix)) / (sqrt(abs(QEDbase.getT(mom)) + mass)) end