Skip to content

Commit 4e02d09

Browse files
committed
Formatter
1 parent 852834b commit 4e02d09

File tree

2 files changed

+21
-14
lines changed

2 files changed

+21
-14
lines changed

src/EEAlgorithm.jl

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ is specialised for the Durham metric and operates on the StructArray layout.
9797
end
9898
end
9999

100-
101100
"""
102101
get_angular_nearest_neighbours!(eereco, ::Val{JetAlgorithm.EEKt}, dij_factor, p, γ=1.0, R=4.0)
103102
@@ -186,7 +185,8 @@ direction-cosine arrays for performance.
186185
eereco.nni[i] = better_nndist_i ? j : eereco.nni[i]
187186
end
188187
end
189-
eereco.dijdist[i] = dij_dist(eereco, i, eereco[i].nni, dij_factor, Val(JetAlgorithm.Durham), R)
188+
eereco.dijdist[i] = dij_dist(eereco, i, eereco[i].nni, dij_factor,
189+
Val(JetAlgorithm.Durham), R)
190190
end
191191

192192
"""
@@ -212,12 +212,14 @@ beam is closer than the dij distance.
212212
eereco.nndist[j] = this_nndist
213213
eereco.nni[j] = i
214214
# j will not be revisited, so update metric distance here
215-
eereco.dijdist[j] = dij_dist(eereco, j, i, dij_factor, Val(JetAlgorithm.EEKt), R)
215+
eereco.dijdist[j] = dij_dist(eereco, j, i, dij_factor,
216+
Val(JetAlgorithm.EEKt), R)
216217
# EEKt-specific beam check is handled in the EEKt method only
217218
end
218219
end
219220
end
220-
eereco.dijdist[i] = dij_dist(eereco, i, eereco[i].nni, dij_factor, Val(JetAlgorithm.EEKt), R)
221+
eereco.dijdist[i] = dij_dist(eereco, i, eereco[i].nni, dij_factor,
222+
Val(JetAlgorithm.EEKt), R)
221223

222224
# Need to check beam for EEKt
223225
beam_close = eereco[i].E2p < eereco[i].dijdist
@@ -260,12 +262,14 @@ nearest neighbour. Computes inline dij updates to avoid function-call overhead.
260262
eereco.nndist[j] = this_nndist
261263
eereco.nni[j] = i
262264
# j will not be revisited, so update metric distance here
263-
eereco.dijdist[j] = dij_dist(eereco, j, i, dij_factor, Val(JetAlgorithm.Durham), R)
265+
eereco.dijdist[j] = dij_dist(eereco, j, i, dij_factor,
266+
Val(JetAlgorithm.Durham), R)
264267
# EEKt-specific beam check is handled in the EEKt method only
265268
end
266269
end
267270
end
268-
eereco.dijdist[i] = dij_dist(eereco, i, eereco[i].nni, dij_factor, Val(JetAlgorithm.Durham), R)
271+
eereco.dijdist[i] = dij_dist(eereco, i, eereco[i].nni, dij_factor,
272+
Val(JetAlgorithm.Durham), R)
269273
end
270274

271275
"""
@@ -291,16 +295,18 @@ where required.
291295
eereco.nndist[j] = this_nndist
292296
eereco.nni[j] = i
293297
# j will not be revisited, so update metric distance here
294-
eereco.dijdist[j] = dij_dist(eereco, j, i, dij_factor, Val(JetAlgorithm.EEKt), R)
298+
eereco.dijdist[j] = dij_dist(eereco, j, i, dij_factor,
299+
Val(JetAlgorithm.EEKt), R)
295300
if eereco[j].E2p < eereco[j].dijdist
296301
eereco.dijdist[j] = eereco[j].E2p
297302
eereco.nni[j] = 0
298303
end
299304
end
300305
end
301306
end
302-
eereco.dijdist[i] = dij_dist(eereco, i, eereco[i].nni, dij_factor, Val(JetAlgorithm.EEKt), R)
303-
307+
eereco.dijdist[i] = dij_dist(eereco, i, eereco[i].nni, dij_factor,
308+
Val(JetAlgorithm.EEKt), R)
309+
304310
# Check beam for EEKt
305311
beam_close = eereco[i].E2p < eereco[i].dijdist
306312
eereco.dijdist[i] = beam_close ? eereco[i].E2p : eereco.dijdist[i]
@@ -597,19 +603,21 @@ function _ee_genkt_algorithm_durham(; particles::AbstractVector{EEJet},
597603
N -= 1
598604

599605
# Update nearest neighbours step using array-based helpers specialised for Durham
600-
for i in 1:N
606+
for i in 1:N
601607
if (ijetB != N + 1) && (nni[i] == N + 1)
602608
nni[i] = ijetB
603609
else
604610
if (nni[i] == ijetA) || (nni[i] == ijetB) || (nni[i] > N)
605-
# use SoA-based updater
606-
update_nn_no_cross!(eereco, i, N, Val(JetAlgorithm.Durham), dij_factor, p, γ, R)
611+
# use SoA-based updater
612+
update_nn_no_cross!(eereco, i, N, Val(JetAlgorithm.Durham), dij_factor,
613+
p, γ, R)
607614
end
608615
end
609616
end
610617

611618
if ijetA != ijetB
612-
update_nn_cross!(eereco, ijetA, N, Val(JetAlgorithm.Durham), dij_factor, p, γ, R)
619+
update_nn_cross!(eereco, ijetA, N, Val(JetAlgorithm.Durham), dij_factor, p, γ,
620+
R)
613621
end
614622
end
615623

src/EEAlgorithmValencia.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# Valencia-specialised helpers and implementation
33
################################################################################
44

5-
65
"""
76
angular_distance_arrays(nx, ny, nz, i, j) -> Float64
87

0 commit comments

Comments
 (0)