Skip to content

Commit

Permalink
adds suggestion from PR #4260
Browse files Browse the repository at this point in the history
  • Loading branch information
antonydellavecchia committed Dec 6, 2024
1 parent 8d6c771 commit 1f67bef
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions experimental/AlgebraicShifting/src/PartialShiftGraph.jl
Original file line number Diff line number Diff line change
Expand Up @@ -217,18 +217,11 @@ function partial_shift_graph(F::Field, complexes::Vector{T},
Oscar.put_params(channels, codomain(phi))
map_function = pmap
end
try
if show_progress
edge_labels = reduce((d1, d2) -> mergewith!(vcat, d1, d2),
@showprogress map_function(
try
edge_labels = reduce((d1, d2) -> mergewith!(vcat, d1, d2),
@showprogress enabled=show_progress map_function(

Check warning on line 222 in experimental/AlgebraicShifting/src/PartialShiftGraph.jl

View check run for this annotation

Codecov / codecov/patch

experimental/AlgebraicShifting/src/PartialShiftGraph.jl#L222

Added line #L222 was not covered by tests
Ks -> multi_edges(F, phi.(W), Ks, complex_labels),
Iterators.partition(enumerate(complexes), task_size)))
else
edge_labels = reduce((d1, d2) -> mergewith!(vcat, d1, d2),
map_function(
Ks -> multi_edges(F, phi.(W), Ks, complex_labels),
Iterators.partition(enumerate(complexes), task_size)))
end
graph = graph_from_edges(Directed, [[i,j] for (i,j) in keys(edge_labels)])
return (graph,
Dict(k => inv(phi).(v) for (k, v) in edge_labels),
Expand Down

0 comments on commit 1f67bef

Please sign in to comment.