We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f55ac72 commit c6739f2Copy full SHA for c6739f2
GeneticAlgorithm.php
@@ -84,6 +84,9 @@ public function calcFitness(){
84
}
85
86
87
+ public function maxFitness() {
88
+ return $this->max_fitness;
89
+ }
90
public function calcProbability(){
91
$sum = 0;
92
for ($i=0;$i<5;$i++) {
index.php
@@ -11,4 +11,7 @@
11
12
require_once "GeneticAlgorithm.php";
13
14
-$ga = new GeneticAlgorithm();
+$ga = new GeneticAlgorithm();
15
+echo "<br>";
16
+$result = $ga->maxFitness();
17
+echo count($result);
0 commit comments