Skip to content

Commit

Permalink
fixed simulation index allocation bug, closes #89
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwlambert committed Mar 11, 2024
1 parent 7b9a2d5 commit 6161e1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/sim_network_bp.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
which.min(generation):(which.min(generation) + contacts[i] - 1)

# grow vectors if idx exceeds length
if (max(vec_idx) > length(generation)) {
if (max(vec_idx) >= length(generation)) {
ancestor <- c(ancestor, vector(mode = "integer", 1e5))
generation <- c(generation, vector(mode = "integer", 1e5))
infected <- c(infected, vector(mode = "integer", 1e5))
Expand Down

0 comments on commit 6161e1e

Please sign in to comment.