Skip to content

Commit

Permalink
ga corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
werner kassens authored and werner kassens committed May 20, 2012
1 parent 2b20d6f commit 3dd1d49
Show file tree
Hide file tree
Showing 107 changed files with 281 additions and 16 deletions.
Empty file.
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.
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).
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.
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" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"category" : "Math-DHB-Numerical-Tests",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "",
Expand All @@ -11,4 +12,5 @@
"pools" : [
],
"super" : "TestCase",
"traitcomposition" : "{}",
"type" : "normal" }
2 changes: 1 addition & 1 deletion Math-DHB-Numerical-Tests.package/monticello.meta/version
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 ())
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"category" : "Math-DHB-Numerical",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "",
Expand All @@ -11,4 +12,5 @@
"pools" : [
],
"super" : "Object",
"traitcomposition" : "{}",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"category" : "Math-DHB-Numerical",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "",
Expand All @@ -13,4 +14,5 @@
"pools" : [
],
"super" : "DhbProbabilityDensity",
"traitcomposition" : "{}",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"category" : "Math-DHB-Numerical",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "",
Expand All @@ -16,4 +17,5 @@
"pools" : [
],
"super" : "DhbProbabilityDensity",
"traitcomposition" : "{}",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"category" : "Math-DHB-Numerical",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "",
Expand All @@ -12,4 +13,5 @@
"pools" : [
],
"super" : "DhbFunctionalIterator",
"traitcomposition" : "{}",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"category" : "Math-DHB-Numerical",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "",
Expand All @@ -11,4 +12,5 @@
"pools" : [
],
"super" : "DhbNevilleInterpolator",
"traitcomposition" : "{}",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"category" : "Math-DHB-Numerical",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "",
Expand All @@ -12,4 +13,5 @@
"pools" : [
],
"super" : "DhbProbabilityDensity",
"traitcomposition" : "{}",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"category" : "Math-DHB-Numerical",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "",
Expand All @@ -11,4 +12,5 @@
"pools" : [
],
"super" : "DhbGammaDistribution",
"traitcomposition" : "{}",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"category" : "Math-DHB-Numerical",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "",
Expand All @@ -14,4 +15,5 @@
"pools" : [
],
"super" : "Object",
"traitcomposition" : "{}",
"type" : "normal" }
2 changes: 2 additions & 0 deletions Math-DHB-Numerical.package/DhbCluster.class/properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"category" : "Math-DHB-Numerical",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "",
Expand All @@ -12,4 +13,5 @@
"pools" : [
],
"super" : "Object",
"traitcomposition" : "{}",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"category" : "Math-DHB-Numerical",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "",
Expand All @@ -13,4 +14,5 @@
"pools" : [
],
"super" : "DhbIterativeProcess",
"traitcomposition" : "{}",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"category" : "Math-DHB-Numerical",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
"UniqueInstance" ],
"commentStamp" : "",
Expand All @@ -14,4 +15,5 @@
"pools" : [
],
"super" : "Object",
"traitcomposition" : "{}",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"category" : "Math-DHB-Numerical",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "",
Expand All @@ -12,4 +13,5 @@
"pools" : [
],
"super" : "DhbInfiniteSeries",
"traitcomposition" : "{}",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"category" : "Math-DHB-Numerical",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "",
Expand All @@ -11,4 +12,5 @@
"pools" : [
],
"super" : "DhbVectorAccumulator",
"traitcomposition" : "{}",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"category" : "Math-DHB-Numerical",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "",
Expand All @@ -11,4 +12,5 @@
"pools" : [
],
"super" : "DhbCluster",
"traitcomposition" : "{}",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"category" : "Math-DHB-Numerical",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
"Digits" ],
"commentStamp" : "",
Expand All @@ -12,4 +13,5 @@
"pools" : [
],
"super" : "Object",
"traitcomposition" : "{}",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"category" : "Math-DHB-Numerical",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
"UniqueInstance" ],
"commentStamp" : "<historical>",
Expand All @@ -13,4 +14,5 @@
"pools" : [
],
"super" : "Object",
"traitcomposition" : "{}",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"category" : "Math-DHB-Numerical",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "",
Expand All @@ -11,4 +12,5 @@
"pools" : [
],
"super" : "DhbPolynomial",
"traitcomposition" : "{}",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"category" : "Math-DHB-Numerical",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "",
Expand All @@ -11,4 +12,5 @@
"pools" : [
],
"super" : "DhbCluster",
"traitcomposition" : "{}",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"category" : "Math-DHB-Numerical",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "",
Expand All @@ -11,4 +12,5 @@
"pools" : [
],
"super" : "DhbProbabilityDensity",
"traitcomposition" : "{}",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"category" : "Math-DHB-Numerical",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "",
Expand All @@ -11,4 +12,5 @@
"pools" : [
],
"super" : "DhbStatisticalMoments",
"traitcomposition" : "{}",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"category" : "Math-DHB-Numerical",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "",
Expand All @@ -16,4 +17,5 @@
"pools" : [
],
"super" : "DhbProbabilityDensity",
"traitcomposition" : "{}",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"category" : "Math-DHB-Numerical",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "",
Expand All @@ -12,4 +13,5 @@
"pools" : [
],
"super" : "DhbProbabilityDensity",
"traitcomposition" : "{}",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"category" : "Math-DHB-Numerical",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "",
Expand All @@ -11,4 +12,5 @@
"pools" : [
],
"super" : "DhbStatisticalMoments",
"traitcomposition" : "{}",
"type" : "normal" }
Loading

0 comments on commit 3dd1d49

Please sign in to comment.