PopulationResize Method (Int32, ISelectionMethod)
public void Resize( int newPopulationSize, ISelectionMethod membersSelector )
Public Sub Resize ( newPopulationSize As Integer, membersSelector As ISelectionMethod )
|Too small population's size was specified. The exception is thrown in the case if newPopulationSize is smaller than 2.|
The method does resizing of population. In the case if population should grow, it just adds missing number of random members. In the case if population should get smaller, the specified selection method is used to reduce the population.