From 05f55989778e8ed3aab75bfd7f099b20249be0ab Mon Sep 17 00:00:00 2001 From: Serge Stinckwich Date: Wed, 18 Apr 2012 18:44:35 +0700 Subject: [PATCH] New version --- .filetree | 2 +- Math.package/.filetree | 4 ++++ .../BinomialGenerator.class/README.md | 0 .../instance/generator..st | 3 +++ .../BinomialGenerator.class/instance/n..st | 3 +++ .../BinomialGenerator.class/instance/next.st | 5 ++-- .../BinomialGenerator.class/instance/p..st | 3 +++ .../BinomialGenerator.class/properties.json | 18 ++++++++++++++ .../BinomialGeneratorTest.class/README.md | 0 ...babilityOfOneAlwaysReturnNumberOfTrials.st | 5 ++-- .../properties.json | 16 +++++++++++++ .../ConstantGenerator.class/README.md | 1 + .../instance/constant..st | 3 +++ .../ConstantGenerator.class/instance/next.st | 3 +++ .../ConstantGenerator.class/properties.json | 16 +++++++++++++ .../ConstantGeneratorTest.class/README.md | 0 ...tantGeneratorGenerateAlwaysTheSameValue.st | 5 ++-- .../properties.json | 16 +++++++++++++ .../GaussianGenerator.class/README.md | 0 .../instance/generator..st | 3 +++ .../instance/initialize.st | 3 +++ .../GaussianGenerator.class/instance/mean..st | 3 +++ .../GaussianGenerator.class/instance/next.st | 3 +++ .../instance/nextGaussianNormalized.st | 5 ++-- .../instance/standardDeviation..st | 3 +++ .../GaussianGenerator.class/properties.json | 20 ++++++++++++++++ .../GaussianGeneratorTest.class/README.md | 0 ...ctedMeans.andExpectedStandardDeviation..st | 5 ++-- .../instance/testDistribution.st | 5 ++-- .../properties.json | 16 +++++++++++++ Math.package/LCRandom.class/README.md | 3 +++ .../LCRandom.class/instance/initialize.st | 3 +++ .../LCRandom.class/instance/next.st | 5 ++-- .../LCRandom.class/instance/nextFloat.st | 5 ++-- .../LCRandom.class/instance/peek.st | 5 ++-- .../LCRandom.class/instance/peekSeed.st | 5 ++-- Math.package/LCRandom.class/instance/zork.st | 3 +++ Math.package/LCRandom.class/properties.json | 16 +++++++++++++ Math.package/LCRandomTest.class/README.md | 0 .../testPeekAlwaysReplyTheSameValue.st | 5 ++++ .../LCRandomTest.class/properties.json | 16 +++++++++++++ Math.package/LehmerRandom.class/README.md | 3 +++ .../LehmerRandom.class/instance/initialize.st | 3 +++ .../LehmerRandom.class/instance/next.st | 5 ++-- .../LehmerRandom.class/instance/nextFloat.st | 5 ++-- .../LehmerRandom.class/instance/peek.st | 5 ++++ .../LehmerRandom.class/instance/peekSeed.st | 5 ++-- .../LehmerRandom.class/properties.json | 16 +++++++++++++ Math.package/LehmerRandomTest.class/README.md | 0 .../testPeekAlwaysReplyTheSameValue.st | 5 ++++ .../LehmerRandomTest.class/properties.json | 16 +++++++++++++ .../MersenneTwisterRandom.class/README.md | 8 +++++++ .../class/initialize.st | 4 +--- .../instance/initialize.st | 4 +--- .../instance/next.st | 4 +--- .../instance/nextFloat..st | 5 ++-- .../instance/nextFloat.st | 5 ++++ .../instance/nextFloatExcludeUpper..st | 5 ++-- .../instance/nextFloatExcludeUpper.st | 5 ++++ .../instance/nextInteger.st | 5 ++-- .../properties.json | 24 +++++++++++++++++++ .../MersenneTwisterRandomTest.class/README.md | 0 .../testPeekAlwaysReplyTheSameValue.st | 5 ++++ .../properties.json | 16 +++++++++++++ Math.package/NumberGenerator.class/README.md | 0 .../NumberGenerator.class/instance/next.st | 3 +++ .../NumberGenerator.class/properties.json | 16 +++++++++++++ Math.package/PMRandom.class/README.md | 3 +++ .../PMRandom.class/instance/initialize.st | 3 +++ .../PMRandom.class/instance/next.st | 5 ++-- .../PMRandom.class/instance/nextFloat.st | 5 ++-- .../PMRandom.class/instance/peek.st | 4 +--- .../PMRandom.class/instance/peekSeed.st | 4 +--- .../PMRandom.class/instance/seed..st | 4 +--- Math.package/PMRandom.class/properties.json | 16 +++++++++++++ Math.package/PoissonGenerator.class/README.md | 0 .../PoissonGenerator.class/properties.json | 16 +++++++++++++ .../RandomGenerator.class/README.md | 9 ------- .../class/chiSquare.repeating..st | 4 +--- .../RandomGenerator.class/class/new.st | 5 ++++ .../RandomGenerator.class/class/seed..st | 5 ++++ .../RandomGenerator.class/instance/atEnd.st | 4 +--- .../instance/contents.st | 4 +--- .../instance/initialize.st | 5 ++++ .../instance/isReadable.st | 4 +--- .../instance/isWriteable.st | 4 +--- .../RandomGenerator.class/instance/next..st | 4 +--- .../RandomGenerator.class/instance/next.st | 5 ++++ .../RandomGenerator.class/instance/peek.st | 5 ++-- .../RandomGenerator.class/instance/seed..st | 5 ++-- .../RandomGenerator.class/instance/seed.st | 5 ++-- .../RandomGenerator.class/properties.json | 16 +++++++++++++ .../monticello.meta}/categories.st | 0 Math.package/monticello.meta/initializers.st | 0 .../monticello.meta}/package | 0 Math.package/monticello.meta/version | 1 + Math.package/properties.json | 2 ++ Math.pkg/.filetree | 4 ---- .../BinomialGenerator.st | 6 ----- .../instance/generator:.st | 4 ---- .../BinomialGenerator.class/instance/n:.st | 4 ---- .../BinomialGenerator.class/instance/p:.st | 4 ---- .../BinomialGeneratorTest.st | 6 ----- .../ConstantGenerator.st | 9 ------- .../instance/constant:.st | 4 ---- .../ConstantGenerator.class/instance/next.st | 4 ---- .../ConstantGeneratorTest.st | 6 ----- .../GaussianGenerator.st | 6 ----- .../instance/generator:.st | 4 ---- .../instance/initialize.st | 4 ---- .../GaussianGenerator.class/instance/mean:.st | 4 ---- .../GaussianGenerator.class/instance/next.st | 4 ---- .../instance/standardDeviation:.st | 4 ---- .../GaussianGeneratorTest.st | 6 ----- .../classes/LCRandom.class/LCRandom.st | 11 --------- .../LCRandom.class/instance/initialize.st | 4 ---- .../LCRandomTest.class/LCRandomTest.st | 6 ----- .../testPeekAlwaysReplyTheSameValue.st | 6 ----- .../LehmerRandom.class/LehmerRandom.st | 11 --------- .../LehmerRandom.class/instance/initialize.st | 4 ---- .../LehmerRandom.class/instance/peek.st | 6 ----- .../LehmerRandomTest.st | 6 ----- .../testPeekAlwaysReplyTheSameValue.st | 6 ----- .../MersenneTwisterRandom.st | 17 ------------- .../instance/nextFloat.st | 6 ----- .../instance/nextFloatExcludeUpper.st | 6 ----- .../MersenneTwisterRandomTest.st | 6 ----- .../testPeekAlwaysReplyTheSameValue.st | 6 ----- .../NumberGenerator.class/NumberGenerator.st | 6 ----- .../NumberGenerator.class/instance/next.st | 4 ---- .../classes/PMRandom.class/PMRandom.st | 11 --------- .../PMRandom.class/instance/initialize.st | 4 ---- .../PoissonGenerator.st | 6 ----- .../RandomGenerator.class/class/new.st | 6 ----- .../RandomGenerator.class/class/seed:.st | 6 ----- .../instance/initialize.st | 6 ----- .../RandomGenerator.class/instance/next.st | 6 ----- Math.pkg/version | 1 - 138 files changed, 445 insertions(+), 349 deletions(-) create mode 100644 Math.package/.filetree rename Math.pkg/initializers.st => Math.package/BinomialGenerator.class/README.md (100%) create mode 100644 Math.package/BinomialGenerator.class/instance/generator..st create mode 100644 Math.package/BinomialGenerator.class/instance/n..st rename {Math.pkg/snapshot/classes => Math.package}/BinomialGenerator.class/instance/next.st (55%) create mode 100644 Math.package/BinomialGenerator.class/instance/p..st create mode 100644 Math.package/BinomialGenerator.class/properties.json create mode 100644 Math.package/BinomialGeneratorTest.class/README.md rename {Math.pkg/snapshot/classes => Math.package}/BinomialGeneratorTest.class/instance/testBinomialGeneratorWithSuccessProbabilityOfOneAlwaysReturnNumberOfTrials.st (80%) create mode 100644 Math.package/BinomialGeneratorTest.class/properties.json create mode 100644 Math.package/ConstantGenerator.class/README.md create mode 100644 Math.package/ConstantGenerator.class/instance/constant..st create mode 100644 Math.package/ConstantGenerator.class/instance/next.st create mode 100644 Math.package/ConstantGenerator.class/properties.json create mode 100644 Math.package/ConstantGeneratorTest.class/README.md rename {Math.pkg/snapshot/classes => Math.package}/ConstantGeneratorTest.class/instance/testConstantGeneratorGenerateAlwaysTheSameValue.st (61%) create mode 100644 Math.package/ConstantGeneratorTest.class/properties.json create mode 100644 Math.package/GaussianGenerator.class/README.md create mode 100644 Math.package/GaussianGenerator.class/instance/generator..st create mode 100644 Math.package/GaussianGenerator.class/instance/initialize.st create mode 100644 Math.package/GaussianGenerator.class/instance/mean..st create mode 100644 Math.package/GaussianGenerator.class/instance/next.st rename {Math.pkg/snapshot/classes => Math.package}/GaussianGenerator.class/instance/nextGaussianNormalized.st (83%) create mode 100644 Math.package/GaussianGenerator.class/instance/standardDeviation..st create mode 100644 Math.package/GaussianGenerator.class/properties.json create mode 100644 Math.package/GaussianGeneratorTest.class/README.md rename Math.pkg/snapshot/classes/GaussianGeneratorTest.class/instance/checkDistributionOf:withExpectedMeans:andExpectedStandardDeviation:.st => Math.package/GaussianGeneratorTest.class/instance/checkDistributionOf.withExpectedMeans.andExpectedStandardDeviation..st (72%) rename {Math.pkg/snapshot/classes => Math.package}/GaussianGeneratorTest.class/instance/testDistribution.st (72%) create mode 100644 Math.package/GaussianGeneratorTest.class/properties.json create mode 100644 Math.package/LCRandom.class/README.md create mode 100644 Math.package/LCRandom.class/instance/initialize.st rename {Math.pkg/snapshot/classes => Math.package}/LCRandom.class/instance/next.st (70%) rename {Math.pkg/snapshot/classes => Math.package}/LCRandom.class/instance/nextFloat.st (74%) rename {Math.pkg/snapshot/classes => Math.package}/LCRandom.class/instance/peek.st (67%) rename {Math.pkg/snapshot/classes => Math.package}/LCRandom.class/instance/peekSeed.st (62%) create mode 100644 Math.package/LCRandom.class/instance/zork.st create mode 100644 Math.package/LCRandom.class/properties.json create mode 100644 Math.package/LCRandomTest.class/README.md create mode 100644 Math.package/LCRandomTest.class/instance/testPeekAlwaysReplyTheSameValue.st create mode 100644 Math.package/LCRandomTest.class/properties.json create mode 100644 Math.package/LehmerRandom.class/README.md create mode 100644 Math.package/LehmerRandom.class/instance/initialize.st rename {Math.pkg/snapshot/classes => Math.package}/LehmerRandom.class/instance/next.st (62%) rename {Math.pkg/snapshot/classes => Math.package}/LehmerRandom.class/instance/nextFloat.st (61%) create mode 100644 Math.package/LehmerRandom.class/instance/peek.st rename {Math.pkg/snapshot/classes => Math.package}/LehmerRandom.class/instance/peekSeed.st (60%) create mode 100644 Math.package/LehmerRandom.class/properties.json create mode 100644 Math.package/LehmerRandomTest.class/README.md create mode 100644 Math.package/LehmerRandomTest.class/instance/testPeekAlwaysReplyTheSameValue.st create mode 100644 Math.package/LehmerRandomTest.class/properties.json create mode 100644 Math.package/MersenneTwisterRandom.class/README.md rename {Math.pkg/snapshot/classes => Math.package}/MersenneTwisterRandom.class/class/initialize.st (82%) rename {Math.pkg/snapshot/classes => Math.package}/MersenneTwisterRandom.class/instance/initialize.st (89%) rename {Math.pkg/snapshot/classes => Math.package}/MersenneTwisterRandom.class/instance/next.st (71%) rename Math.pkg/snapshot/classes/MersenneTwisterRandom.class/instance/nextFloat:.st => Math.package/MersenneTwisterRandom.class/instance/nextFloat..st (51%) create mode 100644 Math.package/MersenneTwisterRandom.class/instance/nextFloat.st rename Math.pkg/snapshot/classes/MersenneTwisterRandom.class/instance/nextFloatExcludeUpper:.st => Math.package/MersenneTwisterRandom.class/instance/nextFloatExcludeUpper..st (51%) create mode 100644 Math.package/MersenneTwisterRandom.class/instance/nextFloatExcludeUpper.st rename {Math.pkg/snapshot/classes => Math.package}/MersenneTwisterRandom.class/instance/nextInteger.st (96%) create mode 100644 Math.package/MersenneTwisterRandom.class/properties.json create mode 100644 Math.package/MersenneTwisterRandomTest.class/README.md create mode 100644 Math.package/MersenneTwisterRandomTest.class/instance/testPeekAlwaysReplyTheSameValue.st create mode 100644 Math.package/MersenneTwisterRandomTest.class/properties.json create mode 100644 Math.package/NumberGenerator.class/README.md create mode 100644 Math.package/NumberGenerator.class/instance/next.st create mode 100644 Math.package/NumberGenerator.class/properties.json create mode 100644 Math.package/PMRandom.class/README.md create mode 100644 Math.package/PMRandom.class/instance/initialize.st rename {Math.pkg/snapshot/classes => Math.package}/PMRandom.class/instance/next.st (81%) rename {Math.pkg/snapshot/classes => Math.package}/PMRandom.class/instance/nextFloat.st (79%) rename {Math.pkg/snapshot/classes => Math.package}/PMRandom.class/instance/peek.st (80%) rename {Math.pkg/snapshot/classes => Math.package}/PMRandom.class/instance/peekSeed.st (82%) rename Math.pkg/snapshot/classes/PMRandom.class/instance/seed:.st => Math.package/PMRandom.class/instance/seed..st (70%) create mode 100644 Math.package/PMRandom.class/properties.json create mode 100644 Math.package/PoissonGenerator.class/README.md create mode 100644 Math.package/PoissonGenerator.class/properties.json rename Math.pkg/snapshot/classes/RandomGenerator.class/RandomGenerator.st => Math.package/RandomGenerator.class/README.md (84%) rename Math.pkg/snapshot/classes/RandomGenerator.class/class/chiSquare:repeating:.st => Math.package/RandomGenerator.class/class/chiSquare.repeating..st (94%) create mode 100644 Math.package/RandomGenerator.class/class/new.st create mode 100644 Math.package/RandomGenerator.class/class/seed..st rename {Math.pkg/snapshot/classes => Math.package}/RandomGenerator.class/instance/atEnd.st (70%) rename {Math.pkg/snapshot/classes => Math.package}/RandomGenerator.class/instance/contents.st (81%) create mode 100644 Math.package/RandomGenerator.class/instance/initialize.st rename {Math.pkg/snapshot/classes => Math.package}/RandomGenerator.class/instance/isReadable.st (72%) rename {Math.pkg/snapshot/classes => Math.package}/RandomGenerator.class/instance/isWriteable.st (73%) rename Math.pkg/snapshot/classes/RandomGenerator.class/instance/next:.st => Math.package/RandomGenerator.class/instance/next..st (75%) create mode 100644 Math.package/RandomGenerator.class/instance/next.st rename {Math.pkg/snapshot/classes => Math.package}/RandomGenerator.class/instance/peek.st (63%) rename Math.pkg/snapshot/classes/RandomGenerator.class/instance/seed:.st => Math.package/RandomGenerator.class/instance/seed..st (60%) rename {Math.pkg/snapshot/classes => Math.package}/RandomGenerator.class/instance/seed.st (59%) create mode 100644 Math.package/RandomGenerator.class/properties.json rename {Math.pkg => Math.package/monticello.meta}/categories.st (100%) create mode 100644 Math.package/monticello.meta/initializers.st rename {Math.pkg => Math.package/monticello.meta}/package (100%) create mode 100644 Math.package/monticello.meta/version create mode 100644 Math.package/properties.json delete mode 100644 Math.pkg/.filetree delete mode 100644 Math.pkg/snapshot/classes/BinomialGenerator.class/BinomialGenerator.st delete mode 100644 Math.pkg/snapshot/classes/BinomialGenerator.class/instance/generator:.st delete mode 100644 Math.pkg/snapshot/classes/BinomialGenerator.class/instance/n:.st delete mode 100644 Math.pkg/snapshot/classes/BinomialGenerator.class/instance/p:.st delete mode 100644 Math.pkg/snapshot/classes/BinomialGeneratorTest.class/BinomialGeneratorTest.st delete mode 100644 Math.pkg/snapshot/classes/ConstantGenerator.class/ConstantGenerator.st delete mode 100644 Math.pkg/snapshot/classes/ConstantGenerator.class/instance/constant:.st delete mode 100644 Math.pkg/snapshot/classes/ConstantGenerator.class/instance/next.st delete mode 100644 Math.pkg/snapshot/classes/ConstantGeneratorTest.class/ConstantGeneratorTest.st delete mode 100644 Math.pkg/snapshot/classes/GaussianGenerator.class/GaussianGenerator.st delete mode 100644 Math.pkg/snapshot/classes/GaussianGenerator.class/instance/generator:.st delete mode 100644 Math.pkg/snapshot/classes/GaussianGenerator.class/instance/initialize.st delete mode 100644 Math.pkg/snapshot/classes/GaussianGenerator.class/instance/mean:.st delete mode 100644 Math.pkg/snapshot/classes/GaussianGenerator.class/instance/next.st delete mode 100644 Math.pkg/snapshot/classes/GaussianGenerator.class/instance/standardDeviation:.st delete mode 100644 Math.pkg/snapshot/classes/GaussianGeneratorTest.class/GaussianGeneratorTest.st delete mode 100644 Math.pkg/snapshot/classes/LCRandom.class/LCRandom.st delete mode 100644 Math.pkg/snapshot/classes/LCRandom.class/instance/initialize.st delete mode 100644 Math.pkg/snapshot/classes/LCRandomTest.class/LCRandomTest.st delete mode 100644 Math.pkg/snapshot/classes/LCRandomTest.class/instance/testPeekAlwaysReplyTheSameValue.st delete mode 100644 Math.pkg/snapshot/classes/LehmerRandom.class/LehmerRandom.st delete mode 100644 Math.pkg/snapshot/classes/LehmerRandom.class/instance/initialize.st delete mode 100644 Math.pkg/snapshot/classes/LehmerRandom.class/instance/peek.st delete mode 100644 Math.pkg/snapshot/classes/LehmerRandomTest.class/LehmerRandomTest.st delete mode 100644 Math.pkg/snapshot/classes/LehmerRandomTest.class/instance/testPeekAlwaysReplyTheSameValue.st delete mode 100644 Math.pkg/snapshot/classes/MersenneTwisterRandom.class/MersenneTwisterRandom.st delete mode 100644 Math.pkg/snapshot/classes/MersenneTwisterRandom.class/instance/nextFloat.st delete mode 100644 Math.pkg/snapshot/classes/MersenneTwisterRandom.class/instance/nextFloatExcludeUpper.st delete mode 100644 Math.pkg/snapshot/classes/MersenneTwisterRandomTest.class/MersenneTwisterRandomTest.st delete mode 100644 Math.pkg/snapshot/classes/MersenneTwisterRandomTest.class/instance/testPeekAlwaysReplyTheSameValue.st delete mode 100644 Math.pkg/snapshot/classes/NumberGenerator.class/NumberGenerator.st delete mode 100644 Math.pkg/snapshot/classes/NumberGenerator.class/instance/next.st delete mode 100644 Math.pkg/snapshot/classes/PMRandom.class/PMRandom.st delete mode 100644 Math.pkg/snapshot/classes/PMRandom.class/instance/initialize.st delete mode 100644 Math.pkg/snapshot/classes/PoissonGenerator.class/PoissonGenerator.st delete mode 100644 Math.pkg/snapshot/classes/RandomGenerator.class/class/new.st delete mode 100644 Math.pkg/snapshot/classes/RandomGenerator.class/class/seed:.st delete mode 100644 Math.pkg/snapshot/classes/RandomGenerator.class/instance/initialize.st delete mode 100644 Math.pkg/snapshot/classes/RandomGenerator.class/instance/next.st delete mode 100644 Math.pkg/version diff --git a/.filetree b/.filetree index 89dff8c..febe4a5 100644 --- a/.filetree +++ b/.filetree @@ -1 +1 @@ -{ "packageExtension" : ".pkg" } +{ "packageExtension" : ".package" } diff --git a/Math.package/.filetree b/Math.package/.filetree new file mode 100644 index 0000000..8998102 --- /dev/null +++ b/Math.package/.filetree @@ -0,0 +1,4 @@ +{ + "noMethodMetaData" : true, + "separateMethodMetaAndSource" : false, + "useCypressPropertiesFile" : true } diff --git a/Math.pkg/initializers.st b/Math.package/BinomialGenerator.class/README.md similarity index 100% rename from Math.pkg/initializers.st rename to Math.package/BinomialGenerator.class/README.md diff --git a/Math.package/BinomialGenerator.class/instance/generator..st b/Math.package/BinomialGenerator.class/instance/generator..st new file mode 100644 index 0000000..5d01a64 --- /dev/null +++ b/Math.package/BinomialGenerator.class/instance/generator..st @@ -0,0 +1,3 @@ +as yet unclassified +generator: aRandomNumberGenerator + rng := aRandomNumberGenerator \ No newline at end of file diff --git a/Math.package/BinomialGenerator.class/instance/n..st b/Math.package/BinomialGenerator.class/instance/n..st new file mode 100644 index 0000000..e1f8ccf --- /dev/null +++ b/Math.package/BinomialGenerator.class/instance/n..st @@ -0,0 +1,3 @@ +as yet unclassified +n: numberOfTrials + n := numberOfTrials \ No newline at end of file diff --git a/Math.pkg/snapshot/classes/BinomialGenerator.class/instance/next.st b/Math.package/BinomialGenerator.class/instance/next.st similarity index 55% rename from Math.pkg/snapshot/classes/BinomialGenerator.class/instance/next.st rename to Math.package/BinomialGenerator.class/instance/next.st index 46923fa..40cc720 100644 --- a/Math.pkg/snapshot/classes/BinomialGenerator.class/instance/next.st +++ b/Math.package/BinomialGenerator.class/instance/next.st @@ -1,7 +1,6 @@ - -!BinomialGenerator methodsFor: 'as yet unclassified'! +as yet unclassified next | x | x := 0. n timesRepeat: [ rng next <= p ifTrue: [ x := x + 1 ] ]. - ^ x! ! + ^ x \ No newline at end of file diff --git a/Math.package/BinomialGenerator.class/instance/p..st b/Math.package/BinomialGenerator.class/instance/p..st new file mode 100644 index 0000000..4ba0da4 --- /dev/null +++ b/Math.package/BinomialGenerator.class/instance/p..st @@ -0,0 +1,3 @@ +as yet unclassified +p: aProbability + p := aProbability \ No newline at end of file diff --git a/Math.package/BinomialGenerator.class/properties.json b/Math.package/BinomialGenerator.class/properties.json new file mode 100644 index 0000000..d259a5a --- /dev/null +++ b/Math.package/BinomialGenerator.class/properties.json @@ -0,0 +1,18 @@ +{ + "category" : "Math-Random", + "classinstvars" : [ + ], + "classtraitcomposition" : "{}", + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "n", + "p", + "rng" ], + "name" : "BinomialGenerator", + "pools" : [ + ], + "super" : "NumberGenerator", + "traitcomposition" : "{}", + "type" : "normal" } diff --git a/Math.package/BinomialGeneratorTest.class/README.md b/Math.package/BinomialGeneratorTest.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/Math.pkg/snapshot/classes/BinomialGeneratorTest.class/instance/testBinomialGeneratorWithSuccessProbabilityOfOneAlwaysReturnNumberOfTrials.st b/Math.package/BinomialGeneratorTest.class/instance/testBinomialGeneratorWithSuccessProbabilityOfOneAlwaysReturnNumberOfTrials.st similarity index 80% rename from Math.pkg/snapshot/classes/BinomialGeneratorTest.class/instance/testBinomialGeneratorWithSuccessProbabilityOfOneAlwaysReturnNumberOfTrials.st rename to Math.package/BinomialGeneratorTest.class/instance/testBinomialGeneratorWithSuccessProbabilityOfOneAlwaysReturnNumberOfTrials.st index ab50101..1cb9612 100644 --- a/Math.pkg/snapshot/classes/BinomialGeneratorTest.class/instance/testBinomialGeneratorWithSuccessProbabilityOfOneAlwaysReturnNumberOfTrials.st +++ b/Math.package/BinomialGeneratorTest.class/instance/testBinomialGeneratorWithSuccessProbabilityOfOneAlwaysReturnNumberOfTrials.st @@ -1,5 +1,4 @@ - -!BinomialGeneratorTest methodsFor: 'tests'! +tests testBinomialGeneratorWithSuccessProbabilityOfOneAlwaysReturnNumberOfTrials | g numberOfTrials | g := BinomialGenerator new. @@ -12,4 +11,4 @@ testBinomialGeneratorWithSuccessProbabilityOfOneAlwaysReturnNumberOfTrials g generator: LehmerRandom new. self assert: g next = numberOfTrials. g generator: MersenneTwisterRandom new. - self assert: g next = numberOfTrials! ! + self assert: g next = numberOfTrials \ No newline at end of file diff --git a/Math.package/BinomialGeneratorTest.class/properties.json b/Math.package/BinomialGeneratorTest.class/properties.json new file mode 100644 index 0000000..1bdc50d --- /dev/null +++ b/Math.package/BinomialGeneratorTest.class/properties.json @@ -0,0 +1,16 @@ +{ + "category" : "Math-Random-Tests", + "classinstvars" : [ + ], + "classtraitcomposition" : "{}", + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "BinomialGeneratorTest", + "pools" : [ + ], + "super" : "TestCase", + "traitcomposition" : "{}", + "type" : "normal" } diff --git a/Math.package/ConstantGenerator.class/README.md b/Math.package/ConstantGenerator.class/README.md new file mode 100644 index 0000000..70ece04 --- /dev/null +++ b/Math.package/ConstantGenerator.class/README.md @@ -0,0 +1 @@ +A ConstantGenerator is not really a random number generator. \ No newline at end of file diff --git a/Math.package/ConstantGenerator.class/instance/constant..st b/Math.package/ConstantGenerator.class/instance/constant..st new file mode 100644 index 0000000..d71c6ec --- /dev/null +++ b/Math.package/ConstantGenerator.class/instance/constant..st @@ -0,0 +1,3 @@ +accessing +constant: aConstant + constant := aConstant \ No newline at end of file diff --git a/Math.package/ConstantGenerator.class/instance/next.st b/Math.package/ConstantGenerator.class/instance/next.st new file mode 100644 index 0000000..bf8a5d5 --- /dev/null +++ b/Math.package/ConstantGenerator.class/instance/next.st @@ -0,0 +1,3 @@ +accessing +next + ^ constant \ No newline at end of file diff --git a/Math.package/ConstantGenerator.class/properties.json b/Math.package/ConstantGenerator.class/properties.json new file mode 100644 index 0000000..22e36ab --- /dev/null +++ b/Math.package/ConstantGenerator.class/properties.json @@ -0,0 +1,16 @@ +{ + "category" : "Math-Random", + "classinstvars" : [ + ], + "classtraitcomposition" : "{}", + "classvars" : [ + ], + "commentStamp" : "SergeStinckwich 3/30/2010 15:31", + "instvars" : [ + "constant" ], + "name" : "ConstantGenerator", + "pools" : [ + ], + "super" : "NumberGenerator", + "traitcomposition" : "{}", + "type" : "normal" } diff --git a/Math.package/ConstantGeneratorTest.class/README.md b/Math.package/ConstantGeneratorTest.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/Math.pkg/snapshot/classes/ConstantGeneratorTest.class/instance/testConstantGeneratorGenerateAlwaysTheSameValue.st b/Math.package/ConstantGeneratorTest.class/instance/testConstantGeneratorGenerateAlwaysTheSameValue.st similarity index 61% rename from Math.pkg/snapshot/classes/ConstantGeneratorTest.class/instance/testConstantGeneratorGenerateAlwaysTheSameValue.st rename to Math.package/ConstantGeneratorTest.class/instance/testConstantGeneratorGenerateAlwaysTheSameValue.st index 2dcd4e3..97064c7 100644 --- a/Math.pkg/snapshot/classes/ConstantGeneratorTest.class/instance/testConstantGeneratorGenerateAlwaysTheSameValue.st +++ b/Math.package/ConstantGeneratorTest.class/instance/testConstantGeneratorGenerateAlwaysTheSameValue.st @@ -1,8 +1,7 @@ - -!ConstantGeneratorTest methodsFor: 'as yet unclassified'! +as yet unclassified testConstantGeneratorGenerateAlwaysTheSameValue | g numberOfTrials | g := ConstantGenerator new. g constant: 1. self assert: g next = g next. - self assert: g next = g next! ! + self assert: g next = g next \ No newline at end of file diff --git a/Math.package/ConstantGeneratorTest.class/properties.json b/Math.package/ConstantGeneratorTest.class/properties.json new file mode 100644 index 0000000..aaefe74 --- /dev/null +++ b/Math.package/ConstantGeneratorTest.class/properties.json @@ -0,0 +1,16 @@ +{ + "category" : "Math-Random-Tests", + "classinstvars" : [ + ], + "classtraitcomposition" : "{}", + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "ConstantGeneratorTest", + "pools" : [ + ], + "super" : "TestCase", + "traitcomposition" : "{}", + "type" : "normal" } diff --git a/Math.package/GaussianGenerator.class/README.md b/Math.package/GaussianGenerator.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/Math.package/GaussianGenerator.class/instance/generator..st b/Math.package/GaussianGenerator.class/instance/generator..st new file mode 100644 index 0000000..5d01a64 --- /dev/null +++ b/Math.package/GaussianGenerator.class/instance/generator..st @@ -0,0 +1,3 @@ +as yet unclassified +generator: aRandomNumberGenerator + rng := aRandomNumberGenerator \ No newline at end of file diff --git a/Math.package/GaussianGenerator.class/instance/initialize.st b/Math.package/GaussianGenerator.class/instance/initialize.st new file mode 100644 index 0000000..6446b2b --- /dev/null +++ b/Math.package/GaussianGenerator.class/instance/initialize.st @@ -0,0 +1,3 @@ +as yet unclassified +initialize + hasNextGaussian := false \ No newline at end of file diff --git a/Math.package/GaussianGenerator.class/instance/mean..st b/Math.package/GaussianGenerator.class/instance/mean..st new file mode 100644 index 0000000..8a5fd3f --- /dev/null +++ b/Math.package/GaussianGenerator.class/instance/mean..st @@ -0,0 +1,3 @@ +as yet unclassified +mean: aMeanValue + mean := aMeanValue \ No newline at end of file diff --git a/Math.package/GaussianGenerator.class/instance/next.st b/Math.package/GaussianGenerator.class/instance/next.st new file mode 100644 index 0000000..acc9aa2 --- /dev/null +++ b/Math.package/GaussianGenerator.class/instance/next.st @@ -0,0 +1,3 @@ +as yet unclassified +next + ^ self nextGaussianNormalized * standardDeviation + mean \ No newline at end of file diff --git a/Math.pkg/snapshot/classes/GaussianGenerator.class/instance/nextGaussianNormalized.st b/Math.package/GaussianGenerator.class/instance/nextGaussianNormalized.st similarity index 83% rename from Math.pkg/snapshot/classes/GaussianGenerator.class/instance/nextGaussianNormalized.st rename to Math.package/GaussianGenerator.class/instance/nextGaussianNormalized.st index 5315fd5..2f8a090 100644 --- a/Math.pkg/snapshot/classes/GaussianGenerator.class/instance/nextGaussianNormalized.st +++ b/Math.package/GaussianGenerator.class/instance/nextGaussianNormalized.st @@ -1,5 +1,4 @@ - -!GaussianGenerator methodsFor: 'as yet unclassified'! +as yet unclassified nextGaussianNormalized | x1 x2 w y1 y2 | hasNextGaussian @@ -15,4 +14,4 @@ nextGaussianNormalized y1 := x1 * w. y2 := x2 * w. nextGaussian := y2. - ^ y1! ! + ^ y1 \ No newline at end of file diff --git a/Math.package/GaussianGenerator.class/instance/standardDeviation..st b/Math.package/GaussianGenerator.class/instance/standardDeviation..st new file mode 100644 index 0000000..53d3f75 --- /dev/null +++ b/Math.package/GaussianGenerator.class/instance/standardDeviation..st @@ -0,0 +1,3 @@ +as yet unclassified +standardDeviation: aStandardDeviation + standardDeviation := aStandardDeviation \ No newline at end of file diff --git a/Math.package/GaussianGenerator.class/properties.json b/Math.package/GaussianGenerator.class/properties.json new file mode 100644 index 0000000..01af6b0 --- /dev/null +++ b/Math.package/GaussianGenerator.class/properties.json @@ -0,0 +1,20 @@ +{ + "category" : "Math-Random", + "classinstvars" : [ + ], + "classtraitcomposition" : "{}", + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + "rng", + "mean", + "standardDeviation", + "hasNextGaussian", + "nextGaussian" ], + "name" : "GaussianGenerator", + "pools" : [ + ], + "super" : "NumberGenerator", + "traitcomposition" : "{}", + "type" : "normal" } diff --git a/Math.package/GaussianGeneratorTest.class/README.md b/Math.package/GaussianGeneratorTest.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/Math.pkg/snapshot/classes/GaussianGeneratorTest.class/instance/checkDistributionOf:withExpectedMeans:andExpectedStandardDeviation:.st b/Math.package/GaussianGeneratorTest.class/instance/checkDistributionOf.withExpectedMeans.andExpectedStandardDeviation..st similarity index 72% rename from Math.pkg/snapshot/classes/GaussianGeneratorTest.class/instance/checkDistributionOf:withExpectedMeans:andExpectedStandardDeviation:.st rename to Math.package/GaussianGeneratorTest.class/instance/checkDistributionOf.withExpectedMeans.andExpectedStandardDeviation..st index 0756ce8..41ec56f 100644 --- a/Math.pkg/snapshot/classes/GaussianGeneratorTest.class/instance/checkDistributionOf:withExpectedMeans:andExpectedStandardDeviation:.st +++ b/Math.package/GaussianGeneratorTest.class/instance/checkDistributionOf.withExpectedMeans.andExpectedStandardDeviation..st @@ -1,5 +1,4 @@ - -!GaussianGeneratorTest methodsFor: 'as yet unclassified'! +as yet unclassified checkDistributionOf: aGenerator withExpectedMeans: e andExpectedStandardDeviation: sd | data m | data := Set new. @@ -7,4 +6,4 @@ checkDistributionOf: aGenerator withExpectedMeans: e andExpectedStandardDeviatio m := 0. data do: [ :each | m := each + m ]. m := m / data size. - self assert: e - m <= 0.2! ! + self assert: e - m <= 0.2 \ No newline at end of file diff --git a/Math.pkg/snapshot/classes/GaussianGeneratorTest.class/instance/testDistribution.st b/Math.package/GaussianGeneratorTest.class/instance/testDistribution.st similarity index 72% rename from Math.pkg/snapshot/classes/GaussianGeneratorTest.class/instance/testDistribution.st rename to Math.package/GaussianGeneratorTest.class/instance/testDistribution.st index e79703a..7c57d21 100644 --- a/Math.pkg/snapshot/classes/GaussianGeneratorTest.class/instance/testDistribution.st +++ b/Math.package/GaussianGeneratorTest.class/instance/testDistribution.st @@ -1,5 +1,4 @@ - -!GaussianGeneratorTest methodsFor: 'as yet unclassified'! +as yet unclassified testDistribution | mean standardDeviation g | mean := 147. @@ -8,4 +7,4 @@ testDistribution mean: mean; standardDeviation: standardDeviation. g generator: LCRandom new. - self checkDistributionOf: g withExpectedMeans: mean andExpectedStandardDeviation: standardDeviation! ! + self checkDistributionOf: g withExpectedMeans: mean andExpectedStandardDeviation: standardDeviation \ No newline at end of file diff --git a/Math.package/GaussianGeneratorTest.class/properties.json b/Math.package/GaussianGeneratorTest.class/properties.json new file mode 100644 index 0000000..1312824 --- /dev/null +++ b/Math.package/GaussianGeneratorTest.class/properties.json @@ -0,0 +1,16 @@ +{ + "category" : "Math-Random-Tests", + "classinstvars" : [ + ], + "classtraitcomposition" : "{}", + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "GaussianGeneratorTest", + "pools" : [ + ], + "super" : "TestCase", + "traitcomposition" : "{}", + "type" : "normal" } diff --git a/Math.package/LCRandom.class/README.md b/Math.package/LCRandom.class/README.md new file mode 100644 index 0000000..db37700 --- /dev/null +++ b/Math.package/LCRandom.class/README.md @@ -0,0 +1,3 @@ +This uses a quick and dirty Linear Congruential generator. + +LCRandom new next. \ No newline at end of file diff --git a/Math.package/LCRandom.class/instance/initialize.st b/Math.package/LCRandom.class/instance/initialize.st new file mode 100644 index 0000000..1883a62 --- /dev/null +++ b/Math.package/LCRandom.class/instance/initialize.st @@ -0,0 +1,3 @@ +initialize-release +initialize + " Private - Answer the receiver " \ No newline at end of file diff --git a/Math.pkg/snapshot/classes/LCRandom.class/instance/next.st b/Math.package/LCRandom.class/instance/next.st similarity index 70% rename from Math.pkg/snapshot/classes/LCRandom.class/instance/next.st rename to Math.package/LCRandom.class/instance/next.st index f85f151..5b3f044 100644 --- a/Math.pkg/snapshot/classes/LCRandom.class/instance/next.st +++ b/Math.package/LCRandom.class/instance/next.st @@ -1,7 +1,6 @@ - -!LCRandom methodsFor: 'accessing'! +accessing next "Private - Answer a pseudo-Random floating point number between 0 and 1. Uses a quick and dirty Linear congruential generator," - ^ self nextFloat! ! + ^ self nextFloat \ No newline at end of file diff --git a/Math.pkg/snapshot/classes/LCRandom.class/instance/nextFloat.st b/Math.package/LCRandom.class/instance/nextFloat.st similarity index 74% rename from Math.pkg/snapshot/classes/LCRandom.class/instance/nextFloat.st rename to Math.package/LCRandom.class/instance/nextFloat.st index a7f7f6a..14054f2 100644 --- a/Math.pkg/snapshot/classes/LCRandom.class/instance/nextFloat.st +++ b/Math.package/LCRandom.class/instance/nextFloat.st @@ -1,8 +1,7 @@ - -!LCRandom methodsFor: 'accessing'! +accessing nextFloat "Private - Answer a pseudo-Random floating point number between 0 and 1. Uses a quick and dirty Linear congruential generator," seed := self peekSeed. - ^ seed / 120050.0! ! + ^ seed / 120050.0 \ No newline at end of file diff --git a/Math.pkg/snapshot/classes/LCRandom.class/instance/peek.st b/Math.package/LCRandom.class/instance/peek.st similarity index 67% rename from Math.pkg/snapshot/classes/LCRandom.class/instance/peek.st rename to Math.package/LCRandom.class/instance/peek.st index 371e25f..39c1dbc 100644 --- a/Math.pkg/snapshot/classes/LCRandom.class/instance/peek.st +++ b/Math.package/LCRandom.class/instance/peek.st @@ -1,7 +1,6 @@ - -!LCRandom methodsFor: 'accessing'! +accessing peek "Private - Answer a pseudo-Random floating point number between 0 and 1. Uses a simple, but fast, Linear Congruential generator." - ^ self peekSeed / 120050.0! ! + ^ self peekSeed / 120050.0 \ No newline at end of file diff --git a/Math.pkg/snapshot/classes/LCRandom.class/instance/peekSeed.st b/Math.package/LCRandom.class/instance/peekSeed.st similarity index 62% rename from Math.pkg/snapshot/classes/LCRandom.class/instance/peekSeed.st rename to Math.package/LCRandom.class/instance/peekSeed.st index 644b3bd..1ad3d84 100644 --- a/Math.pkg/snapshot/classes/LCRandom.class/instance/peekSeed.st +++ b/Math.package/LCRandom.class/instance/peekSeed.st @@ -1,7 +1,6 @@ - -!LCRandom methodsFor: 'accessing'! +accessing peekSeed "Private - Answer the next Integer seed calculated using a quick and dirty Linear congruential generator." - ^ seed * 2311 + 25367 \\ 120050! ! + ^ seed * 2311 + 25367 \\ 120050 \ No newline at end of file diff --git a/Math.package/LCRandom.class/instance/zork.st b/Math.package/LCRandom.class/instance/zork.st new file mode 100644 index 0000000..6256ee2 --- /dev/null +++ b/Math.package/LCRandom.class/instance/zork.st @@ -0,0 +1,3 @@ +accessing +zork +^42 \ No newline at end of file diff --git a/Math.package/LCRandom.class/properties.json b/Math.package/LCRandom.class/properties.json new file mode 100644 index 0000000..2171e5f --- /dev/null +++ b/Math.package/LCRandom.class/properties.json @@ -0,0 +1,16 @@ +{ + "category" : "Math-Random", + "classinstvars" : [ + ], + "classtraitcomposition" : "{}", + "classvars" : [ + ], + "commentStamp" : "hfm 3/23/2009 21:22", + "instvars" : [ + ], + "name" : "LCRandom", + "pools" : [ + ], + "super" : "RandomGenerator", + "traitcomposition" : "{}", + "type" : "normal" } diff --git a/Math.package/LCRandomTest.class/README.md b/Math.package/LCRandomTest.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/Math.package/LCRandomTest.class/instance/testPeekAlwaysReplyTheSameValue.st b/Math.package/LCRandomTest.class/instance/testPeekAlwaysReplyTheSameValue.st new file mode 100644 index 0000000..ee8837e --- /dev/null +++ b/Math.package/LCRandomTest.class/instance/testPeekAlwaysReplyTheSameValue.st @@ -0,0 +1,5 @@ +tests +testPeekAlwaysReplyTheSameValue + | g | + g := LCRandom new. + self assert: g peek = g peek \ No newline at end of file diff --git a/Math.package/LCRandomTest.class/properties.json b/Math.package/LCRandomTest.class/properties.json new file mode 100644 index 0000000..fe0dbc1 --- /dev/null +++ b/Math.package/LCRandomTest.class/properties.json @@ -0,0 +1,16 @@ +{ + "category" : "Math-Random-Tests", + "classinstvars" : [ + ], + "classtraitcomposition" : "{}", + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "LCRandomTest", + "pools" : [ + ], + "super" : "TestCase", + "traitcomposition" : "{}", + "type" : "normal" } diff --git a/Math.package/LehmerRandom.class/README.md b/Math.package/LehmerRandom.class/README.md new file mode 100644 index 0000000..977b921 --- /dev/null +++ b/Math.package/LehmerRandom.class/README.md @@ -0,0 +1,3 @@ +This generator uses the Lehmer's Linear Congruential method. + +LehmerRandom new next \ No newline at end of file diff --git a/Math.package/LehmerRandom.class/instance/initialize.st b/Math.package/LehmerRandom.class/instance/initialize.st new file mode 100644 index 0000000..1883a62 --- /dev/null +++ b/Math.package/LehmerRandom.class/instance/initialize.st @@ -0,0 +1,3 @@ +initialize-release +initialize + " Private - Answer the receiver " \ No newline at end of file diff --git a/Math.pkg/snapshot/classes/LehmerRandom.class/instance/next.st b/Math.package/LehmerRandom.class/instance/next.st similarity index 62% rename from Math.pkg/snapshot/classes/LehmerRandom.class/instance/next.st rename to Math.package/LehmerRandom.class/instance/next.st index 3ddecd4..19429e1 100644 --- a/Math.pkg/snapshot/classes/LehmerRandom.class/instance/next.st +++ b/Math.package/LehmerRandom.class/instance/next.st @@ -1,7 +1,6 @@ - -!LehmerRandom methodsFor: 'accessing'! +accessing next "Private - Answer a Random Float between 0 and 1. Uses Lehmer's linear congruential method." - ^ self nextFloat! ! + ^ self nextFloat \ No newline at end of file diff --git a/Math.pkg/snapshot/classes/LehmerRandom.class/instance/nextFloat.st b/Math.package/LehmerRandom.class/instance/nextFloat.st similarity index 61% rename from Math.pkg/snapshot/classes/LehmerRandom.class/instance/nextFloat.st rename to Math.package/LehmerRandom.class/instance/nextFloat.st index ef8a5b2..6804774 100644 --- a/Math.pkg/snapshot/classes/LehmerRandom.class/instance/nextFloat.st +++ b/Math.package/LehmerRandom.class/instance/nextFloat.st @@ -1,7 +1,6 @@ - -!LehmerRandom methodsFor: 'accessing'! +accessing nextFloat "Private - Answer a Random Float between 0 and 1. Uses Lehmer's linear congruential method." seed := self peekSeed. - ^ seed / SmallInteger maxVal asFloat! ! + ^ seed / SmallInteger maxVal asFloat \ No newline at end of file diff --git a/Math.package/LehmerRandom.class/instance/peek.st b/Math.package/LehmerRandom.class/instance/peek.st new file mode 100644 index 0000000..8601a97 --- /dev/null +++ b/Math.package/LehmerRandom.class/instance/peek.st @@ -0,0 +1,5 @@ +accessing +peek + "Private - Answer a pseudo-Random floating point number between 0 and 1." + + ^ self peekSeed / SmallInteger maxVal asFloat \ No newline at end of file diff --git a/Math.pkg/snapshot/classes/LehmerRandom.class/instance/peekSeed.st b/Math.package/LehmerRandom.class/instance/peekSeed.st similarity index 60% rename from Math.pkg/snapshot/classes/LehmerRandom.class/instance/peekSeed.st rename to Math.package/LehmerRandom.class/instance/peekSeed.st index 3df429a..d1ff649 100644 --- a/Math.pkg/snapshot/classes/LehmerRandom.class/instance/peekSeed.st +++ b/Math.package/LehmerRandom.class/instance/peekSeed.st @@ -1,7 +1,6 @@ - -!LehmerRandom methodsFor: 'accessing'! +accessing peekSeed "Private - Answer the next Integer seed calculated using Lehmer's linear congruential method. The seed is in the range 0..16r3FFFFFFF." - ^ ( seed * 31415821 ) + 1 bitAnd: SmallInteger maxVal! ! + ^ ( seed * 31415821 ) + 1 bitAnd: SmallInteger maxVal \ No newline at end of file diff --git a/Math.package/LehmerRandom.class/properties.json b/Math.package/LehmerRandom.class/properties.json new file mode 100644 index 0000000..f641cd3 --- /dev/null +++ b/Math.package/LehmerRandom.class/properties.json @@ -0,0 +1,16 @@ +{ + "category" : "Math-Random", + "classinstvars" : [ + ], + "classtraitcomposition" : "{}", + "classvars" : [ + ], + "commentStamp" : "hfm 3/23/2009 21:22", + "instvars" : [ + ], + "name" : "LehmerRandom", + "pools" : [ + ], + "super" : "RandomGenerator", + "traitcomposition" : "{}", + "type" : "normal" } diff --git a/Math.package/LehmerRandomTest.class/README.md b/Math.package/LehmerRandomTest.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/Math.package/LehmerRandomTest.class/instance/testPeekAlwaysReplyTheSameValue.st b/Math.package/LehmerRandomTest.class/instance/testPeekAlwaysReplyTheSameValue.st new file mode 100644 index 0000000..993bd6e --- /dev/null +++ b/Math.package/LehmerRandomTest.class/instance/testPeekAlwaysReplyTheSameValue.st @@ -0,0 +1,5 @@ +tests +testPeekAlwaysReplyTheSameValue + | g | + g := LehmerRandom new. + self assert: g peek = g peek \ No newline at end of file diff --git a/Math.package/LehmerRandomTest.class/properties.json b/Math.package/LehmerRandomTest.class/properties.json new file mode 100644 index 0000000..e3f40e7 --- /dev/null +++ b/Math.package/LehmerRandomTest.class/properties.json @@ -0,0 +1,16 @@ +{ + "category" : "Math-Random-Tests", + "classinstvars" : [ + ], + "classtraitcomposition" : "{}", + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "LehmerRandomTest", + "pools" : [ + ], + "super" : "TestCase", + "traitcomposition" : "{}", + "type" : "normal" } diff --git a/Math.package/MersenneTwisterRandom.class/README.md b/Math.package/MersenneTwisterRandom.class/README.md new file mode 100644 index 0000000..ef93e35 --- /dev/null +++ b/Math.package/MersenneTwisterRandom.class/README.md @@ -0,0 +1,8 @@ +See http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html + +" To get a pseudo-random float " +MersenneTwisterRandom new next. + +" To get a pseudo-random integer " +MersenneTwisterRandom new nextInteger. + diff --git a/Math.pkg/snapshot/classes/MersenneTwisterRandom.class/class/initialize.st b/Math.package/MersenneTwisterRandom.class/class/initialize.st similarity index 82% rename from Math.pkg/snapshot/classes/MersenneTwisterRandom.class/class/initialize.st rename to Math.package/MersenneTwisterRandom.class/class/initialize.st index c79f596..e611aab 100644 --- a/Math.pkg/snapshot/classes/MersenneTwisterRandom.class/class/initialize.st +++ b/Math.package/MersenneTwisterRandom.class/class/initialize.st @@ -1,5 +1,4 @@ - -!MersenneTwisterRandom class methodsFor: 'class initialization'! +class initialization initialize " self initialize " @@ -12,4 +11,3 @@ initialize TemperingMaskB := 16r9D2C5680. " 2636928640 " TemperingMaskC := 16rEFC60000. " 4022730752 " -! ! diff --git a/Math.pkg/snapshot/classes/MersenneTwisterRandom.class/instance/initialize.st b/Math.package/MersenneTwisterRandom.class/instance/initialize.st similarity index 89% rename from Math.pkg/snapshot/classes/MersenneTwisterRandom.class/instance/initialize.st rename to Math.package/MersenneTwisterRandom.class/instance/initialize.st index 538e67c..0c51992 100644 --- a/Math.pkg/snapshot/classes/MersenneTwisterRandom.class/instance/initialize.st +++ b/Math.package/MersenneTwisterRandom.class/instance/initialize.st @@ -1,5 +1,4 @@ - -!MersenneTwisterRandom methodsFor: 'initialize-release'! +initialize-release initialize " Private - Initialize the receiver state vector and multiplier " @@ -18,4 +17,3 @@ initialize states at: multIndex put: ( ( states at: multIndex ) bitAnd: Mt19937Mask ) ] -! ! diff --git a/Math.pkg/snapshot/classes/MersenneTwisterRandom.class/instance/next.st b/Math.package/MersenneTwisterRandom.class/instance/next.st similarity index 71% rename from Math.pkg/snapshot/classes/MersenneTwisterRandom.class/instance/next.st rename to Math.package/MersenneTwisterRandom.class/instance/next.st index 46d1906..6863111 100644 --- a/Math.pkg/snapshot/classes/MersenneTwisterRandom.class/instance/next.st +++ b/Math.package/MersenneTwisterRandom.class/instance/next.st @@ -1,8 +1,6 @@ - -!MersenneTwisterRandom methodsFor: 'accessing'! +accessing next "Private - Answer a pseudo-Random float number four times faster than rand() ff period 2**19937-1. " ^ self nextFloat -! ! diff --git a/Math.pkg/snapshot/classes/MersenneTwisterRandom.class/instance/nextFloat:.st b/Math.package/MersenneTwisterRandom.class/instance/nextFloat..st similarity index 51% rename from Math.pkg/snapshot/classes/MersenneTwisterRandom.class/instance/nextFloat:.st rename to Math.package/MersenneTwisterRandom.class/instance/nextFloat..st index b779de0..39d853d 100644 --- a/Math.pkg/snapshot/classes/MersenneTwisterRandom.class/instance/nextFloat:.st +++ b/Math.package/MersenneTwisterRandom.class/instance/nextFloat..st @@ -1,6 +1,5 @@ - -!MersenneTwisterRandom methodsFor: 'accessing'! +accessing nextFloat: limit " Answer a random float number in the interval [ 0 , limit ] " - ^ self nextFloat * limit! ! + ^ self nextFloat * limit \ No newline at end of file diff --git a/Math.package/MersenneTwisterRandom.class/instance/nextFloat.st b/Math.package/MersenneTwisterRandom.class/instance/nextFloat.st new file mode 100644 index 0000000..e3bb42b --- /dev/null +++ b/Math.package/MersenneTwisterRandom.class/instance/nextFloat.st @@ -0,0 +1,5 @@ +accessing +nextFloat + " Answer a random float number in the interval [ 0 , 1 ] " + + ^ self nextInteger * ( 1.0 / 4294967295.0 ) \ No newline at end of file diff --git a/Math.pkg/snapshot/classes/MersenneTwisterRandom.class/instance/nextFloatExcludeUpper:.st b/Math.package/MersenneTwisterRandom.class/instance/nextFloatExcludeUpper..st similarity index 51% rename from Math.pkg/snapshot/classes/MersenneTwisterRandom.class/instance/nextFloatExcludeUpper:.st rename to Math.package/MersenneTwisterRandom.class/instance/nextFloatExcludeUpper..st index ee4e95b..7c54be9 100644 --- a/Math.pkg/snapshot/classes/MersenneTwisterRandom.class/instance/nextFloatExcludeUpper:.st +++ b/Math.package/MersenneTwisterRandom.class/instance/nextFloatExcludeUpper..st @@ -1,6 +1,5 @@ - -!MersenneTwisterRandom methodsFor: 'accessing'! +accessing nextFloatExcludeUpper: limit " Answer a random float number in the interval [ 0 , limit ) " - ^ self nextFloatExcludeUpper * limit! ! + ^ self nextFloatExcludeUpper * limit \ No newline at end of file diff --git a/Math.package/MersenneTwisterRandom.class/instance/nextFloatExcludeUpper.st b/Math.package/MersenneTwisterRandom.class/instance/nextFloatExcludeUpper.st new file mode 100644 index 0000000..2f8e74a --- /dev/null +++ b/Math.package/MersenneTwisterRandom.class/instance/nextFloatExcludeUpper.st @@ -0,0 +1,5 @@ +accessing +nextFloatExcludeUpper + " Answer a random float number in the interval [ 0 , 1 ) " + + ^ self nextInteger * ( 1.0 / 4294967296.0 ) \ No newline at end of file diff --git a/Math.pkg/snapshot/classes/MersenneTwisterRandom.class/instance/nextInteger.st b/Math.package/MersenneTwisterRandom.class/instance/nextInteger.st similarity index 96% rename from Math.pkg/snapshot/classes/MersenneTwisterRandom.class/instance/nextInteger.st rename to Math.package/MersenneTwisterRandom.class/instance/nextInteger.st index 997161f..cd62c7e 100644 --- a/Math.pkg/snapshot/classes/MersenneTwisterRandom.class/instance/nextInteger.st +++ b/Math.package/MersenneTwisterRandom.class/instance/nextInteger.st @@ -1,5 +1,4 @@ - -!MersenneTwisterRandom methodsFor: 'private'! +private nextInteger " Answer a random integer on [0,0xffffffff] interval " @@ -35,4 +34,4 @@ nextInteger y := y bitXor: ((y bitShift: 7 negated) bitAnd: TemperingMaskB). y := y bitXor: ((y bitShift: 15 negated) bitAnd: TemperingMaskC). y := y bitXor: (y bitShift: 18 negated). - ^ y! ! + ^ y \ No newline at end of file diff --git a/Math.package/MersenneTwisterRandom.class/properties.json b/Math.package/MersenneTwisterRandom.class/properties.json new file mode 100644 index 0000000..67c3d00 --- /dev/null +++ b/Math.package/MersenneTwisterRandom.class/properties.json @@ -0,0 +1,24 @@ +{ + "category" : "Math-Random", + "classinstvars" : [ + ], + "classtraitcomposition" : "{}", + "classvars" : [ + "DefaultLengthVector", + "Mt19937LowerMask", + "Mt19937Mask", + "Mt19937MatrixA", + "Mt19937UpperMask", + "PeriodParameter", + "TemperingMaskB", + "TemperingMaskC" ], + "commentStamp" : "hfm 3/24/2009 08:27", + "instvars" : [ + "states", + "mti" ], + "name" : "MersenneTwisterRandom", + "pools" : [ + ], + "super" : "RandomGenerator", + "traitcomposition" : "{}", + "type" : "normal" } diff --git a/Math.package/MersenneTwisterRandomTest.class/README.md b/Math.package/MersenneTwisterRandomTest.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/Math.package/MersenneTwisterRandomTest.class/instance/testPeekAlwaysReplyTheSameValue.st b/Math.package/MersenneTwisterRandomTest.class/instance/testPeekAlwaysReplyTheSameValue.st new file mode 100644 index 0000000..2000eca --- /dev/null +++ b/Math.package/MersenneTwisterRandomTest.class/instance/testPeekAlwaysReplyTheSameValue.st @@ -0,0 +1,5 @@ +as yet unclassified +testPeekAlwaysReplyTheSameValue + | g | + g := MersenneTwisterRandom new. + self assert: g peek = g peek \ No newline at end of file diff --git a/Math.package/MersenneTwisterRandomTest.class/properties.json b/Math.package/MersenneTwisterRandomTest.class/properties.json new file mode 100644 index 0000000..1c243e2 --- /dev/null +++ b/Math.package/MersenneTwisterRandomTest.class/properties.json @@ -0,0 +1,16 @@ +{ + "category" : "Math-Random-Tests", + "classinstvars" : [ + ], + "classtraitcomposition" : "{}", + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "MersenneTwisterRandomTest", + "pools" : [ + ], + "super" : "TestCase", + "traitcomposition" : "{}", + "type" : "normal" } diff --git a/Math.package/NumberGenerator.class/README.md b/Math.package/NumberGenerator.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/Math.package/NumberGenerator.class/instance/next.st b/Math.package/NumberGenerator.class/instance/next.st new file mode 100644 index 0000000..22e6d11 --- /dev/null +++ b/Math.package/NumberGenerator.class/instance/next.st @@ -0,0 +1,3 @@ +accessing +next + ^ self subclassResponsibility \ No newline at end of file diff --git a/Math.package/NumberGenerator.class/properties.json b/Math.package/NumberGenerator.class/properties.json new file mode 100644 index 0000000..1d2986f --- /dev/null +++ b/Math.package/NumberGenerator.class/properties.json @@ -0,0 +1,16 @@ +{ + "category" : "Math-Random", + "classinstvars" : [ + ], + "classtraitcomposition" : "{}", + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "NumberGenerator", + "pools" : [ + ], + "super" : "Object", + "traitcomposition" : "{}", + "type" : "normal" } diff --git a/Math.package/PMRandom.class/README.md b/Math.package/PMRandom.class/README.md new file mode 100644 index 0000000..482b80c --- /dev/null +++ b/Math.package/PMRandom.class/README.md @@ -0,0 +1,3 @@ +Uses Park and Miller's 'Minimum Standard' Congruential generator. See 'Numerical Recipes in C', 2nd Edition; Press, Flannery, Teukolsky and Vetterling; Cambridge University Press, 1992. + +PMRandom new next \ No newline at end of file diff --git a/Math.package/PMRandom.class/instance/initialize.st b/Math.package/PMRandom.class/instance/initialize.st new file mode 100644 index 0000000..1883a62 --- /dev/null +++ b/Math.package/PMRandom.class/instance/initialize.st @@ -0,0 +1,3 @@ +initialize-release +initialize + " Private - Answer the receiver " \ No newline at end of file diff --git a/Math.pkg/snapshot/classes/PMRandom.class/instance/next.st b/Math.package/PMRandom.class/instance/next.st similarity index 81% rename from Math.pkg/snapshot/classes/PMRandom.class/instance/next.st rename to Math.package/PMRandom.class/instance/next.st index 5bebdc8..e5aa57c 100644 --- a/Math.pkg/snapshot/classes/PMRandom.class/instance/next.st +++ b/Math.package/PMRandom.class/instance/next.st @@ -1,9 +1,8 @@ - -!PMRandom methodsFor: 'initialize-release'! +initialize-release next "Private - Answer a pseudo-Random floating point number between 0 and 1. Uses Park and Miller's 'Minimum Standard' congruential generator (see 'Numerical Recipes in C', 2nd Edition; Press, Flannery, Teukolsky and Vetterling; Cambridge University Press, 1992)." - ^ self nextFloat! ! + ^ self nextFloat \ No newline at end of file diff --git a/Math.pkg/snapshot/classes/PMRandom.class/instance/nextFloat.st b/Math.package/PMRandom.class/instance/nextFloat.st similarity index 79% rename from Math.pkg/snapshot/classes/PMRandom.class/instance/nextFloat.st rename to Math.package/PMRandom.class/instance/nextFloat.st index 9fc0c10..708e150 100644 --- a/Math.pkg/snapshot/classes/PMRandom.class/instance/nextFloat.st +++ b/Math.package/PMRandom.class/instance/nextFloat.st @@ -1,5 +1,4 @@ - -!PMRandom methodsFor: 'initialize-release'! +initialize-release nextFloat "Private - Answer a pseudo-Random floating point number between 0 and 1. Uses Park and Miller's 'Minimum Standard' congruential generator @@ -7,4 +6,4 @@ nextFloat Teukolsky and Vetterling; Cambridge University Press, 1992)." seed := self peekSeed. - ^ seed / 16r7FFFFFFF asFloat ! ! + ^ seed / 16r7FFFFFFF asFloat \ No newline at end of file diff --git a/Math.pkg/snapshot/classes/PMRandom.class/instance/peek.st b/Math.package/PMRandom.class/instance/peek.st similarity index 80% rename from Math.pkg/snapshot/classes/PMRandom.class/instance/peek.st rename to Math.package/PMRandom.class/instance/peek.st index 84d41c4..30ad58c 100644 --- a/Math.pkg/snapshot/classes/PMRandom.class/instance/peek.st +++ b/Math.package/PMRandom.class/instance/peek.st @@ -1,8 +1,6 @@ - -!PMRandom methodsFor: 'initialize-release'! +initialize-release peek "Private - Answer a pseudo-Random floating point number between 0 and 1. Uses Park and Miller's 'Minimum Standard' congruential generator." ^ self peekSeed / 16r7FFFFFFF asFloat -! ! diff --git a/Math.pkg/snapshot/classes/PMRandom.class/instance/peekSeed.st b/Math.package/PMRandom.class/instance/peekSeed.st similarity index 82% rename from Math.pkg/snapshot/classes/PMRandom.class/instance/peekSeed.st rename to Math.package/PMRandom.class/instance/peekSeed.st index 8cbb687..03849dd 100644 --- a/Math.pkg/snapshot/classes/PMRandom.class/instance/peekSeed.st +++ b/Math.package/PMRandom.class/instance/peekSeed.st @@ -1,8 +1,6 @@ - -!PMRandom methodsFor: 'initialize-release'! +initialize-release peekSeed "Private - Answer the next Integer seed calculated using Park and Miller's 'Minimum Standard' congruential generator. The seed is in the range 0..16r7FFFFFFF." ^ ( seed * ( 7 raisedToInteger: 5 ) ) rem: 16r7FFFFFFF -! ! diff --git a/Math.pkg/snapshot/classes/PMRandom.class/instance/seed:.st b/Math.package/PMRandom.class/instance/seed..st similarity index 70% rename from Math.pkg/snapshot/classes/PMRandom.class/instance/seed:.st rename to Math.package/PMRandom.class/instance/seed..st index 2d84f21..83ab00b 100644 --- a/Math.pkg/snapshot/classes/PMRandom.class/instance/seed:.st +++ b/Math.package/PMRandom.class/instance/seed..st @@ -1,7 +1,5 @@ - -!PMRandom methodsFor: 'initialize-release'! +initialize-release seed: anInteger "Set the seed of the Random stream to anInteger (or 1 if zero)." seed := anInteger max: 1 -! ! diff --git a/Math.package/PMRandom.class/properties.json b/Math.package/PMRandom.class/properties.json new file mode 100644 index 0000000..8426a7b --- /dev/null +++ b/Math.package/PMRandom.class/properties.json @@ -0,0 +1,16 @@ +{ + "category" : "Math-Random", + "classinstvars" : [ + ], + "classtraitcomposition" : "{}", + "classvars" : [ + ], + "commentStamp" : "hfm 3/24/2009 09:19", + "instvars" : [ + ], + "name" : "PMRandom", + "pools" : [ + ], + "super" : "RandomGenerator", + "traitcomposition" : "{}", + "type" : "normal" } diff --git a/Math.package/PoissonGenerator.class/README.md b/Math.package/PoissonGenerator.class/README.md new file mode 100644 index 0000000..e69de29 diff --git a/Math.package/PoissonGenerator.class/properties.json b/Math.package/PoissonGenerator.class/properties.json new file mode 100644 index 0000000..40cfc94 --- /dev/null +++ b/Math.package/PoissonGenerator.class/properties.json @@ -0,0 +1,16 @@ +{ + "category" : "Math-Random", + "classinstvars" : [ + ], + "classtraitcomposition" : "{}", + "classvars" : [ + ], + "commentStamp" : "", + "instvars" : [ + ], + "name" : "PoissonGenerator", + "pools" : [ + ], + "super" : "NumberGenerator", + "traitcomposition" : "{}", + "type" : "normal" } diff --git a/Math.pkg/snapshot/classes/RandomGenerator.class/RandomGenerator.st b/Math.package/RandomGenerator.class/README.md similarity index 84% rename from Math.pkg/snapshot/classes/RandomGenerator.class/RandomGenerator.st rename to Math.package/RandomGenerator.class/README.md index b7bb5f0..7aedb19 100644 --- a/Math.pkg/snapshot/classes/RandomGenerator.class/RandomGenerator.st +++ b/Math.package/RandomGenerator.class/README.md @@ -1,11 +1,3 @@ - -Object subclass: #RandomGenerator - instanceVariableNames: 'seed' - classVariableNames: '' - poolDictionaries: '' - category: 'Math-Random'! - -!RandomGenerator commentStamp: 'hfm 3/23/2009 21:02' prior: 0! This is the top abstract class of the pseudo-random numbers generator. The applications of PRNG's are many ones: @@ -37,4 +29,3 @@ Along these terms, deterministic RNG's are divided between: And finally, there's a taxonomy more related with the internal implementation, based on how the pseudo-generator make its random variables following a distribution function. -! diff --git a/Math.pkg/snapshot/classes/RandomGenerator.class/class/chiSquare:repeating:.st b/Math.package/RandomGenerator.class/class/chiSquare.repeating..st similarity index 94% rename from Math.pkg/snapshot/classes/RandomGenerator.class/class/chiSquare:repeating:.st rename to Math.package/RandomGenerator.class/class/chiSquare.repeating..st index 76c3b3b..47ef51c 100644 --- a/Math.pkg/snapshot/classes/RandomGenerator.class/class/chiSquare:repeating:.st +++ b/Math.package/RandomGenerator.class/class/chiSquare.repeating..st @@ -1,5 +1,4 @@ - -!RandomGenerator class methodsFor: 'testing'! +testing chiSquare: range repeating: anInteger "Run a 'chi-square' test on a random number generator, over a range of integers given by range, repeating anInteger times. @@ -21,4 +20,3 @@ chiSquare: range repeating: anInteger ^ Array with: ( range - ( 2 * range sqrt ) ) with: ( ( ave * range ) / anInteger) - anInteger asFloat with: ( range + ( 2 * range sqrt ) ) -! ! diff --git a/Math.package/RandomGenerator.class/class/new.st b/Math.package/RandomGenerator.class/class/new.st new file mode 100644 index 0000000..7d3e8d1 --- /dev/null +++ b/Math.package/RandomGenerator.class/class/new.st @@ -0,0 +1,5 @@ +instance creation +new + " Answer a new instance of the receiver " + + ^ ( self seed: Time millisecondClockValue ) initialize \ No newline at end of file diff --git a/Math.package/RandomGenerator.class/class/seed..st b/Math.package/RandomGenerator.class/class/seed..st new file mode 100644 index 0000000..402fa15 --- /dev/null +++ b/Math.package/RandomGenerator.class/class/seed..st @@ -0,0 +1,5 @@ +instance creation +seed: anInteger + "Anwer a new Random stream with the initial seed anInteger.." + + ^ self basicNew seed: anInteger; yourself \ No newline at end of file diff --git a/Math.pkg/snapshot/classes/RandomGenerator.class/instance/atEnd.st b/Math.package/RandomGenerator.class/instance/atEnd.st similarity index 70% rename from Math.pkg/snapshot/classes/RandomGenerator.class/instance/atEnd.st rename to Math.package/RandomGenerator.class/instance/atEnd.st index c00ec37..d318d0b 100644 --- a/Math.pkg/snapshot/classes/RandomGenerator.class/instance/atEnd.st +++ b/Math.package/RandomGenerator.class/instance/atEnd.st @@ -1,8 +1,6 @@ - -!RandomGenerator methodsFor: 'testing'! +testing atEnd "Answer whether the receiver is at its end - never true for a stream of Random numbers" ^ false -! ! diff --git a/Math.pkg/snapshot/classes/RandomGenerator.class/instance/contents.st b/Math.package/RandomGenerator.class/instance/contents.st similarity index 81% rename from Math.pkg/snapshot/classes/RandomGenerator.class/instance/contents.st rename to Math.package/RandomGenerator.class/instance/contents.st index eddeb1e..2ceb239 100644 --- a/Math.pkg/snapshot/classes/RandomGenerator.class/instance/contents.st +++ b/Math.package/RandomGenerator.class/instance/contents.st @@ -1,9 +1,7 @@ - -!RandomGenerator methodsFor: 'accessing'! +accessing contents "Answer all of the objects in the collection accessed by the receiver. Implementation Notes: Random streams are infinite, so there is no implementation possible." ^ self shouldNotImplement -! ! diff --git a/Math.package/RandomGenerator.class/instance/initialize.st b/Math.package/RandomGenerator.class/instance/initialize.st new file mode 100644 index 0000000..9471263 --- /dev/null +++ b/Math.package/RandomGenerator.class/instance/initialize.st @@ -0,0 +1,5 @@ +initialize-release +initialize + " Private - Initialize the receiver " + + ^ self subclassResponsibility \ No newline at end of file diff --git a/Math.pkg/snapshot/classes/RandomGenerator.class/instance/isReadable.st b/Math.package/RandomGenerator.class/instance/isReadable.st similarity index 72% rename from Math.pkg/snapshot/classes/RandomGenerator.class/instance/isReadable.st rename to Math.package/RandomGenerator.class/instance/isReadable.st index bf0a676..c3a8e2f 100644 --- a/Math.pkg/snapshot/classes/RandomGenerator.class/instance/isReadable.st +++ b/Math.package/RandomGenerator.class/instance/isReadable.st @@ -1,8 +1,6 @@ - -!RandomGenerator methodsFor: 'testing'! +testing isReadable "Answer whether the receiver can be read from (i.e. it implements the gettableStream protocol)." ^ true -! ! diff --git a/Math.pkg/snapshot/classes/RandomGenerator.class/instance/isWriteable.st b/Math.package/RandomGenerator.class/instance/isWriteable.st similarity index 73% rename from Math.pkg/snapshot/classes/RandomGenerator.class/instance/isWriteable.st rename to Math.package/RandomGenerator.class/instance/isWriteable.st index 367e924..44d540c 100644 --- a/Math.pkg/snapshot/classes/RandomGenerator.class/instance/isWriteable.st +++ b/Math.package/RandomGenerator.class/instance/isWriteable.st @@ -1,8 +1,6 @@ - -!RandomGenerator methodsFor: 'testing'! +testing isWriteable "Answer whether the receiver can be written to (i.e. it implements the puttableStream protocol)." ^ false -! ! diff --git a/Math.pkg/snapshot/classes/RandomGenerator.class/instance/next:.st b/Math.package/RandomGenerator.class/instance/next..st similarity index 75% rename from Math.pkg/snapshot/classes/RandomGenerator.class/instance/next:.st rename to Math.package/RandomGenerator.class/instance/next..st index 8ca73a5..7e871c5 100644 --- a/Math.pkg/snapshot/classes/RandomGenerator.class/instance/next:.st +++ b/Math.package/RandomGenerator.class/instance/next..st @@ -1,9 +1,7 @@ - -!RandomGenerator methodsFor: 'accessing'! +accessing next: anInteger " Answer an Array of anInteger pseudo-random Floats between 0 and 1. " ^ ( 1 to: anInteger ) collect: [ :i | self next ] -! ! diff --git a/Math.package/RandomGenerator.class/instance/next.st b/Math.package/RandomGenerator.class/instance/next.st new file mode 100644 index 0000000..b230c0b --- /dev/null +++ b/Math.package/RandomGenerator.class/instance/next.st @@ -0,0 +1,5 @@ +accessing +next + " Answer a pseudo-Random number " + + ^ self subclassResponsibility \ No newline at end of file diff --git a/Math.pkg/snapshot/classes/RandomGenerator.class/instance/peek.st b/Math.package/RandomGenerator.class/instance/peek.st similarity index 63% rename from Math.pkg/snapshot/classes/RandomGenerator.class/instance/peek.st rename to Math.package/RandomGenerator.class/instance/peek.st index 5b8fb94..0e3a532 100644 --- a/Math.pkg/snapshot/classes/RandomGenerator.class/instance/peek.st +++ b/Math.package/RandomGenerator.class/instance/peek.st @@ -1,7 +1,6 @@ - -!RandomGenerator methodsFor: 'accessing'! +accessing peek " Answer a pseudo-Random number generated from the next seed, but do not advance down the stream (i.e. self peek = self peek). " - ^ self subclassResponsibility! ! + ^ self subclassResponsibility \ No newline at end of file diff --git a/Math.pkg/snapshot/classes/RandomGenerator.class/instance/seed:.st b/Math.package/RandomGenerator.class/instance/seed..st similarity index 60% rename from Math.pkg/snapshot/classes/RandomGenerator.class/instance/seed:.st rename to Math.package/RandomGenerator.class/instance/seed..st index 488fecb..d8988c7 100644 --- a/Math.pkg/snapshot/classes/RandomGenerator.class/instance/seed:.st +++ b/Math.package/RandomGenerator.class/instance/seed..st @@ -1,7 +1,6 @@ - -!RandomGenerator methodsFor: 'accessing'! +accessing seed: anObject "Sets the instance var of the receiver with anObject. (No checking is done)" - seed := anObject! ! + seed := anObject \ No newline at end of file diff --git a/Math.pkg/snapshot/classes/RandomGenerator.class/instance/seed.st b/Math.package/RandomGenerator.class/instance/seed.st similarity index 59% rename from Math.pkg/snapshot/classes/RandomGenerator.class/instance/seed.st rename to Math.package/RandomGenerator.class/instance/seed.st index 49b07ea..72af8ed 100644 --- a/Math.pkg/snapshot/classes/RandomGenerator.class/instance/seed.st +++ b/Math.package/RandomGenerator.class/instance/seed.st @@ -1,7 +1,6 @@ - -!RandomGenerator methodsFor: 'accessing'! +accessing seed "Returns the instance var of the receiver for external manipulation" - ^ seed! ! + ^ seed \ No newline at end of file diff --git a/Math.package/RandomGenerator.class/properties.json b/Math.package/RandomGenerator.class/properties.json new file mode 100644 index 0000000..e86b98e --- /dev/null +++ b/Math.package/RandomGenerator.class/properties.json @@ -0,0 +1,16 @@ +{ + "category" : "Math-Random", + "classinstvars" : [ + ], + "classtraitcomposition" : "{}", + "classvars" : [ + ], + "commentStamp" : "hfm 3/23/2009 21:02", + "instvars" : [ + "seed" ], + "name" : "RandomGenerator", + "pools" : [ + ], + "super" : "Object", + "traitcomposition" : "{}", + "type" : "normal" } diff --git a/Math.pkg/categories.st b/Math.package/monticello.meta/categories.st similarity index 100% rename from Math.pkg/categories.st rename to Math.package/monticello.meta/categories.st diff --git a/Math.package/monticello.meta/initializers.st b/Math.package/monticello.meta/initializers.st new file mode 100644 index 0000000..e69de29 diff --git a/Math.pkg/package b/Math.package/monticello.meta/package similarity index 100% rename from Math.pkg/package rename to Math.package/monticello.meta/package diff --git a/Math.package/monticello.meta/version b/Math.package/monticello.meta/version new file mode 100644 index 0000000..b12c571 --- /dev/null +++ b/Math.package/monticello.meta/version @@ -0,0 +1 @@ +(name 'Math-SergeStinckwich.2' message 'Test for Smalltalk meetup 2' id '99ab11d7-3397-4c94-a49c-be76e887a297' date '18 April 2012' time '6:43:56.282 pm' author 'SergeStinckwich' ancestors ((name 'Math-SergeStinckwich.1' message 'First commit. Some random number generators' id '5d39ad32-40e7-4ed6-93e0-d20f8e8d6ad4' date '3 April 2012' time '12:13:07 am' author 'SergeStinckwich' ancestors () stepChildren ())) stepChildren ()) \ No newline at end of file diff --git a/Math.package/properties.json b/Math.package/properties.json new file mode 100644 index 0000000..f037444 --- /dev/null +++ b/Math.package/properties.json @@ -0,0 +1,2 @@ +{ + } diff --git a/Math.pkg/.filetree b/Math.pkg/.filetree deleted file mode 100644 index bc04e8f..0000000 --- a/Math.pkg/.filetree +++ /dev/null @@ -1,4 +0,0 @@ -{ - "noMethodMetaData" : true, - "separateMethodMetaAndSource" : false -} diff --git a/Math.pkg/snapshot/classes/BinomialGenerator.class/BinomialGenerator.st b/Math.pkg/snapshot/classes/BinomialGenerator.class/BinomialGenerator.st deleted file mode 100644 index c8c571a..0000000 --- a/Math.pkg/snapshot/classes/BinomialGenerator.class/BinomialGenerator.st +++ /dev/null @@ -1,6 +0,0 @@ - -NumberGenerator subclass: #BinomialGenerator - instanceVariableNames: 'n p rng' - classVariableNames: '' - poolDictionaries: '' - category: 'Math-Random'! diff --git a/Math.pkg/snapshot/classes/BinomialGenerator.class/instance/generator:.st b/Math.pkg/snapshot/classes/BinomialGenerator.class/instance/generator:.st deleted file mode 100644 index df53072..0000000 --- a/Math.pkg/snapshot/classes/BinomialGenerator.class/instance/generator:.st +++ /dev/null @@ -1,4 +0,0 @@ - -!BinomialGenerator methodsFor: 'as yet unclassified'! -generator: aRandomNumberGenerator - rng := aRandomNumberGenerator! ! diff --git a/Math.pkg/snapshot/classes/BinomialGenerator.class/instance/n:.st b/Math.pkg/snapshot/classes/BinomialGenerator.class/instance/n:.st deleted file mode 100644 index e3ef16b..0000000 --- a/Math.pkg/snapshot/classes/BinomialGenerator.class/instance/n:.st +++ /dev/null @@ -1,4 +0,0 @@ - -!BinomialGenerator methodsFor: 'as yet unclassified'! -n: numberOfTrials - n := numberOfTrials! ! diff --git a/Math.pkg/snapshot/classes/BinomialGenerator.class/instance/p:.st b/Math.pkg/snapshot/classes/BinomialGenerator.class/instance/p:.st deleted file mode 100644 index 8e5e8c2..0000000 --- a/Math.pkg/snapshot/classes/BinomialGenerator.class/instance/p:.st +++ /dev/null @@ -1,4 +0,0 @@ - -!BinomialGenerator methodsFor: 'as yet unclassified'! -p: aProbability - p := aProbability! ! diff --git a/Math.pkg/snapshot/classes/BinomialGeneratorTest.class/BinomialGeneratorTest.st b/Math.pkg/snapshot/classes/BinomialGeneratorTest.class/BinomialGeneratorTest.st deleted file mode 100644 index 96cb64d..0000000 --- a/Math.pkg/snapshot/classes/BinomialGeneratorTest.class/BinomialGeneratorTest.st +++ /dev/null @@ -1,6 +0,0 @@ - -TestCase subclass: #BinomialGeneratorTest - instanceVariableNames: '' - classVariableNames: '' - poolDictionaries: '' - category: 'Math-Random-Tests'! diff --git a/Math.pkg/snapshot/classes/ConstantGenerator.class/ConstantGenerator.st b/Math.pkg/snapshot/classes/ConstantGenerator.class/ConstantGenerator.st deleted file mode 100644 index b02cff5..0000000 --- a/Math.pkg/snapshot/classes/ConstantGenerator.class/ConstantGenerator.st +++ /dev/null @@ -1,9 +0,0 @@ - -NumberGenerator subclass: #ConstantGenerator - instanceVariableNames: 'constant' - classVariableNames: '' - poolDictionaries: '' - category: 'Math-Random'! - -!ConstantGenerator commentStamp: 'SergeStinckwich 3/30/2010 15:31' prior: 0! -A ConstantGenerator is not really a random number generator.! diff --git a/Math.pkg/snapshot/classes/ConstantGenerator.class/instance/constant:.st b/Math.pkg/snapshot/classes/ConstantGenerator.class/instance/constant:.st deleted file mode 100644 index f88aad3..0000000 --- a/Math.pkg/snapshot/classes/ConstantGenerator.class/instance/constant:.st +++ /dev/null @@ -1,4 +0,0 @@ - -!ConstantGenerator methodsFor: 'accessing'! -constant: aConstant - constant := aConstant! ! diff --git a/Math.pkg/snapshot/classes/ConstantGenerator.class/instance/next.st b/Math.pkg/snapshot/classes/ConstantGenerator.class/instance/next.st deleted file mode 100644 index be362a9..0000000 --- a/Math.pkg/snapshot/classes/ConstantGenerator.class/instance/next.st +++ /dev/null @@ -1,4 +0,0 @@ - -!ConstantGenerator methodsFor: 'accessing'! -next - ^ constant! ! diff --git a/Math.pkg/snapshot/classes/ConstantGeneratorTest.class/ConstantGeneratorTest.st b/Math.pkg/snapshot/classes/ConstantGeneratorTest.class/ConstantGeneratorTest.st deleted file mode 100644 index facd794..0000000 --- a/Math.pkg/snapshot/classes/ConstantGeneratorTest.class/ConstantGeneratorTest.st +++ /dev/null @@ -1,6 +0,0 @@ - -TestCase subclass: #ConstantGeneratorTest - instanceVariableNames: '' - classVariableNames: '' - poolDictionaries: '' - category: 'Math-Random-Tests'! diff --git a/Math.pkg/snapshot/classes/GaussianGenerator.class/GaussianGenerator.st b/Math.pkg/snapshot/classes/GaussianGenerator.class/GaussianGenerator.st deleted file mode 100644 index 67bfa79..0000000 --- a/Math.pkg/snapshot/classes/GaussianGenerator.class/GaussianGenerator.st +++ /dev/null @@ -1,6 +0,0 @@ - -NumberGenerator subclass: #GaussianGenerator - instanceVariableNames: 'rng mean standardDeviation hasNextGaussian nextGaussian' - classVariableNames: '' - poolDictionaries: '' - category: 'Math-Random'! diff --git a/Math.pkg/snapshot/classes/GaussianGenerator.class/instance/generator:.st b/Math.pkg/snapshot/classes/GaussianGenerator.class/instance/generator:.st deleted file mode 100644 index aaaa27d..0000000 --- a/Math.pkg/snapshot/classes/GaussianGenerator.class/instance/generator:.st +++ /dev/null @@ -1,4 +0,0 @@ - -!GaussianGenerator methodsFor: 'as yet unclassified'! -generator: aRandomNumberGenerator - rng := aRandomNumberGenerator! ! diff --git a/Math.pkg/snapshot/classes/GaussianGenerator.class/instance/initialize.st b/Math.pkg/snapshot/classes/GaussianGenerator.class/instance/initialize.st deleted file mode 100644 index e5c73a0..0000000 --- a/Math.pkg/snapshot/classes/GaussianGenerator.class/instance/initialize.st +++ /dev/null @@ -1,4 +0,0 @@ - -!GaussianGenerator methodsFor: 'as yet unclassified'! -initialize - hasNextGaussian := false! ! diff --git a/Math.pkg/snapshot/classes/GaussianGenerator.class/instance/mean:.st b/Math.pkg/snapshot/classes/GaussianGenerator.class/instance/mean:.st deleted file mode 100644 index b5b39bc..0000000 --- a/Math.pkg/snapshot/classes/GaussianGenerator.class/instance/mean:.st +++ /dev/null @@ -1,4 +0,0 @@ - -!GaussianGenerator methodsFor: 'as yet unclassified'! -mean: aMeanValue - mean := aMeanValue! ! diff --git a/Math.pkg/snapshot/classes/GaussianGenerator.class/instance/next.st b/Math.pkg/snapshot/classes/GaussianGenerator.class/instance/next.st deleted file mode 100644 index d2ac0a1..0000000 --- a/Math.pkg/snapshot/classes/GaussianGenerator.class/instance/next.st +++ /dev/null @@ -1,4 +0,0 @@ - -!GaussianGenerator methodsFor: 'as yet unclassified'! -next - ^ self nextGaussianNormalized * standardDeviation + mean! ! diff --git a/Math.pkg/snapshot/classes/GaussianGenerator.class/instance/standardDeviation:.st b/Math.pkg/snapshot/classes/GaussianGenerator.class/instance/standardDeviation:.st deleted file mode 100644 index f579340..0000000 --- a/Math.pkg/snapshot/classes/GaussianGenerator.class/instance/standardDeviation:.st +++ /dev/null @@ -1,4 +0,0 @@ - -!GaussianGenerator methodsFor: 'as yet unclassified'! -standardDeviation: aStandardDeviation - standardDeviation := aStandardDeviation! ! diff --git a/Math.pkg/snapshot/classes/GaussianGeneratorTest.class/GaussianGeneratorTest.st b/Math.pkg/snapshot/classes/GaussianGeneratorTest.class/GaussianGeneratorTest.st deleted file mode 100644 index 0c31132..0000000 --- a/Math.pkg/snapshot/classes/GaussianGeneratorTest.class/GaussianGeneratorTest.st +++ /dev/null @@ -1,6 +0,0 @@ - -TestCase subclass: #GaussianGeneratorTest - instanceVariableNames: '' - classVariableNames: '' - poolDictionaries: '' - category: 'Math-Random-Tests'! diff --git a/Math.pkg/snapshot/classes/LCRandom.class/LCRandom.st b/Math.pkg/snapshot/classes/LCRandom.class/LCRandom.st deleted file mode 100644 index 9eba13e..0000000 --- a/Math.pkg/snapshot/classes/LCRandom.class/LCRandom.st +++ /dev/null @@ -1,11 +0,0 @@ - -RandomGenerator subclass: #LCRandom - instanceVariableNames: '' - classVariableNames: '' - poolDictionaries: '' - category: 'Math-Random'! - -!LCRandom commentStamp: 'hfm 3/23/2009 21:22' prior: 0! -This uses a quick and dirty Linear Congruential generator. - -LCRandom new next.! diff --git a/Math.pkg/snapshot/classes/LCRandom.class/instance/initialize.st b/Math.pkg/snapshot/classes/LCRandom.class/instance/initialize.st deleted file mode 100644 index a5da04f..0000000 --- a/Math.pkg/snapshot/classes/LCRandom.class/instance/initialize.st +++ /dev/null @@ -1,4 +0,0 @@ - -!LCRandom methodsFor: 'initialize-release'! -initialize - " Private - Answer the receiver "! ! diff --git a/Math.pkg/snapshot/classes/LCRandomTest.class/LCRandomTest.st b/Math.pkg/snapshot/classes/LCRandomTest.class/LCRandomTest.st deleted file mode 100644 index 59d40f2..0000000 --- a/Math.pkg/snapshot/classes/LCRandomTest.class/LCRandomTest.st +++ /dev/null @@ -1,6 +0,0 @@ - -TestCase subclass: #LCRandomTest - instanceVariableNames: '' - classVariableNames: '' - poolDictionaries: '' - category: 'Math-Random-Tests'! diff --git a/Math.pkg/snapshot/classes/LCRandomTest.class/instance/testPeekAlwaysReplyTheSameValue.st b/Math.pkg/snapshot/classes/LCRandomTest.class/instance/testPeekAlwaysReplyTheSameValue.st deleted file mode 100644 index 8ec2b4e..0000000 --- a/Math.pkg/snapshot/classes/LCRandomTest.class/instance/testPeekAlwaysReplyTheSameValue.st +++ /dev/null @@ -1,6 +0,0 @@ - -!LCRandomTest methodsFor: 'tests'! -testPeekAlwaysReplyTheSameValue - | g | - g := LCRandom new. - self assert: g peek = g peek! ! diff --git a/Math.pkg/snapshot/classes/LehmerRandom.class/LehmerRandom.st b/Math.pkg/snapshot/classes/LehmerRandom.class/LehmerRandom.st deleted file mode 100644 index 3a258f4..0000000 --- a/Math.pkg/snapshot/classes/LehmerRandom.class/LehmerRandom.st +++ /dev/null @@ -1,11 +0,0 @@ - -RandomGenerator subclass: #LehmerRandom - instanceVariableNames: '' - classVariableNames: '' - poolDictionaries: '' - category: 'Math-Random'! - -!LehmerRandom commentStamp: 'hfm 3/23/2009 21:22' prior: 0! -This generator uses the Lehmer's Linear Congruential method. - -LehmerRandom new next! diff --git a/Math.pkg/snapshot/classes/LehmerRandom.class/instance/initialize.st b/Math.pkg/snapshot/classes/LehmerRandom.class/instance/initialize.st deleted file mode 100644 index 7c30576..0000000 --- a/Math.pkg/snapshot/classes/LehmerRandom.class/instance/initialize.st +++ /dev/null @@ -1,4 +0,0 @@ - -!LehmerRandom methodsFor: 'initialize-release'! -initialize - " Private - Answer the receiver "! ! diff --git a/Math.pkg/snapshot/classes/LehmerRandom.class/instance/peek.st b/Math.pkg/snapshot/classes/LehmerRandom.class/instance/peek.st deleted file mode 100644 index 658207e..0000000 --- a/Math.pkg/snapshot/classes/LehmerRandom.class/instance/peek.st +++ /dev/null @@ -1,6 +0,0 @@ - -!LehmerRandom methodsFor: 'accessing'! -peek - "Private - Answer a pseudo-Random floating point number between 0 and 1." - - ^ self peekSeed / SmallInteger maxVal asFloat! ! diff --git a/Math.pkg/snapshot/classes/LehmerRandomTest.class/LehmerRandomTest.st b/Math.pkg/snapshot/classes/LehmerRandomTest.class/LehmerRandomTest.st deleted file mode 100644 index 19db8a2..0000000 --- a/Math.pkg/snapshot/classes/LehmerRandomTest.class/LehmerRandomTest.st +++ /dev/null @@ -1,6 +0,0 @@ - -TestCase subclass: #LehmerRandomTest - instanceVariableNames: '' - classVariableNames: '' - poolDictionaries: '' - category: 'Math-Random-Tests'! diff --git a/Math.pkg/snapshot/classes/LehmerRandomTest.class/instance/testPeekAlwaysReplyTheSameValue.st b/Math.pkg/snapshot/classes/LehmerRandomTest.class/instance/testPeekAlwaysReplyTheSameValue.st deleted file mode 100644 index 4c181ce..0000000 --- a/Math.pkg/snapshot/classes/LehmerRandomTest.class/instance/testPeekAlwaysReplyTheSameValue.st +++ /dev/null @@ -1,6 +0,0 @@ - -!LehmerRandomTest methodsFor: 'tests'! -testPeekAlwaysReplyTheSameValue - | g | - g := LehmerRandom new. - self assert: g peek = g peek! ! diff --git a/Math.pkg/snapshot/classes/MersenneTwisterRandom.class/MersenneTwisterRandom.st b/Math.pkg/snapshot/classes/MersenneTwisterRandom.class/MersenneTwisterRandom.st deleted file mode 100644 index 2aa7f92..0000000 --- a/Math.pkg/snapshot/classes/MersenneTwisterRandom.class/MersenneTwisterRandom.st +++ /dev/null @@ -1,17 +0,0 @@ - -RandomGenerator subclass: #MersenneTwisterRandom - instanceVariableNames: 'states mti' - classVariableNames: 'DefaultLengthVector Mt19937LowerMask Mt19937Mask Mt19937MatrixA Mt19937UpperMask PeriodParameter TemperingMaskB TemperingMaskC' - poolDictionaries: '' - category: 'Math-Random'! - -!MersenneTwisterRandom commentStamp: 'hfm 3/24/2009 08:27' prior: 0! -See http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html - -" To get a pseudo-random float " -MersenneTwisterRandom new next. - -" To get a pseudo-random integer " -MersenneTwisterRandom new nextInteger. - -! diff --git a/Math.pkg/snapshot/classes/MersenneTwisterRandom.class/instance/nextFloat.st b/Math.pkg/snapshot/classes/MersenneTwisterRandom.class/instance/nextFloat.st deleted file mode 100644 index e94bf0b..0000000 --- a/Math.pkg/snapshot/classes/MersenneTwisterRandom.class/instance/nextFloat.st +++ /dev/null @@ -1,6 +0,0 @@ - -!MersenneTwisterRandom methodsFor: 'accessing'! -nextFloat - " Answer a random float number in the interval [ 0 , 1 ] " - - ^ self nextInteger * ( 1.0 / 4294967295.0 )! ! diff --git a/Math.pkg/snapshot/classes/MersenneTwisterRandom.class/instance/nextFloatExcludeUpper.st b/Math.pkg/snapshot/classes/MersenneTwisterRandom.class/instance/nextFloatExcludeUpper.st deleted file mode 100644 index 78a5c78..0000000 --- a/Math.pkg/snapshot/classes/MersenneTwisterRandom.class/instance/nextFloatExcludeUpper.st +++ /dev/null @@ -1,6 +0,0 @@ - -!MersenneTwisterRandom methodsFor: 'accessing'! -nextFloatExcludeUpper - " Answer a random float number in the interval [ 0 , 1 ) " - - ^ self nextInteger * ( 1.0 / 4294967296.0 )! ! diff --git a/Math.pkg/snapshot/classes/MersenneTwisterRandomTest.class/MersenneTwisterRandomTest.st b/Math.pkg/snapshot/classes/MersenneTwisterRandomTest.class/MersenneTwisterRandomTest.st deleted file mode 100644 index 8488396..0000000 --- a/Math.pkg/snapshot/classes/MersenneTwisterRandomTest.class/MersenneTwisterRandomTest.st +++ /dev/null @@ -1,6 +0,0 @@ - -TestCase subclass: #MersenneTwisterRandomTest - instanceVariableNames: '' - classVariableNames: '' - poolDictionaries: '' - category: 'Math-Random-Tests'! diff --git a/Math.pkg/snapshot/classes/MersenneTwisterRandomTest.class/instance/testPeekAlwaysReplyTheSameValue.st b/Math.pkg/snapshot/classes/MersenneTwisterRandomTest.class/instance/testPeekAlwaysReplyTheSameValue.st deleted file mode 100644 index ae0e7d4..0000000 --- a/Math.pkg/snapshot/classes/MersenneTwisterRandomTest.class/instance/testPeekAlwaysReplyTheSameValue.st +++ /dev/null @@ -1,6 +0,0 @@ - -!MersenneTwisterRandomTest methodsFor: 'as yet unclassified'! -testPeekAlwaysReplyTheSameValue - | g | - g := MersenneTwisterRandom new. - self assert: g peek = g peek! ! diff --git a/Math.pkg/snapshot/classes/NumberGenerator.class/NumberGenerator.st b/Math.pkg/snapshot/classes/NumberGenerator.class/NumberGenerator.st deleted file mode 100644 index 6a57c27..0000000 --- a/Math.pkg/snapshot/classes/NumberGenerator.class/NumberGenerator.st +++ /dev/null @@ -1,6 +0,0 @@ - -Object subclass: #NumberGenerator - instanceVariableNames: '' - classVariableNames: '' - poolDictionaries: '' - category: 'Math-Random'! diff --git a/Math.pkg/snapshot/classes/NumberGenerator.class/instance/next.st b/Math.pkg/snapshot/classes/NumberGenerator.class/instance/next.st deleted file mode 100644 index 995310c..0000000 --- a/Math.pkg/snapshot/classes/NumberGenerator.class/instance/next.st +++ /dev/null @@ -1,4 +0,0 @@ - -!NumberGenerator methodsFor: 'accessing'! -next - ^ self subclassResponsibility! ! diff --git a/Math.pkg/snapshot/classes/PMRandom.class/PMRandom.st b/Math.pkg/snapshot/classes/PMRandom.class/PMRandom.st deleted file mode 100644 index 684b892..0000000 --- a/Math.pkg/snapshot/classes/PMRandom.class/PMRandom.st +++ /dev/null @@ -1,11 +0,0 @@ - -RandomGenerator subclass: #PMRandom - instanceVariableNames: '' - classVariableNames: '' - poolDictionaries: '' - category: 'Math-Random'! - -!PMRandom commentStamp: 'hfm 3/24/2009 09:19' prior: 0! -Uses Park and Miller's 'Minimum Standard' Congruential generator. See 'Numerical Recipes in C', 2nd Edition; Press, Flannery, Teukolsky and Vetterling; Cambridge University Press, 1992. - -PMRandom new next! diff --git a/Math.pkg/snapshot/classes/PMRandom.class/instance/initialize.st b/Math.pkg/snapshot/classes/PMRandom.class/instance/initialize.st deleted file mode 100644 index ac346ab..0000000 --- a/Math.pkg/snapshot/classes/PMRandom.class/instance/initialize.st +++ /dev/null @@ -1,4 +0,0 @@ - -!PMRandom methodsFor: 'initialize-release'! -initialize - " Private - Answer the receiver "! ! diff --git a/Math.pkg/snapshot/classes/PoissonGenerator.class/PoissonGenerator.st b/Math.pkg/snapshot/classes/PoissonGenerator.class/PoissonGenerator.st deleted file mode 100644 index 6f7055f..0000000 --- a/Math.pkg/snapshot/classes/PoissonGenerator.class/PoissonGenerator.st +++ /dev/null @@ -1,6 +0,0 @@ - -NumberGenerator subclass: #PoissonGenerator - instanceVariableNames: '' - classVariableNames: '' - poolDictionaries: '' - category: 'Math-Random'! diff --git a/Math.pkg/snapshot/classes/RandomGenerator.class/class/new.st b/Math.pkg/snapshot/classes/RandomGenerator.class/class/new.st deleted file mode 100644 index a320ea2..0000000 --- a/Math.pkg/snapshot/classes/RandomGenerator.class/class/new.st +++ /dev/null @@ -1,6 +0,0 @@ - -!RandomGenerator class methodsFor: 'instance creation'! -new - " Answer a new instance of the receiver " - - ^ ( self seed: Time millisecondClockValue ) initialize! ! diff --git a/Math.pkg/snapshot/classes/RandomGenerator.class/class/seed:.st b/Math.pkg/snapshot/classes/RandomGenerator.class/class/seed:.st deleted file mode 100644 index 0e6971e..0000000 --- a/Math.pkg/snapshot/classes/RandomGenerator.class/class/seed:.st +++ /dev/null @@ -1,6 +0,0 @@ - -!RandomGenerator class methodsFor: 'instance creation'! -seed: anInteger - "Anwer a new Random stream with the initial seed anInteger.." - - ^ self basicNew seed: anInteger; yourself! ! diff --git a/Math.pkg/snapshot/classes/RandomGenerator.class/instance/initialize.st b/Math.pkg/snapshot/classes/RandomGenerator.class/instance/initialize.st deleted file mode 100644 index 629653a..0000000 --- a/Math.pkg/snapshot/classes/RandomGenerator.class/instance/initialize.st +++ /dev/null @@ -1,6 +0,0 @@ - -!RandomGenerator methodsFor: 'initialize-release'! -initialize - " Private - Initialize the receiver " - - ^ self subclassResponsibility! ! diff --git a/Math.pkg/snapshot/classes/RandomGenerator.class/instance/next.st b/Math.pkg/snapshot/classes/RandomGenerator.class/instance/next.st deleted file mode 100644 index ec495b3..0000000 --- a/Math.pkg/snapshot/classes/RandomGenerator.class/instance/next.st +++ /dev/null @@ -1,6 +0,0 @@ - -!RandomGenerator methodsFor: 'accessing'! -next - " Answer a pseudo-Random number " - - ^ self subclassResponsibility! ! diff --git a/Math.pkg/version b/Math.pkg/version deleted file mode 100644 index 8f5a9c2..0000000 --- a/Math.pkg/version +++ /dev/null @@ -1 +0,0 @@ -(name 'Math-SergeStinckwich.1' message 'First commit. Some random number generators' id '5d39ad32-40e7-4ed6-93e0-d20f8e8d6ad4' date '3 April 2012' time '12:13:07 am' author 'SergeStinckwich' ancestors () stepChildren ()) \ No newline at end of file