function Xsel=selection(X)  // selection par le rang
[Npop,n2]=size(X);
[y,k]=sort(X(:,$))  
X=X(k,:);  
p=1:Npop;
roulette=cumsum(p)/sum(p);
Xsel=[];
for i=1:Npop
  u=rand();
  w=find(u<roulette);
  n1=w(1);
  xsel=X(n1,:);
  Xsel=[Xsel;xsel}
end  
endfunction
////////////////////////////////// 
function xcrois=croisement(x)
// x: 2 lignes
xcrois=x;
u=rand();
xcrois(1,:)=u*x(1,:)+(1-u)*x(2,:);
xcrois(2,:)=(1-u)*x(1,:)+u*x(2,:);
endfunction
//////////////////////////////////
function xmut=mutation(x)
// x: 1 ligne
u=rand(1,1,'n');
sigma=0.01;
xmut=x+sigma*u;
endfunction
////////////////////////////////
