1 disp('testing propagation forward')
10 distance(:,:,a,b)=norm([a-2,b-2]);
17 [t,d]=propagate_init(tign,distance);
18 [t,d]=propagate(t,d,1,fire_area,fire_mask,distance,ros,time_end,0);
20 [t,d]=propagate_init(tign,distance);
23 time_end_part=time_end*i/mx;
24 [t,d]=propagate(t,d,1,fire_area,fire_mask,distance,ros,time_end_part,0);
27 err=norm(tign1-tign2,1)
29 disp('testing propagation back')
32 tign=100*ones(m,n); tign(:,1)=1; tign(:,end)=1; tign(1,:)=1;tign(end,:)=1;
35 [t,d]=propagate_init(tign,distance);
36 [t,d]=propagate(t,d,dir,fire_area,fire_mask,distance,ros,time_end,0);
38 [t,d]=propagate_init(tign,distance);
41 time_end_part=time_end*i/mx;
42 [t,d]=propagate(t,d,dir,fire_area,fire_mask,distance,ros,time_end_part,0);
45 err=norm(tign1-tign2,1)
47 disp('testing propagation from fire_area both ways')
48 [i,j]=ndgrid(1:m,1:n);
49 fire_area=(i-6).^2+(j-6).^2<10;
52 [tign,fire_mask_out,fire_mask_in]=initial_tign(fire_area,time_now,time_end)
54 [t,d]=propagate_init(tign,distance);
55 [t,d]=propagate(t,d,1,~fire_area,fire_mask_out,distance,ros,max(tign(:)),0);
58 [t,d]=propagate_init(tign,distance);
59 [t,d]=propagate(t,d,-1,fire_area,fire_mask_in,distance,ros,min(tign(:)),0);