Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let rec CFC2(x,G,T,temps,nb,P,nb_sommet,R,statut,D)=
- temps:=!temps+1 ; D.(x) <- !temps ; statut.(x) <- 1;
- R.(x) <- D.(x); P := x::(!P);
- let H=G.(x) in
- for j=0 to (vect_length G) -1 do
- if (H.(j) = 1) then
- if Couleur.(j) = 0 then
- begin CFC2(j,G,T,temps,nb,P,nb_sommet,R,statut,D);
- R.(x) <- min R.(x) R.(j) end
- else
- if D.(j) < D.(x) && (appartient j !P) then
- R.(x) <- min R.(x) D.(j); done;
- temps:=!temps+1;
- if R.(x)=D.(x) then
- begin nb:=!nb+1;
- while ((!P != []) && (D.(hd(!P)) >= D.(x))) do
- let y=hd(!P) in P:=tl(!P) ; T.(y) <- !nb done end;;
Add Comment
Please, Sign In to add comment