Skip to content

Commit

Permalink
parallel geodesic computation
Browse files Browse the repository at this point in the history
  • Loading branch information
stivalaa committed Dec 9, 2022
1 parent a612c42 commit 28afbf8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/simFitPlots.R
Original file line number Diff line number Diff line change
Expand Up @@ -617,9 +617,8 @@ build_sim_fit_plots <- function(g_obs, sim_graphs, do_subplots=FALSE,
cat('computing observed geodesic distribution...')
print(system.time(obs_geodesics <- distance_table(g_obs)$res))
cat('computing simulated geodesic distributions...')
print(system.time(sim_geodesics <- sapply(sim_graphs,
function(g) distance_table(g)$res,
simplify = FALSE)))
print(system.time(sim_geodesics <- mclapply(sim_graphs,
function(g) distance_table(g)$res)))
maxgeodesic <- max(length(obs_geodesics),
sapply(sim_geodesics, function(v) length(v)))
cat("Max geodesic distance is ", maxgeodesic, "\n")
Expand Down

0 comments on commit 28afbf8

Please sign in to comment.