You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/md/pygad.md
+29-27Lines changed: 29 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,33 @@ If the 2 parameters `mutation_type` and `crossover_type` are `None`, this disabl
64
64
65
65
The parameters are validated by calling the `validate_parameters()` method of the `utils.validation.Validation` class within the constructor. If at least a parameter is not correct, an exception is thrown and the `valid_parameters` attribute is set to `False`.
66
66
67
+
# Extended Classes
68
+
69
+
To make the library modular and structured, different scripts are created where each script has one or more classes. Each class has its own objective.
70
+
71
+
This is the list of scripts and classes within them where the `pygad.GA` class extends:
72
+
73
+
1.`utils/engine.py`:
74
+
1.`utils.engine.GAEngine`:
75
+
2.`utils/validation.py`
76
+
1.`utils.validation.Validation`
77
+
3.`utils/parent_selection.py`
78
+
1.`utils.parent_selection.ParentSelection`
79
+
4.`utils/crossover.py`
80
+
1.`utils.crossover.Crossover`
81
+
5.`utils/mutation.py`
82
+
1.`utils.mutation.Mutation`
83
+
6.`utils/nsga2.py`
84
+
1.`utils.nsga2.NSGA2`
85
+
7.`helper/unique.py`
86
+
1.`helper.unique.Unique`
87
+
8.`helper/misc.py`
88
+
1.`helper.misc.Helper`
89
+
9.`visualize/plot.py`
90
+
1.`visualize.plot.Plot`
91
+
92
+
Since the `pygad.GA` class extends such classes, the attributes and methods inside them can be retrieved by instances of the `pygad.GA` class.
93
+
67
94
## Class Attributes
68
95
69
96
*`supported_int_types`: A list of the supported types for the integer numbers.
@@ -76,6 +103,8 @@ All the parameters and functions passed to the `pygad.GA` class constructor are
76
103
77
104
The next 2 subsections list such attributes and methods.
78
105
106
+
> The `GA` class gains the attributes of its parent classes via inheritance, making them accessible through the `GA` object even if they are defined externally to its specific class body.
107
+
79
108
### Other Attributes
80
109
81
110
-`generations_completed`: Holds the number of the last completed generation.
@@ -142,33 +171,6 @@ Accepts the following parameter:
142
171
143
172
Returns the genetic algorithm instance.
144
173
145
-
# Extended Classes
146
-
147
-
To make the library modular and structured, different scripts are created where each script has one or more classes. Each class has its own objective.
148
-
149
-
This is the list of scripts and classes within them where the `pygad.GA` class extends:
150
-
151
-
1.`utils/engine.py`:
152
-
1.`utils.engine.GAEngine`:
153
-
2.`utils/validation.py`
154
-
1.`utils.validation.Validation`
155
-
3.`utils/parent_selection.py`
156
-
1.`utils.parent_selection.ParentSelection`
157
-
4.`utils/crossover.py`
158
-
1.`utils.crossover.Crossover`
159
-
5.`utils/mutation.py`
160
-
1.`utils.mutation.Mutation`
161
-
6.`utils/nsga2.py`
162
-
1.`utils.nsga2.NSGA2`
163
-
7.`helper/unique.py`
164
-
1.`helper.unique.Unique`
165
-
8.`helper/misc.py`
166
-
1.`helper.misc.Helper`
167
-
9.`visualize/plot.py`
168
-
1.`visualize.plot.Plot`
169
-
170
-
Since the `pygad.GA` class extends such classes, the attributes and methods inside them can be retrieved by instances of the `pygad.GA` class.
171
-
172
174
# Steps to Use `pygad`
173
175
174
176
To use the `pygad` module, here is a summary of the required steps:
0 commit comments