Skip to content

Commit

Permalink
modified Random and Tests. New Configuration made.
Browse files Browse the repository at this point in the history
  • Loading branch information
djuber committed Jun 7, 2012
1 parent 4381e35 commit 43972a8
Show file tree
Hide file tree
Showing 33 changed files with 110 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@ version203: spec

spec for: #'common' do: [
spec blessing: #'development'.
spec description: ''.
spec description: 'modified Random tests and fixed an error in MTGenerator
relaxed convergence bound on PoissonGenerator'.
spec author: 'DanielUber'.
spec timestamp: '6/6/2012 12:00'.
spec timestamp: '6/7/2012 14:27'.
spec
package: 'Math-Random' with: 'Math-Random-DanielUber.5';
package: 'Math-Random' with: 'Math-Random-DanielUber.6';
package: 'Math-KDTree' with: 'Math-KDTree-wernerkassens.6';
package: 'Math-ODE' with: 'Math-ODE-DanielUber.10';
package: 'Math-Complex' with: 'Math-Complex-DanielUber.6';
package: 'Math-Quaternion' with: 'Math-Quaternion-DanielUber.5';
package: 'Math-DHB-Numerical' with: 'Math-DHB-Numerical-DanielUber.19';
package: 'Math-Number-Extensions.Pharo' with: 'Math-Number-Extensions.Pharo-DanielUber.8';
package: 'Math-RandomTests' with: 'Math-RandomTests-DanielUber.4';
package: 'Math-RandomTests' with: 'Math-RandomTests-DanielUber.6';
package: 'Math-ComplexExtensions' with: 'Math-ComplexExtensions-DanielUber.1';
package: 'Math-DHB-NumericalExtensions' with: 'Math-DHB-NumericalExtensions-DanielUber.2';
package: 'Math-Extensions' with: 'Math-Extensions-DanielUber.3';
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(name 'ConfigurationOfSciSmalltalk-DanielUber.21' message 'added development version' id 'b6d83195-55f7-40ff-8b10-5f232f1761a1' date '6 June 2012' time '12:01:21.914 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.20' message 'made 1-03 stable' id '60e30bf9-2e99-46cf-95d6-60c606751abf' date '6 June 2012' time '11:49:17.017 am' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.19' message 'fixed version 1-03' id '805189c6-d9db-4f4e-8a91-625b86bddbb4' date '6 June 2012' time '11:43:44.484 am' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.18' message 'version 1.03 using new Random and RandomTests packages.Testing automatic version generation using MetacelloToolbox.' id '0958cbf7-a326-44ce-96ce-d711aaf153a6' date '6 June 2012' time '11:01:46.953 am' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.17' message 'changed bleedingEdge to use development.' id '082f9c55-8dcc-4e25-a860-06bf37cc7774' date '6 June 2012' time '10:58:05.406 am' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.16' message 'changed version 1.02 to reflect new Complex, Quaternion, and Numerical package numbers.' id 'f8b5a5fe-dec3-4e50-8a28-83d6de695fd7' date '5 June 2012' time '5:03:59.538 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.15' message 'updated package names after renaming extensions packages for Quaternion, Numerical, and Complex.' id '0cd8165d-d9e9-4364-8962-5bab5cb8d9a9' date '5 June 2012' time '4:57:50.098 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.14' message 'changed load order.' id '0b8e97a6-643c-439f-a5a9-105967bd3462' date '5 June 2012' time '4:27:20.258 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.13' message 'separated package load.' id 'a9546148-d07f-465c-9f30-753f18440cdd' date '5 June 2012' time '3:39:42.348 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.12' message 'corrected typo in bleedingEdge.' id '7f0f99d3-5579-45f3-b07c-b3a6eccdb21f' date '20 May 2012' time '2:47:13.668 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.11' message 'added bleedingEdge version and updated to version 1.01' id '7e959693-c85b-4404-96d3-6e6cde48cb78' date '20 May 2012' time '2:44:26.266 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.10' message 'modified to try to load Math-All from ss3.' id '58c70684-ae18-470a-95cc-a4d4210e951b' date '17 May 2012' time '2:19:41.766 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.9' message 'currently loading DHB-Numerical, then Complex. There is an issue where DHB-Numerical needs Complex and Quaternion due to extensions, and Complex needs DHB-Numerical due to extensions. This may take some rethinking of the package structure (or require an extensions package).' id '9f772bde-a2f4-4d3a-9902-366cb0feeaf2' date '16 May 2012' time '4:11:19.556 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.8' message 'fixed typo in baseline.' id '384b19df-693f-4625-8399-bb2d83b68f14' date '16 May 2012' time '3:52:32.332 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.7' message 'added DHB-Numerical and fixed typos. Added to default and tests.' id 'b22b3ea1-6136-4ad2-ad87-b39fcfe6fb21' date '16 May 2012' time '3:50:26.232 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.6' message 'added DHB-Numerics as a dependency for Math-Complex.' id '2eb9c399-f1a4-4d7f-893d-48d06fc55424' date '16 May 2012' time '3:45:29.334 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.5' message 'added development version' id '0af623af-81f0-47ba-89e0-cc51698b2e9c' date '16 May 2012' time '3:35:20.434 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.4' message 'fixed dependency in baseline from Example-Core to Math-Complex.' id '7c5f16b4-3bfe-43bf-8ff6-33a9682d6f73' date '16 May 2012' time '3:28:34.716 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.3' message 'added version 100' id '3aae054c-4bc9-42e2-972c-dd44b5a1c722' date '16 May 2012' time '3:26:12.942 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.2' message 'created baseline for complex.' id '0c94552e-1fa2-437f-a308-71a3b71ab8dd' date '16 May 2012' time '3:21:19.742 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.1' message 'empty configuration. First commit.' id '2b16cd0b-9384-4fe9-a139-62c2f1fb7e84' date '16 May 2012' time '2:04:26.726 pm' author 'DanielUber' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
(name 'ConfigurationOfSciSmalltalk-DanielUber.23' message 'relaxed convergence bound on PoissonGenerator' id '747d7c2f-457a-4132-a957-33750cff5d47' date '7 June 2012' time '2:27:51.162 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.22' message 'modified Random tests and fixed an error in MTGenerator' id '0f45fdc1-0c58-4010-a30e-50f0130ca821' date '7 June 2012' time '2:08:52.142 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.21' message 'added development version' id 'b6d83195-55f7-40ff-8b10-5f232f1761a1' date '6 June 2012' time '12:01:21.914 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.20' message 'made 1-03 stable' id '60e30bf9-2e99-46cf-95d6-60c606751abf' date '6 June 2012' time '11:49:17.017 am' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.19' message 'fixed version 1-03' id '805189c6-d9db-4f4e-8a91-625b86bddbb4' date '6 June 2012' time '11:43:44.484 am' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.18' message 'version 1.03 using new Random and RandomTests packages.Testing automatic version generation using MetacelloToolbox.' id '0958cbf7-a326-44ce-96ce-d711aaf153a6' date '6 June 2012' time '11:01:46.953 am' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.17' message 'changed bleedingEdge to use development.' id '082f9c55-8dcc-4e25-a860-06bf37cc7774' date '6 June 2012' time '10:58:05.406 am' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.16' message 'changed version 1.02 to reflect new Complex, Quaternion, and Numerical package numbers.' id 'f8b5a5fe-dec3-4e50-8a28-83d6de695fd7' date '5 June 2012' time '5:03:59.538 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.15' message 'updated package names after renaming extensions packages for Quaternion, Numerical, and Complex.' id '0cd8165d-d9e9-4364-8962-5bab5cb8d9a9' date '5 June 2012' time '4:57:50.098 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.14' message 'changed load order.' id '0b8e97a6-643c-439f-a5a9-105967bd3462' date '5 June 2012' time '4:27:20.258 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.13' message 'separated package load.' id 'a9546148-d07f-465c-9f30-753f18440cdd' date '5 June 2012' time '3:39:42.348 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.12' message 'corrected typo in bleedingEdge.' id '7f0f99d3-5579-45f3-b07c-b3a6eccdb21f' date '20 May 2012' time '2:47:13.668 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.11' message 'added bleedingEdge version and updated to version 1.01' id '7e959693-c85b-4404-96d3-6e6cde48cb78' date '20 May 2012' time '2:44:26.266 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.10' message 'modified to try to load Math-All from ss3.' id '58c70684-ae18-470a-95cc-a4d4210e951b' date '17 May 2012' time '2:19:41.766 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.9' message 'currently loading DHB-Numerical, then Complex. There is an issue where DHB-Numerical needs Complex and Quaternion due to extensions, and Complex needs DHB-Numerical due to extensions. This may take some rethinking of the package structure (or require an extensions package).' id '9f772bde-a2f4-4d3a-9902-366cb0feeaf2' date '16 May 2012' time '4:11:19.556 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.8' message 'fixed typo in baseline.' id '384b19df-693f-4625-8399-bb2d83b68f14' date '16 May 2012' time '3:52:32.332 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.7' message 'added DHB-Numerical and fixed typos. Added to default and tests.' id 'b22b3ea1-6136-4ad2-ad87-b39fcfe6fb21' date '16 May 2012' time '3:50:26.232 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.6' message 'added DHB-Numerics as a dependency for Math-Complex.' id '2eb9c399-f1a4-4d7f-893d-48d06fc55424' date '16 May 2012' time '3:45:29.334 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.5' message 'added development version' id '0af623af-81f0-47ba-89e0-cc51698b2e9c' date '16 May 2012' time '3:35:20.434 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.4' message 'fixed dependency in baseline from Example-Core to Math-Complex.' id '7c5f16b4-3bfe-43bf-8ff6-33a9682d6f73' date '16 May 2012' time '3:28:34.716 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.3' message 'added version 100' id '3aae054c-4bc9-42e2-972c-dd44b5a1c722' date '16 May 2012' time '3:26:12.942 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.2' message 'created baseline for complex.' id '0c94552e-1fa2-437f-a308-71a3b71ab8dd' date '16 May 2012' time '3:21:19.742 pm' author 'DanielUber' ancestors ((name 'ConfigurationOfSciSmalltalk-DanielUber.1' message 'empty configuration. First commit.' id '2b16cd0b-9384-4fe9-a139-62c2f1fb7e84' date '16 May 2012' time '2:04:26.726 pm' author 'DanielUber' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
Expand Down
2 changes: 0 additions & 2 deletions Math-Random.package/BernoulliGenerator.class/properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"category" : "Math-Random",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "<historical>",
Expand All @@ -12,5 +11,4 @@
"pools" : [
],
"super" : "NumberGenerator",
"traitcomposition" : "{}",
"type" : "normal" }
2 changes: 0 additions & 2 deletions Math-Random.package/BinomialGenerator.class/properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"category" : "Math-Random",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "<historical>",
Expand All @@ -13,5 +12,4 @@
"pools" : [
],
"super" : "NumberGenerator",
"traitcomposition" : "{}",
"type" : "normal" }
2 changes: 0 additions & 2 deletions Math-Random.package/ConstantGenerator.class/properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"category" : "Math-Random",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "SergeStinckwich 3/30/2010 15:31",
Expand All @@ -12,5 +11,4 @@
"pools" : [
],
"super" : "NumberGenerator",
"traitcomposition" : "{}",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"category" : "Math-Random",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "<historical>",
Expand All @@ -12,5 +11,4 @@
"pools" : [
],
"super" : "NumberGenerator",
"traitcomposition" : "{}",
"type" : "normal" }
2 changes: 0 additions & 2 deletions Math-Random.package/GaussianGenerator.class/properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"category" : "Math-Random",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "<historical>",
Expand All @@ -15,5 +14,4 @@
"pools" : [
],
"super" : "NumberGenerator",
"traitcomposition" : "{}",
"type" : "normal" }
2 changes: 0 additions & 2 deletions Math-Random.package/LCRandom.class/properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"category" : "Math-Random",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "hfm 3/23/2009 21:22",
Expand All @@ -12,5 +11,4 @@
"pools" : [
],
"super" : "RandomGenerator",
"traitcomposition" : "{}",
"type" : "normal" }
2 changes: 0 additions & 2 deletions Math-Random.package/LehmerRandom.class/properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"category" : "Math-Random",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "hfm 3/23/2009 21:22",
Expand All @@ -12,5 +11,4 @@
"pools" : [
],
"super" : "RandomGenerator",
"traitcomposition" : "{}",
"type" : "normal" }
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ accessing
nextFloatExcludeUpper
" Answer a random float number in the interval [ 0 , 1 ) "

