forked from djuber/SciSmalltalk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
werner kassens
authored and
werner kassens
committed
May 20, 2012
1 parent
2b20d6f
commit 3dd1d49
Showing
107 changed files
with
281 additions
and
16 deletions.
There are no files selected for viewing
Empty file.
7 changes: 7 additions & 0 deletions
7
Math-DHB-Numerical-Tests.package/DhbGeneticOptimizerBugsTest.class/instance/setUp.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
running | ||
setUp | ||
manager:= DhbChromosomeManager new. | ||
manager populationSize:3. | ||
function:=[:x| (x*x)sum]. | ||
optimizer:= DhbGeneticOptimizer minimizingFunction: function. | ||
optimizer chromosomeManager: manager. |
8 changes: 8 additions & 0 deletions
8
Math-DHB-Numerical-Tests.package/DhbGeneticOptimizerBugsTest.class/instance/testBug1.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
tests | ||
testBug1 | ||
|r| | ||
optimizer addPointAt: #(2 3). | ||
optimizer addPointAt: #(2 3). | ||
self shouldnt: [r:=optimizer randomScale] raise: Error. | ||
self assert: ( r first equalsTo: (1/2) ). | ||
self assert: ( r last equalsTo: 1). |
9 changes: 9 additions & 0 deletions
9
Math-DHB-Numerical-Tests.package/DhbGeneticOptimizerBugsTest.class/instance/testBug2.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
tests | ||
testBug2 | ||
|r| | ||
optimizer addPointAt: #(2 3). | ||
"i add a nan by hand here,which in a way doesnt make sense, just to get a nan result for function, but with a more complicated function it is perfectly possible for the optimizer to produce nan's by itself!" | ||
optimizer addPointAt: {Float nan. 3}. | ||
"if you inspect r here you will see that a _single nan result can _completely throw off the ga calculations" | ||
r:=optimizer randomScale. | ||
self deny: r first isNaN. |
18 changes: 18 additions & 0 deletions
18
Math-DHB-Numerical-Tests.package/DhbGeneticOptimizerBugsTest.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"category" : "Math-DHB-Numerical-Tests", | ||
"classinstvars" : [ | ||
], | ||
"classtraitcomposition" : "{}", | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "", | ||
"instvars" : [ | ||
"manager", | ||
"function", | ||
"optimizer" ], | ||
"name" : "DhbGeneticOptimizerBugsTest", | ||
"pools" : [ | ||
], | ||
"super" : "TestCase", | ||
"traitcomposition" : "{}", | ||
"type" : "normal" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
(name 'Math-DHB-Numerical-Tests-DanielUber.2' message 'Added test for error function.' id 'e6f4289a-c43c-47c4-81eb-6d901a5836df' date '16 May 2012' time '6:30:38.226 pm' author 'DanielUber' ancestors ((name 'Math-DHB-Numerical-Tests-DanielUber.1' message 'Separated Tests for DHB-Numerical' id 'b6966300-8c7d-436f-bf71-17678b24dc4d' date '13 May 2012' time '3:22:54.348 pm' author 'DanielUber' ancestors () stepChildren ())) stepChildren ()) | ||
(name 'Math-DHB-Numerical-Tests-wernerkassens.3' message 'tests for ga bugs added' id 'a9c17777-9c22-4bf8-9c81-44ca2ffbdb84' date '20 May 2012' time '1:44:47.27 pm' author 'wernerkassens' ancestors ((name 'Math-DHB-Numerical-Tests-DanielUber.2' message 'Added test for error function.' id 'e6f4289a-c43c-47c4-81eb-6d901a5836df' date '16 May 2012' time '6:30:38.226 pm' author 'DanielUber' ancestors ((name 'Math-DHB-Numerical-Tests-DanielUber.1' message 'Separated Tests for DHB-Numerical' id 'b6966300-8c7d-436f-bf71-17678b24dc4d' date '13 May 2012' time '3:22:54.348 pm' author 'DanielUber' ancestors () stepChildren ())) stepChildren ())) stepChildren ()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.