Get Data for Circle (CX,CY,radius)
Naive algorithm
POP=0
CASES=0
do i=1,n
dis=sqrt((x(i)-CX)**2+(y(i)-CY)**2+0.001)
if(dis.LE.radius)then
POP=POP+p(i)
CASES=CASES+c(i)
endif
enddo
If radii=1 to 50, UK map area, and n=145 000 then
3, 335, 000, 000, 000
DO LOOP executions = 8 days!
Previous slide
Next slide
Back to first slide
View graphic version