Skip to content

Commit

Permalink
fixed docstring in rand momenta test implementation, fixed bug in all…
Browse files Browse the repository at this point in the history
…-fail rand momenta
  • Loading branch information
Uwe Hernandez Acosta committed Mar 6, 2024
1 parent cacae8c commit aa3df61
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions test/test_implementation/random_momenta.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,15 @@ i.e. their first entries are null momenta.
"""
function _rand_in_momenta_failed_all(rng::AbstractRNG, N1, N2)
moms = _rand_momenta(rng, N1, N2)
moms[1, 1] = zero(SFourMomentum)
moms[1, 2] = zero(SFourMomentum)
for n in 1:N2
moms[1, n] = zero(SFourMomentum)
end
return moms
end

"""
Return a collection of outgoing space points, where the first point is failing the phase space constraint,
i.e. the first entry of the matrix is the null momentum, but the others pass.
Return a collection of outgoing phase space points, where the first point is failing the phase space constraint,
i.e. the last entry of the matrix is the unit momentum, but the others pass.
"""
function _rand_out_momenta_failed_mix(rng::AbstractRNG, N1, N2)
moms = _rand_momenta(rng, N1, N2)
Expand All @@ -75,11 +76,12 @@ end

"""
Return a collection of outgoing phase space points, where all points are failing the phase space constraint,
i.e. their first entries are null momenta.
i.e. their last entries are unit momenta.
"""
function _rand_out_momenta_failed_all(rng::AbstractRNG, N1, N2)
moms = _rand_momenta(rng, N1, N2)
moms[end, 1] = ones(SFourMomentum)
moms[end, 2] = ones(SFourMomentum)
for n in 1:N2
moms[end, n] = ones(SFourMomentum)
end
return moms
end

0 comments on commit aa3df61

Please sign in to comment.