^ self nextInteger * ( 1.0 / 4294967296.0 )
^ self nextInteger * ( 1.0 / (4294967296.0 * 2) )
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"category" : "Math-Random",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
"DefaultLengthVector",
"Mt19937LowerMask",
Expand All @@ -20,5 +19,4 @@
"pools" : [
],
"super" : "RandomGenerator",
"traitcomposition" : "{}",
"type" : "normal" }
2 changes: 0 additions & 2 deletions Math-Random.package/NumberGenerator.class/properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"category" : "Math-Random",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "<historical>",
Expand All @@ -12,5 +11,4 @@
"pools" : [
],
"super" : "Object",
"traitcomposition" : "{}",
"type" : "normal" }
2 changes: 0 additions & 2 deletions Math-Random.package/PMRandom.class/properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"category" : "Math-Random",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "hfm 3/24/2009 09:19",
Expand All @@ -12,5 +11,4 @@
"pools" : [
],
"super" : "RandomGenerator",
"traitcomposition" : "{}",
"type" : "normal" }
2 changes: 0 additions & 2 deletions Math-Random.package/PoissonGenerator.class/properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"category" : "Math-Random",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "<historical>",
Expand All @@ -12,5 +11,4 @@
"pools" : [
],
"super" : "NumberGenerator",
"traitcomposition" : "{}",
"type" : "normal" }
2 changes: 0 additions & 2 deletions Math-Random.package/RandomGenerator.class/properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"category" : "Math-Random",
"classinstvars" : [
],
"classtraitcomposition" : "{}",
"classvars" : [
],
"commentStamp" : "hfm 3/23/2009 21:02",
Expand All @@ -12,5 +11,4 @@
"pools" : [
],
"super" : "Object",
"traitcomposition" : "{}",
"type" : "normal" }
2 changes: 1 addition & 1 deletion Math-Random.package/monticello.meta/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(name 'Math-Random-DanielUber.5' message 'abstracted behavior in NumberGenerator. added default initializers to its subclasses.' id '2b91e54f-7d7e-48e0-ac67-77df48b8b94b' date '6 June 2012' time '10:27:36.144 am' author 'DanielUber' ancestors ((name 'Math-Random-DanielUber.4' message 'testing with changed Random-Tests and Numerical-Tests to RandomTests and NumericalTests.' id '12b1f8f5-5379-4e9c-8696-493d0c1a9766' date '22 May 2012' time '7:52:01.194 am' author 'DanielUber' ancestors ((name 'Math-Random-DanielUber.3' message 'fixed erroneous NumberGenerator new' id 'a4524802-0cf5-43aa-bdd9-426d41dda7d5' date '17 May 2012' time '1:12:34.374 pm' author 'DanielUber' ancestors ((name 'Math-Random-DanielUber.2' message 'copy to top level.' id 'a1dc3006-5ca5-4bfb-b44e-26807f9e8ece' date '17 May 2012' time '12:24:09.964 pm' author 'DanielUber' ancestors ((name 'Math-Random-DanielUber.1' message 'separated Math-Random' id 'b6f1a206-6d39-41ae-b8f9-e1213ec96f25' date '13 May 2012' time '2:48:53.132 pm' author 'DanielUber' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
(name 'Math-Random-DanielUber.6' message 'modified Random tests and fixed an error in MTGenerator' id '9e189a09-ec9a-4869-bb8e-a66dcdf063ab' date '7 June 2012' time '2:08:38.23 pm' author 'DanielUber' ancestors ((name 'Math-Random-DanielUber.5' message 'abstracted behavior in NumberGenerator. added default initializers to its subclasses.' id '2b91e54f-7d7e-48e0-ac67-77df48b8b94b' date '6 June 2012' time '10:27:36.144 am' author 'DanielUber' ancestors ((name 'Math-Random-DanielUber.4' message 'testing with changed Random-Tests and Numerical-Tests to RandomTests and NumericalTests.' id '12b1f8f5-5379-4e9c-8696-493d0c1a9766' date '22 May 2012' time '7:52:01.194 am' author 'DanielUber' ancestors ((name 'Math-Random-DanielUber.3' message 'fixed erroneous NumberGenerator new' id 'a4524802-0cf5-43aa-bdd9-426d41dda7d5' date '17 May 2012' time '1:12:34.374 pm' author 'DanielUber' ancestors ((name 'Math-Random-DanielUber.2' message 'copy to top level.' id 'a1dc3006-5ca5-4bfb-b44e-26807f9e8ece' date '17 May 2012' time '12:24:09.964 pm' author 'DanielUber' ancestors ((name 'Math-Random-DanielUber.1' message 'separated Math-Random' id 'b6f1a206-6d39-41ae-b8f9-e1213ec96f25' date '13 May 2012' time '2:48:53.132 pm' author 'DanielUber' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
tests-accessing
testProbabilityIsMutable
| g |
g := BernoulliGenerator withProbability: 0.0.
self should: [g next = 0].
self should: [g p = 0].
g p: 1.
self should: [g next = 1].
self should: [g p = 1].
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
tests
testNext10BetweenZeroAndTen
| g |
g := MersenneTwisterRandom new.
1000 timesRepeat:
[ | value |
value := g next.
self should: [value > 0].
self should: [value < 10]].
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
tests
testNextFloatExcludeUpper
"this revealed a bug in early versions, excludeUpper was producing between 0 and 2"
| g sample1 sample2 |
g := MersenneTwisterRandom new.
sample1 := Array new: 10000.
sample2 := Array new: 10000.
1 to: 10000 do:
[:i |
sample1 at: i put: g nextFloatExcludeUpper.
sample2 at: i put: (g nextFloatExcludeUpper: 2)].
self should: [sample1 max < 1].
self shouldnt: [sample1 max < 0.8].
self should: [sample2 max < 2].
self shouldnt: [sample2 max < 1.6].

This file was deleted.

This file was deleted.

Loading

0 comments on commit 43972a8

Please sign in to comment.