JuliaDynamics / Agents.jl

Agent-based modeling framework in Julia
https://juliadynamics.github.io/Agents.jl/stable/
MIT License
725 stars 117 forks source link

improve random_empty #852

Closed Tortar closed 1 year ago

Tortar commented 1 year ago

The cutoff value is an implementation detail and shouldn't be mentioned in the docstring (we could even remove the argument in a future release, but this is breaking so didn't do that here). Also the rare switch to the filtering can be made faster by using the reservoir technique.

Just to let you know, an improved strategy to choose the cutoff is described at https://github.com/projectmesa/mesa/pull/1565

codecov-commenter commented 1 year ago

Codecov Report

Merging #852 (ed5af7e) into main (58b2993) will increase coverage by 0.02%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #852      +/-   ##
==========================================
+ Coverage   70.67%   70.70%   +0.02%     
==========================================
  Files          42       42              
  Lines        2766     2765       -1     
==========================================
  Hits         1955     1955              
+ Misses        811      810       -1     
Files Changed Coverage Δ
src/spaces/discrete.jl 98.79% <100.00%> (+1.17%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more