File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,15 @@ def __init__():
1313 def single_point_crossover (self , parents , offspring_size ):
1414
1515 """
16- Applies the single-point crossover. It selects a point randomly at which crossover takes place between the pairs of parents.
17- It accepts 2 parameters:
18- -parents: The parents to mate for producing the offspring.
19- -offspring_size: The size of the offspring to produce.
20- It returns an array the produced offspring.
16+ Applies single-point crossover between pairs of parents.
17+ This function selects a random point at which crossover occurs between the parents, generating offspring.
18+
19+ Parameters:
20+ parents (array-like): The parents to mate for producing the offspring.
21+ offspring_size (int): The number of offspring to produce.
22+
23+ Returns:
24+ array-like: An array containing the produced offspring.
2125 """
2226
2327 if self .gene_type_single == True :
You can’t perform that action at this time.
0 commit comments