End of Day; Add topology generation and iterators

This commit is contained in:
Anton Reinhard
2024-04-02 02:12:33 +02:00
parent a959137e22
commit b6728b2236
9 changed files with 230 additions and 0 deletions

23
test/qft.jl Normal file
View File

@ -0,0 +1,23 @@
using FeynmanDiagramGenerator
import FeynmanDiagramGenerator.QFT
@testset "QED" begin
theory = QED
for (p1, p2, p3, b) in [
(Electron(), Positron(), Photon(), true),
(Muon(), AntiMuon(), Photon(), true),
(Tauon(), AntiTauon(), Photon(), true),
(Electron(), Positron(), Positron(), false),
(Electron(), AntiMuon(), Photon(), false),
(Electron(), Positron(), ZBoson(), false)
]
@test can_interact(theory, p1, p2, p3) == b
@test can_interact(theory, p1, p2, p3) == b
@test can_interact(theory, p2, p1, p3) == b
@test can_interact(theory, p2, p3, p1) == b
@test can_interact(theory, p3, p1, p2) == b
@test can_interact(theory, p3, p2, p1) == b
end
end

View File

@ -3,3 +3,7 @@ using SafeTestsets
@safetestset "Trees" begin
include("trees.jl")
end
@safetestset "QFT" begin
include("qft.jl")
end