forked fromahmedfgad/GeneticAlgorithmPython
- Notifications
You must be signed in to change notification settings - Fork0
Commitf98f0c9
committed
Fix a typo in example_custom_operators
In the crossover function, the split point is chosen in the range of theoffspring size, instead of the solution size.An out-of-range split point is silently ignored by the range selection:it selects all genes from parent1, and none from parent2.However, the error can be demonstrated by throwing an exception if thesplit point is out of range.1 parent8024132 commitf98f0c9
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
44 |
| - | |
| 44 | + | |
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
|
0 commit comments
Comments
(0)