File tree 8 files changed +41
-6
lines changed
8 files changed +41
-6
lines changed Original file line number Diff line number Diff line change 20
20
with :
21
21
python-version : ' 3.10'
22
22
23
+ - name : Install Dependencies
24
+ run : |
25
+ python -m pip install --upgrade pip
26
+ pip install -r requirements.txt
27
+
23
28
- name : Build PyGAD from the Repository
24
29
run : |
25
30
python3 -m pip install --upgrade build
Original file line number Diff line number Diff line change 20
20
with :
21
21
python-version : ' 3.11'
22
22
23
+ - name : Install Dependencies
24
+ run : |
25
+ python -m pip install --upgrade pip
26
+ pip install -r requirements.txt
27
+
23
28
- name : Build PyGAD from the Repository
24
29
run : |
25
30
python3 -m pip install --upgrade build
Original file line number Diff line number Diff line change 28
28
with :
29
29
python-version : ' 3.12.0-beta.2'
30
30
31
+ - name : Install Dependencies
32
+ run : |
33
+ python -m pip install --upgrade pip
34
+ pip install -r requirements.txt
35
+
31
36
- name : Build PyGAD from the Repository
32
37
run : |
33
38
python3 -m pip install --upgrade build
Original file line number Diff line number Diff line change 20
20
with :
21
21
python-version : ' 3.7'
22
22
23
+ - name : Install Dependencies
24
+ run : |
25
+ python -m pip install --upgrade pip
26
+ pip install -r requirements.txt
27
+
23
28
- name : Build PyGAD from the Repository
24
29
run : |
25
30
python3 -m pip install --upgrade build
Original file line number Diff line number Diff line change 20
20
with :
21
21
python-version : ' 3.8'
22
22
23
+ - name : Install Dependencies
24
+ run : |
25
+ python -m pip install --upgrade pip
26
+ pip install -r requirements.txt
27
+
23
28
- name : Build PyGAD from the Repository
24
29
run : |
25
30
python3 -m pip install --upgrade build
Original file line number Diff line number Diff line change 20
20
with :
21
21
python-version : ' 3.9'
22
22
23
+ - name : Install Dependencies
24
+ run : |
25
+ python -m pip install --upgrade pip
26
+ pip install -r requirements.txt
27
+
23
28
- name : Build PyGAD from the Repository
24
29
run : |
25
30
python3 -m pip install --upgrade build
Original file line number Diff line number Diff line change 4
4
5
5
Check documentation of the [ PyGAD] ( https://pygad.readthedocs.io/en/latest ) .
6
6
7
- [](https://pepy.tech/project/pygad) [](https://badge.fury.io/py/pygad)  [](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/main_py311.yml) [](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/main_py310.yml) [](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/main_py39.yml) [](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/main_py38.yml) [](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/main_py37.yml) [](https://opensource.org/licenses/BSD-3-Clause) [](https://hosted.weblate.org/engage/weblate/) [](https://api.reuse.software/info/github.com/WeblateOrg/weblate)
7
+ [](https://pepy.tech/project/pygad) [](https://badge.fury.io/py/pygad)  [](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/main_py311.yml) [](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/main_py310.yml) [](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/main_py39.yml) [](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/main_py38.yml) [](https://github.com/ahmedfgad/GeneticAlgorithmPython/actions/workflows/main_py37.yml) [](https://opensource.org/licenses/BSD-3-Clause) [](https://hosted.weblate.org/engage/weblate/) [](https://api.reuse.software/info/github.com/WeblateOrg/weblate)[](
8
+ https://stackoverflow.com/questions/tagged/pygad)[![OpenSSF Scorecard] ( https://api.securityscorecards.dev/projects/github.com/ahmedfgad/GeneticAlgorithmPython/badge )] ( https://securityscorecards.dev/viewer/?uri=github.com/ahmedfgad/GeneticAlgorithmPython )
8
9
9
10
![ PYGAD-LOGO] ( https://user-images.githubusercontent.com/16560492/101267295-c74c0180-375f-11eb-9ad0-f8e37bd796ce.png )
10
11
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