1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
| let poisson k =
let j = ref 0 and
a = [|int(400);int(400)|] and
p = make_vect 260 0 in
for i = 0 to 19 do
p.(13*i)<- int(400);
p.(13*i+1)<- int(400);
p.(13*i+4)<- float(30.)*.((-1.)**.(( float_of_int(int(2))));
p.(13*i+5)<- float(30.)*.((-1.)**.(( float_of_int(int(2))));
p.(13*i+6)<- float(30.)*.((-1.)**.(( float_of_int(int(2))));
p.(13*i+7)<- float(30.)*.((-1.)**.(( float_of_int(int(2))));
p.(13*i+8)<- float(30.)*.((-1.)**.(( float_of_int(int(2))));
p.(13*i+9)<- float(30.)*.((-1.)**.(( float_of_int(int(2))));
p.(13*i+10)<- float(30.)*.((-1.)**.(( float_of_int(int(2))));
p.(13*i+11)<- float(30.)*.((-1.)**.(( float_of_int(int(2))));
done; "probleme ici a l execution"
while !j < k do
if !j > 0 then if !j mod 40 = 0 then
let z = ref 0 and r = ref 0 in
while !z < 5 do
for i = 0 to 19 do
let c = ref 0 in
if p.(13*i+12)= !r then for g = 4 to 11 do c:= 0 ;
for m = 0 to 19 do c := !c +. p.(13*m+12) *. p.(13*m+g)
done;
p.(13*i+g)<-!c /. 40. +. float(1.) -. float(1.) ;
done;
p.(13*i+12)<- 0 ;
z:= !z + 1 ;
done;
r:= !r + 1 ;
done ;
for i = 0 to 19 do
if p.(13*i)=a.(0) then if p.(13*i+1)=a.(1) then p.(13*i+12)<-1+p.(13*i+12);
a = [|int(400);int(400)|];
j:=!j+1 ;
done;
for i = 0 to 19 do
p.(13*i)<-p.(13*i)+ int_of_float(p.(13*i+2));
p.(13*i+1)<-p.(13*i+1)+ int_of_float(p.(13*i+3));
p.(13*i+2)<-p.(13*i+2) +. p.(13*i+2) *. p.(13*i+4) + p.(13*i+2) *. p.(13*i+2) *. p.(13*i+5) + (a.(0) -. p.(13*i)) *. p.(13*i+6) + ((a.(0) -. p.(13*i))**.2)*. p.(13*i+7);
p.(13*i+3)<-p.(13*i+3) +. p.(13*i+3) *. p.(13*i+8) + p.(13*i+3) *. p.(13*i+3) *. p.(13*i+9) + (a.(1) -. p.(13*i+1)) *. p.(13*i+10) + ((a.(1) -. p.(13*i+1))**.2)*. p.(13*i+11);
done;
done;
p;; |
Partager