best_elitism
PURPOSE 
[NewPop,NewFunVal] = best_elistism(Pop,SelPop,SampledPop,FunVal,SelFunVal,SampledFunVal,replacement_params)
SYNOPSIS 
function [NewPop,NewFunVal] = best_elistism(Pop,SelPop,SampledPop,FunVal,SelFunVal,SampledFunVal,replacement_params)
DESCRIPTION 
CROSS-REFERENCE INFORMATION 
This function calls:
This function is called by:
SOURCE CODE 
0001 function [NewPop,NewFunVal] = best_elistism(Pop,SelPop,SampledPop,FunVal,SelFunVal,SampledFunVal,replacement_params)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 find_bestinds_method = char(cellstr(replacement_params{1,1}));
0020 PopSize = size(Pop,1);
0021 SelPopSize = size(SelPop,1);
0022 SampledPopSize = size(SampledPop,1);
0023
0024 AuxPopSize = PopSize - SelPopSize;
0025
0026 [Ind] = eval([find_bestinds_method,'(SampledPop,SampledFunVal)']);
0027 Ind = Ind(1:AuxPopSize);
0028
0029 NewPop(1:AuxPopSize,:) = SampledPop(Ind,:);
0030 NewFunVal(1:AuxPopSize,:) = SampledFunVal(Ind,:);
0031
0032 NewPop(AuxPopSize+1:PopSize,:) = SelPop;
0033 NewFunVal(AuxPopSize+1:PopSize,:) = SelFunVal;
0034
0035
0036 return
0037
0038
0039
Generated on Fri 04-Dec-2009 13:38:29 by m2html © 2003