File tree 1 file changed +9
-5
lines changed 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,15 @@ def __init__():
13
13
def single_point_crossover (self , parents , offspring_size ):
14
14
15
15
"""
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.
21
25
"""
22
26
23
27
if self .gene_type_single == True :
You can’t perform that action at this time.
0 commit comments