diff --git a/src/BaselineOfPolyMath/BaselineOfPolyMath.class.st b/src/BaselineOfPolyMath/BaselineOfPolyMath.class.st index edfbb475d..bd9e67ae8 100644 --- a/src/BaselineOfPolyMath/BaselineOfPolyMath.class.st +++ b/src/BaselineOfPolyMath/BaselineOfPolyMath.class.st @@ -46,16 +46,10 @@ BaselineOfPolyMath >> baseline: spec [ package: 'Math-Complex' with: [ spec requires: #('Math-Numerical' 'Math-Polynomials') ]; package: 'Math-Helpers'; - package: 'Math-Core-Distribution' with: [ spec requires: #('PolyMathDataStructures') ]; + package: 'Math-Distributions' with: [ spec requires: #('PolyMathDataStructures' 'Math-Quantile' 'Math-Core-Process') ]; package: 'Math-Core-Process' with: [ spec requires: #('Math-Helpers') ]; - package: 'Math-Numerical' with: [ spec requires: #('PolyMathDataStructures' 'Math-Helpers' 'Math-Core-Process' 'Math-Core-Distribution' 'Math-DistributionGamma' 'Math-DistributionBeta' 'Math-DistributionForHistogram' 'Math-StatisticalMoments' 'Math-Series') ]; - package: 'Math-Polynomials' with: [ spec requires: #('PolyMathDataStructures' 'Math-Helpers' 'Math-Core-Process' 'Math-Core-Distribution' 'Math-DistributionGamma' 'Math-DistributionBeta' 'Math-DistributionForHistogram' 'Math-StatisticalMoments' 'Math-Series') ]; - package: 'Math-DistributionBeta' - with: [ spec requires: #('Math-DistributionGamma') ]; - package: 'Math-DistributionForHistogram' - with: [ spec requires: #('Math-Core-Distribution') ]; - package: 'Math-DistributionGamma' - with: [ spec requires: #('Math-Core-Distribution') ]; + package: 'Math-Numerical' with: [ spec requires: #('PolyMathDataStructures' 'Math-Helpers' 'Math-Core-Process' 'Math-Distributions' 'Math-StatisticalMoments' 'Math-Series') ]; + package: 'Math-Polynomials' with: [ spec requires: #('PolyMathDataStructures' 'Math-Helpers' 'Math-Core-Process' 'Math-Distributions' 'Math-StatisticalMoments' 'Math-Series') ]; package: 'Math-FastFourierTransform' with: [ spec requires: #('Math-Complex') ]; package: 'Math-FunctionFit' @@ -63,9 +57,6 @@ BaselineOfPolyMath >> baseline: spec [ requires: #('Math-Numerical' 'Math-Chromosome' 'Math-Accuracy-Core' 'PolyMathDataStructures' 'Math-Helpers' 'Math-Polynomials') ]; package: 'Math-KDTree'; - package: 'Math-KernelSmoothing' with: [ spec requires: #('Math-Quantile' 'Math-Numerical' 'Math-Polynomials') ]; - package: 'Math-KolmogorovSmirnov' - with: [ spec requires: #('Math-Numerical' 'Math-Polynomials') ]; package: 'Math-Number-Extensions'; package: 'Math-ODE' with: [ spec requires: #('Math-Numerical' 'PolyMathDataStructures' 'Math-Polynomials') ]; package: 'Math-Permutation' with: [ spec requires: #('PolyMathDataStructures' 'Math-Core-Process') ]; @@ -76,18 +67,18 @@ BaselineOfPolyMath >> baseline: spec [ with: [ spec requires: #('Math-Complex' 'Math-Numerical' 'Math-Polynomials') ]; package: 'Math-Series'; - package: 'Math-StatisticalMoments' with: [ spec requires: #('Math-Helpers' 'Math-DistributionForHistogram') ]; + package: 'Math-StatisticalMoments' with: [ spec requires: #('Math-Helpers' 'Math-Distributions') ]; package: 'Math-TSNE'; package: 'Math-Tests-Accuracy' with: [ spec requires: #('Math-Accuracy-Core') ]; package: 'Math-Tests-ArbitraryPrecisionFloat' with: [ spec requires: #('Math-ArbitraryPrecisionFloat') ]; package: 'Math-Tests-AutomaticDifferenciation' with: [ spec requires: #('Math-AutomaticDifferenciation' 'PolyMathDataStructures') ]; - package: 'Math-Tests-Clustering' with: [ spec requires: #('Math-Clustering' 'Math-Core-Distribution' 'Math-UtilsDataServer') ]; + package: 'Math-Tests-Clustering' with: [ spec requires: #('Math-Clustering' 'Math-Distributions' 'Math-UtilsDataServer') ]; package: 'Math-Tests-Complex' with: [ spec requires: #('Math-Complex') ]; - package: 'Math-Tests-Core-Distribution' - with: [ spec requires: #('Math-Core-Distribution') ]; + package: 'Math-Tests-Distributions' + with: [ spec requires: #('Math-Distributions') ]; package: 'Math-Tests-Core-Process' with: [ spec requires: #('Math-Core-Process') ]; package: 'Math-Tests-Numerical' @@ -98,11 +89,6 @@ BaselineOfPolyMath >> baseline: spec [ package: 'Math-Tests-FunctionFit'; package: 'Math-Tests-KDTree' with: [ spec requires: #('Math-KDTree') ]; - package: 'Math-Tests-KernelSmoothing' - with: [ spec requires: #('Math-KernelSmoothing') ]; - package: 'Math-Tests-KolmogorovSmirnov' - with: [ spec - requires: #('Math-Numerical' 'Math-KolmogorovSmirnov' 'Math-Polynomials') ]; package: 'Math-Tests-Number-Extensions' with: [ spec requires: #('Math-Number-Extensions') ]; package: 'Math-Tests-ODE' with: [ spec requires: #('Math-ODE') ]; @@ -126,13 +112,13 @@ BaselineOfPolyMath >> baseline: spec [ with: #('Math-Benchmarks-ODE' 'Math-Benchmarks-KDTree'); group: 'Core' with: - #('Math-Complex' 'Math-Quaternion' 'Math-Numerical' 'MathRandomNumbers' 'Math-KDTree' 'Math-ODE' 'Math-ArbitraryPrecisionFloat' 'Math-FastFourierTransform' 'ExtendedNumberParser' 'Math-Quantile' 'Math-Physics-Constants' 'Math-Polynomials' 'Math-TSNE' 'Math-Core-Process' 'Math-Helpers' 'PolyMathDataStructures' 'Math-Core-Distribution'); + #('Math-Complex' 'Math-Quaternion' 'Math-Numerical' 'MathRandomNumbers' 'Math-KDTree' 'Math-ODE' 'Math-ArbitraryPrecisionFloat' 'Math-FastFourierTransform' 'ExtendedNumberParser' 'Math-Quantile' 'Math-Physics-Constants' 'Math-Polynomials' 'Math-TSNE' 'Math-Core-Process' 'Math-Helpers' 'PolyMathDataStructures' 'Math-Distributions'); group: 'Extensions' with: - #('Math-Clustering' 'Math-Number-Extensions' 'Math-Chromosome' 'Math-PrincipalComponentAnalysis' 'Math-FunctionFit' 'Math-AutomaticDifferenciation' 'Math-KernelSmoothing' 'Math-Permutation' 'Math-KolmogorovSmirnov'); + #('Math-Clustering' 'Math-Number-Extensions' 'Math-Chromosome' 'Math-PrincipalComponentAnalysis' 'Math-FunctionFit' 'Math-AutomaticDifferenciation' 'Math-Permutation'); group: 'Tests' with: - #('Math-Tests-Clustering' 'Math-Tests-Numerical' 'Math-Tests-Complex' 'Math-Tests-Quaternion' 'Math-Tests-ODE' 'Math-Tests-KDTree' 'Math-Tests-FunctionFit' 'Math-Tests-AutomaticDifferenciation' 'Math-Tests-FastFourierTransform' 'Math-Tests-Accuracy' 'Math-Tests-ArbitraryPrecisionFloat' 'Math-Tests-KolmogorovSmirnov' 'Math-Tests-Quantile' 'Math-Tests-Polynomials' 'Math-Tests-PrincipalComponentAnalysis' 'Math-Tests-KernelSmoothing' 'Math-Tests-Number-Extensions' 'Math-Tests-Permutation' 'Math-Tests-TSNE' 'Math-Tests-Core-Process' 'Math-Tests-Core-Distribution'); + #('Math-Tests-Clustering' 'Math-Tests-Numerical' 'Math-Tests-Complex' 'Math-Tests-Quaternion' 'Math-Tests-ODE' 'Math-Tests-KDTree' 'Math-Tests-FunctionFit' 'Math-Tests-AutomaticDifferenciation' 'Math-Tests-FastFourierTransform' 'Math-Tests-Accuracy' 'Math-Tests-ArbitraryPrecisionFloat' 'Math-Tests-Quantile' 'Math-Tests-Polynomials' 'Math-Tests-PrincipalComponentAnalysis' 'Math-Tests-Number-Extensions' 'Math-Tests-Permutation' 'Math-Tests-TSNE' 'Math-Tests-Core-Process' 'Math-Tests-Distributions'); group: 'default' with: #('Core' 'Extensions' 'Tests' 'Benchmarks' 'Accuracy') ]. diff --git a/src/Math-Core-Distribution/package.st b/src/Math-Core-Distribution/package.st deleted file mode 100644 index 789d40f1f..000000000 --- a/src/Math-Core-Distribution/package.st +++ /dev/null @@ -1 +0,0 @@ -Package { #name : #'Math-Core-Distribution' } diff --git a/src/Math-DistributionBeta/package.st b/src/Math-DistributionBeta/package.st deleted file mode 100644 index d732810c5..000000000 --- a/src/Math-DistributionBeta/package.st +++ /dev/null @@ -1 +0,0 @@ -Package { #name : #'Math-DistributionBeta' } diff --git a/src/Math-DistributionForHistogram/package.st b/src/Math-DistributionForHistogram/package.st deleted file mode 100644 index a725388d1..000000000 --- a/src/Math-DistributionForHistogram/package.st +++ /dev/null @@ -1 +0,0 @@ -Package { #name : #'Math-DistributionForHistogram' } diff --git a/src/Math-DistributionGamma/package.st b/src/Math-DistributionGamma/package.st deleted file mode 100644 index 32e797296..000000000 --- a/src/Math-DistributionGamma/package.st +++ /dev/null @@ -1 +0,0 @@ -Package { #name : #'Math-DistributionGamma' } diff --git a/src/Math-Distributions/ManifestMathDistributions.class.st b/src/Math-Distributions/ManifestMathDistributions.class.st new file mode 100644 index 000000000..884e25986 --- /dev/null +++ b/src/Math-Distributions/ManifestMathDistributions.class.st @@ -0,0 +1,8 @@ +" +Please describe the package using the class comment of the included manifest class. The manifest class also includes other additional metadata for the package. These meta data are used by other tools such as the SmalllintManifestChecker and the critics Browser +" +Class { + #name : #ManifestMathDistributions, + #superclass : #PackageManifest, + #category : #'Math-Distributions-Manifest' +} diff --git a/src/Math-DistributionGamma/PMAsymptoticChiSquareDistribution.class.st b/src/Math-Distributions/PMAsymptoticChiSquareDistribution.class.st similarity index 98% rename from src/Math-DistributionGamma/PMAsymptoticChiSquareDistribution.class.st rename to src/Math-Distributions/PMAsymptoticChiSquareDistribution.class.st index e0d08cc51..f7d56f83a 100644 --- a/src/Math-DistributionGamma/PMAsymptoticChiSquareDistribution.class.st +++ b/src/Math-Distributions/PMAsymptoticChiSquareDistribution.class.st @@ -6,7 +6,7 @@ Class { 'reducedDOF', 'normalDistribution' ], - #category : 'Math-DistributionGamma' + #category : #'Math-Distributions-Gamma' } { #category : #creation } diff --git a/src/Math-DistributionBeta/PMBetaDistribution.class.st b/src/Math-Distributions/PMBetaDistribution.class.st similarity index 99% rename from src/Math-DistributionBeta/PMBetaDistribution.class.st rename to src/Math-Distributions/PMBetaDistribution.class.st index abb77b346..c08c58f38 100644 --- a/src/Math-DistributionBeta/PMBetaDistribution.class.st +++ b/src/Math-Distributions/PMBetaDistribution.class.st @@ -9,7 +9,7 @@ Class { 'logNorm', 'incompleteBetaFunction' ], - #category : 'Math-DistributionBeta' + #category : #'Math-Distributions-Beta' } { #category : #information } diff --git a/src/Math-Numerical/PMCauchyDistribution.class.st b/src/Math-Distributions/PMCauchyDistribution.class.st similarity index 98% rename from src/Math-Numerical/PMCauchyDistribution.class.st rename to src/Math-Distributions/PMCauchyDistribution.class.st index 9b34d1297..785b462eb 100644 --- a/src/Math-Numerical/PMCauchyDistribution.class.st +++ b/src/Math-Distributions/PMCauchyDistribution.class.st @@ -8,7 +8,7 @@ Class { 'mu', 'beta' ], - #category : #'Math-Numerical-Math-Distribution' + #category : #'Math-Distributions' } { #category : #information } diff --git a/src/Math-DistributionGamma/PMChiSquareDistribution.class.st b/src/Math-Distributions/PMChiSquareDistribution.class.st similarity index 97% rename from src/Math-DistributionGamma/PMChiSquareDistribution.class.st rename to src/Math-Distributions/PMChiSquareDistribution.class.st index ce743ddf5..587a5f7c6 100644 --- a/src/Math-DistributionGamma/PMChiSquareDistribution.class.st +++ b/src/Math-Distributions/PMChiSquareDistribution.class.st @@ -1,7 +1,7 @@ Class { #name : #PMChiSquareDistribution, #superclass : #PMGammaDistribution, - #category : 'Math-DistributionGamma' + #category : #'Math-Distributions-Gamma' } { #category : #creation } diff --git a/src/Math-Core-Distribution/PMCongruentialRandomNumberGenerator.class.st b/src/Math-Distributions/PMCongruentialRandomNumberGenerator.class.st similarity index 98% rename from src/Math-Core-Distribution/PMCongruentialRandomNumberGenerator.class.st rename to src/Math-Distributions/PMCongruentialRandomNumberGenerator.class.st index aecbfc6bf..ba54324e2 100644 --- a/src/Math-Core-Distribution/PMCongruentialRandomNumberGenerator.class.st +++ b/src/Math-Distributions/PMCongruentialRandomNumberGenerator.class.st @@ -10,7 +10,7 @@ Class { #classVars : [ 'UniqueInstance' ], - #category : 'Math-Core-Distribution' + #category : #'Math-Distributions' } { #category : #creation } diff --git a/src/Math-Core-Distribution/PMErfApproximation.class.st b/src/Math-Distributions/PMErfApproximation.class.st similarity index 98% rename from src/Math-Core-Distribution/PMErfApproximation.class.st rename to src/Math-Distributions/PMErfApproximation.class.st index 98fa142cc..93baa51bb 100644 --- a/src/Math-Core-Distribution/PMErfApproximation.class.st +++ b/src/Math-Distributions/PMErfApproximation.class.st @@ -40,7 +40,7 @@ Class { #classVars : [ 'UniqueInstance' ], - #category : #'Math-Core-Distribution' + #category : #'Math-Distributions-Core' } { #category : #creation } diff --git a/src/Math-Numerical/PMExponentialDistribution.class.st b/src/Math-Distributions/PMExponentialDistribution.class.st similarity index 98% rename from src/Math-Numerical/PMExponentialDistribution.class.st rename to src/Math-Distributions/PMExponentialDistribution.class.st index 962727adb..59d566e70 100644 --- a/src/Math-Numerical/PMExponentialDistribution.class.st +++ b/src/Math-Distributions/PMExponentialDistribution.class.st @@ -4,7 +4,7 @@ Class { #instVars : [ 'beta' ], - #category : #'Math-Numerical-Math-Distribution' + #category : #'Math-Distributions' } { #category : #information } diff --git a/src/Math-DistributionForHistogram/PMFisherSnedecorDistribution.class.st b/src/Math-Distributions/PMFisherSnedecorDistribution.class.st similarity index 99% rename from src/Math-DistributionForHistogram/PMFisherSnedecorDistribution.class.st rename to src/Math-Distributions/PMFisherSnedecorDistribution.class.st index de3d56465..c098d8655 100644 --- a/src/Math-DistributionForHistogram/PMFisherSnedecorDistribution.class.st +++ b/src/Math-Distributions/PMFisherSnedecorDistribution.class.st @@ -9,7 +9,7 @@ Class { 'chiSquareDistribution2', 'incompleteBetaFunction' ], - #category : 'Math-DistributionForHistogram' + #category : #'Math-Distributions-ForHistogram' } { #category : #creation } diff --git a/src/Math-Numerical/PMFisherTippettDistribution.class.st b/src/Math-Distributions/PMFisherTippettDistribution.class.st similarity index 98% rename from src/Math-Numerical/PMFisherTippettDistribution.class.st rename to src/Math-Distributions/PMFisherTippettDistribution.class.st index 39a78a546..ea78be645 100644 --- a/src/Math-Numerical/PMFisherTippettDistribution.class.st +++ b/src/Math-Distributions/PMFisherTippettDistribution.class.st @@ -5,7 +5,7 @@ Class { 'alpha', 'beta' ], - #category : #'Math-Numerical-Math-Distribution' + #category : #'Math-Distributions' } { #category : #information } diff --git a/src/Math-DistributionGamma/PMGammaDistribution.class.st b/src/Math-Distributions/PMGammaDistribution.class.st similarity index 99% rename from src/Math-DistributionGamma/PMGammaDistribution.class.st rename to src/Math-Distributions/PMGammaDistribution.class.st index f88c0486a..e87269126 100644 --- a/src/Math-DistributionGamma/PMGammaDistribution.class.st +++ b/src/Math-Distributions/PMGammaDistribution.class.st @@ -8,7 +8,7 @@ Class { 'randomCoefficients', 'incompleteGammaFunction' ], - #category : 'Math-DistributionGamma' + #category : #'Math-Distributions-Gamma' } { #category : #information } diff --git a/src/Math-Numerical/PMHistogrammedDistribution.class.st b/src/Math-Distributions/PMHistogrammedDistribution.class.st similarity index 98% rename from src/Math-Numerical/PMHistogrammedDistribution.class.st rename to src/Math-Distributions/PMHistogrammedDistribution.class.st index 55ffb26af..034839be6 100644 --- a/src/Math-Numerical/PMHistogrammedDistribution.class.st +++ b/src/Math-Distributions/PMHistogrammedDistribution.class.st @@ -4,7 +4,7 @@ Class { #instVars : [ 'histogram' ], - #category : #'Math-Numerical' + #category : #'Math-Distributions' } { #category : #information } diff --git a/src/Math-Numerical/PMIncompleteBetaFractionTermServer.class.st b/src/Math-Distributions/PMIncompleteBetaFractionTermServer.class.st similarity index 94% rename from src/Math-Numerical/PMIncompleteBetaFractionTermServer.class.st rename to src/Math-Distributions/PMIncompleteBetaFractionTermServer.class.st index 71aa9aaf7..3d57d5178 100644 --- a/src/Math-Numerical/PMIncompleteBetaFractionTermServer.class.st +++ b/src/Math-Distributions/PMIncompleteBetaFractionTermServer.class.st @@ -5,7 +5,7 @@ Class { 'alpha1', 'alpha2' ], - #category : #'Math-Numerical' + #category : #'Math-Distributions-Beta' } { #category : #information } diff --git a/src/Math-DistributionBeta/PMIncompleteBetaFunction.class.st b/src/Math-Distributions/PMIncompleteBetaFunction.class.st similarity index 98% rename from src/Math-DistributionBeta/PMIncompleteBetaFunction.class.st rename to src/Math-Distributions/PMIncompleteBetaFunction.class.st index 155d131a3..6e28d3f5e 100644 --- a/src/Math-DistributionBeta/PMIncompleteBetaFunction.class.st +++ b/src/Math-Distributions/PMIncompleteBetaFunction.class.st @@ -8,7 +8,7 @@ Class { 'inverseFraction', 'logNorm' ], - #category : 'Math-DistributionBeta' + #category : #'Math-Distributions-Beta' } { #category : #creation } diff --git a/src/Math-Numerical/PMIncompleteGammaFractionTermServer.class.st b/src/Math-Distributions/PMIncompleteGammaFractionTermServer.class.st similarity index 93% rename from src/Math-Numerical/PMIncompleteGammaFractionTermServer.class.st rename to src/Math-Distributions/PMIncompleteGammaFractionTermServer.class.st index 7ed7ab202..941204890 100644 --- a/src/Math-Numerical/PMIncompleteGammaFractionTermServer.class.st +++ b/src/Math-Distributions/PMIncompleteGammaFractionTermServer.class.st @@ -4,7 +4,7 @@ Class { #instVars : [ 'alpha' ], - #category : #'Math-Numerical' + #category : #'Math-Distributions-Gamma' } { #category : #information } diff --git a/src/Math-DistributionGamma/PMIncompleteGammaFunction.class.st b/src/Math-Distributions/PMIncompleteGammaFunction.class.st similarity index 97% rename from src/Math-DistributionGamma/PMIncompleteGammaFunction.class.st rename to src/Math-Distributions/PMIncompleteGammaFunction.class.st index 0ee6188db..321b11e42 100644 --- a/src/Math-DistributionGamma/PMIncompleteGammaFunction.class.st +++ b/src/Math-Distributions/PMIncompleteGammaFunction.class.st @@ -7,7 +7,7 @@ Class { 'series', 'fraction' ], - #category : 'Math-DistributionGamma' + #category : #'Math-Distributions-Gamma' } { #category : #creation } diff --git a/src/Math-Numerical/PMIncompleteGammaSeriesTermServer.class.st b/src/Math-Distributions/PMIncompleteGammaSeriesTermServer.class.st similarity index 92% rename from src/Math-Numerical/PMIncompleteGammaSeriesTermServer.class.st rename to src/Math-Distributions/PMIncompleteGammaSeriesTermServer.class.st index fe48ab911..9bec12b2e 100644 --- a/src/Math-Numerical/PMIncompleteGammaSeriesTermServer.class.st +++ b/src/Math-Distributions/PMIncompleteGammaSeriesTermServer.class.st @@ -5,7 +5,7 @@ Class { 'alpha', 'sum' ], - #category : #'Math-Numerical' + #category : #'Math-Distributions-Gamma' } { #category : #information } diff --git a/src/Math-KernelSmoothing/PMKernelSmoothedDensity.class.st b/src/Math-Distributions/PMKernelSmoothedDensity.class.st similarity index 98% rename from src/Math-KernelSmoothing/PMKernelSmoothedDensity.class.st rename to src/Math-Distributions/PMKernelSmoothedDensity.class.st index 8ee861507..acdab60a7 100644 --- a/src/Math-KernelSmoothing/PMKernelSmoothedDensity.class.st +++ b/src/Math-Distributions/PMKernelSmoothedDensity.class.st @@ -16,7 +16,7 @@ Class { 'kernelName', 'ikernel' ], - #category : 'Math-KernelSmoothing' + #category : #'Math-Distributions-KernelSmoothing' } { #category : #information } diff --git a/src/Math-KolmogorovSmirnov/PMKolmogorovsDistribution.class.st b/src/Math-Distributions/PMKolmogorovsDistribution.class.st similarity index 97% rename from src/Math-KolmogorovSmirnov/PMKolmogorovsDistribution.class.st rename to src/Math-Distributions/PMKolmogorovsDistribution.class.st index cb00c7004..4eeba7655 100644 --- a/src/Math-KolmogorovSmirnov/PMKolmogorovsDistribution.class.st +++ b/src/Math-Distributions/PMKolmogorovsDistribution.class.st @@ -12,7 +12,7 @@ Class { 'distribution', 'n' ], - #category : #'Math-KolmogorovSmirnov' + #category : #'Math-Distributions-KolmogorovSmirnov' } { #category : #information } diff --git a/src/Math-Numerical/PMLaplaceDistribution.class.st b/src/Math-Distributions/PMLaplaceDistribution.class.st similarity index 98% rename from src/Math-Numerical/PMLaplaceDistribution.class.st rename to src/Math-Distributions/PMLaplaceDistribution.class.st index fd0077397..2236aa748 100644 --- a/src/Math-Numerical/PMLaplaceDistribution.class.st +++ b/src/Math-Distributions/PMLaplaceDistribution.class.st @@ -5,7 +5,7 @@ Class { 'mu', 'beta' ], - #category : #'Math-Numerical-Math-Distribution' + #category : #'Math-Distributions' } { #category : #information } diff --git a/src/Math-Numerical/PMLaplaceGenerator.class.st b/src/Math-Distributions/PMLaplaceGenerator.class.st similarity index 96% rename from src/Math-Numerical/PMLaplaceGenerator.class.st rename to src/Math-Distributions/PMLaplaceGenerator.class.st index 4976c9284..7341ff038 100644 --- a/src/Math-Numerical/PMLaplaceGenerator.class.st +++ b/src/Math-Distributions/PMLaplaceGenerator.class.st @@ -11,7 +11,7 @@ Class { 'laplaceDistribution', 'next' ], - #category : #'Math-Numerical' + #category : #'Math-Distributions' } { #category : #testing } diff --git a/src/Math-Numerical/PMLogNormalDistribution.class.st b/src/Math-Distributions/PMLogNormalDistribution.class.st similarity index 79% rename from src/Math-Numerical/PMLogNormalDistribution.class.st rename to src/Math-Distributions/PMLogNormalDistribution.class.st index 2f5463611..0a510fc96 100644 --- a/src/Math-Numerical/PMLogNormalDistribution.class.st +++ b/src/Math-Distributions/PMLogNormalDistribution.class.st @@ -1,10 +1,10 @@ Class { #name : #PMLogNormalDistribution, - #superclass : #PMProbabilityDensityWithUnknownDistribution, + #superclass : #PMProbabilityDensity, #instVars : [ 'normalDistribution' ], - #category : #'Math-Numerical' + #category : #'Math-Distributions-Normal' } { #category : #information } @@ -42,6 +42,13 @@ PMLogNormalDistribution class >> new: aNumber1 sigma: aNumber2 [ ^super new initialize: aNumber1 sigma: aNumber2 ] +{ #category : #information } +PMLogNormalDistribution >> acceptanceBetween: aNumber1 and: aNumber2 [ + "Answers the probability of observing a random variable distributed according to + the receiver with a value larger than aNumber 1 and lower than or equal to aNumber2." + ^( PMRombergIntegrator function: [:x| self value:x] from: aNumber1 to: aNumber2) evaluate +] + { #category : #information } PMLogNormalDistribution >> average [ "Answer the average of the receiver." @@ -54,6 +61,14 @@ PMLogNormalDistribution >> changeParametersBy: aVector [ normalDistribution changeParametersBy: aVector. ] +{ #category : #information } +PMLogNormalDistribution >> distributionValue: aNumber [ + "Answers the probability of observing a random variable distributed according to + the receiver with a value lower than or equal to aNumber. + This general purpose routine uses numerical integration." + ^( PMRombergIntegrator function: [:x| self value:x] from: self lowestValue to: aNumber) evaluate +] + { #category : #information } PMLogNormalDistribution >> fourthCentralMoment [ "Private" @@ -79,6 +94,11 @@ PMLogNormalDistribution >> kurtosis [ ^( ( x + 2) * x + 3) * ( x squared) - 6 ] +{ #category : #information } +PMLogNormalDistribution >> lowestValue [ + ^0 +] + { #category : #information } PMLogNormalDistribution >> parameters [ ^normalDistribution parameters diff --git a/src/Math-Core-Distribution/PMMitchellMooreGenerator.class.st b/src/Math-Distributions/PMMitchellMooreGenerator.class.st similarity index 98% rename from src/Math-Core-Distribution/PMMitchellMooreGenerator.class.st rename to src/Math-Distributions/PMMitchellMooreGenerator.class.st index fdee987b6..90ead562c 100644 --- a/src/Math-Core-Distribution/PMMitchellMooreGenerator.class.st +++ b/src/Math-Distributions/PMMitchellMooreGenerator.class.st @@ -9,7 +9,7 @@ Class { #classVars : [ 'UniqueInstance' ], - #category : #'Math-Core-Distribution' + #category : #'Math-Distributions' } { #category : #creation } diff --git a/src/Math-Core-Distribution/PMMultivariateNormalDistribution.class.st b/src/Math-Distributions/PMMultivariateNormalDistribution.class.st similarity index 98% rename from src/Math-Core-Distribution/PMMultivariateNormalDistribution.class.st rename to src/Math-Distributions/PMMultivariateNormalDistribution.class.st index 184653a3a..fca627b97 100644 --- a/src/Math-Core-Distribution/PMMultivariateNormalDistribution.class.st +++ b/src/Math-Distributions/PMMultivariateNormalDistribution.class.st @@ -5,7 +5,7 @@ Class { 'meanVector', 'covarianceMatrix' ], - #category : #'Math-Core-Distribution' + #category : #'Math-Distributions-Normal' } { #category : #'instance creation' } diff --git a/src/Math-Core-Distribution/PMNormalDistribution.class.st b/src/Math-Distributions/PMNormalDistribution.class.st similarity index 98% rename from src/Math-Core-Distribution/PMNormalDistribution.class.st rename to src/Math-Distributions/PMNormalDistribution.class.st index b37fedf81..7e7e4f080 100644 --- a/src/Math-Core-Distribution/PMNormalDistribution.class.st +++ b/src/Math-Distributions/PMNormalDistribution.class.st @@ -8,7 +8,7 @@ Class { #classVars : [ 'NextRandom' ], - #category : #'Math-Core-Distribution' + #category : #'Math-Distributions-Normal' } { #category : #information } diff --git a/src/Math-Core-Distribution/PMProbabilityDensity.class.st b/src/Math-Distributions/PMProbabilityDensity.class.st similarity index 99% rename from src/Math-Core-Distribution/PMProbabilityDensity.class.st rename to src/Math-Distributions/PMProbabilityDensity.class.st index b401aea4c..001a3c05f 100644 --- a/src/Math-Core-Distribution/PMProbabilityDensity.class.st +++ b/src/Math-Distributions/PMProbabilityDensity.class.st @@ -4,7 +4,7 @@ Class { #instVars : [ 'flatGenerator' ], - #category : #'Math-Core-Distribution' + #category : #'Math-Distributions-Core' } { #category : #information } diff --git a/src/Math-Numerical/PMProbabilityDistributionFunction.class.st b/src/Math-Distributions/PMProbabilityDistributionFunction.class.st similarity index 94% rename from src/Math-Numerical/PMProbabilityDistributionFunction.class.st rename to src/Math-Distributions/PMProbabilityDistributionFunction.class.st index 5019ea3cd..178a0e375 100644 --- a/src/Math-Numerical/PMProbabilityDistributionFunction.class.st +++ b/src/Math-Distributions/PMProbabilityDistributionFunction.class.st @@ -4,7 +4,7 @@ Class { #instVars : [ 'probabilityDensity' ], - #category : #'Math-Numerical' + #category : #'Math-Distributions' } { #category : #creation } diff --git a/src/Math-Numerical/PMRombergIntegrator.class.st b/src/Math-Distributions/PMRombergIntegrator.class.st similarity index 97% rename from src/Math-Numerical/PMRombergIntegrator.class.st rename to src/Math-Distributions/PMRombergIntegrator.class.st index 662894cf9..ff8fc4e9f 100644 --- a/src/Math-Numerical/PMRombergIntegrator.class.st +++ b/src/Math-Distributions/PMRombergIntegrator.class.st @@ -21,7 +21,7 @@ Class { 'points', 'interpolator' ], - #category : #'Math-Numerical' + #category : #'Math-Distributions-Core' } { #category : #information } diff --git a/src/Math-Numerical/PMSeriesTermServer.class.st b/src/Math-Distributions/PMSeriesTermServer.class.st similarity index 83% rename from src/Math-Numerical/PMSeriesTermServer.class.st rename to src/Math-Distributions/PMSeriesTermServer.class.st index 52db49989..bee067dbd 100644 --- a/src/Math-Numerical/PMSeriesTermServer.class.st +++ b/src/Math-Distributions/PMSeriesTermServer.class.st @@ -5,7 +5,7 @@ Class { 'x', 'lastTerm' ], - #category : #'Math-Numerical' + #category : #'Math-Distributions-Gamma' } { #category : #initialization } diff --git a/src/Math-Numerical/PMSimpsonIntegrator.class.st b/src/Math-Distributions/PMSimpsonIntegrator.class.st similarity index 90% rename from src/Math-Numerical/PMSimpsonIntegrator.class.st rename to src/Math-Distributions/PMSimpsonIntegrator.class.st index 2349de7f1..5b862ff09 100644 --- a/src/Math-Numerical/PMSimpsonIntegrator.class.st +++ b/src/Math-Distributions/PMSimpsonIntegrator.class.st @@ -1,7 +1,7 @@ Class { #name : #PMSimpsonIntegrator, #superclass : #PMTrapezeIntegrator, - #category : #'Math-Numerical' + #category : #'Math-Distributions-Core' } { #category : #operation } diff --git a/src/Math-DistributionForHistogram/PMStudentDistribution.class.st b/src/Math-Distributions/PMStudentDistribution.class.st similarity index 99% rename from src/Math-DistributionForHistogram/PMStudentDistribution.class.st rename to src/Math-Distributions/PMStudentDistribution.class.st index 75c63de21..faa82ecb7 100644 --- a/src/Math-DistributionForHistogram/PMStudentDistribution.class.st +++ b/src/Math-Distributions/PMStudentDistribution.class.st @@ -7,7 +7,7 @@ Class { 'chiSquareDistribution', 'incompleteBetaFunction' ], - #category : 'Math-DistributionForHistogram' + #category : #'Math-Distributions-ForHistogram' } { #category : #creation } diff --git a/src/Math-Numerical/PMTrapezeIntegrator.class.st b/src/Math-Distributions/PMTrapezeIntegrator.class.st similarity index 67% rename from src/Math-Numerical/PMTrapezeIntegrator.class.st rename to src/Math-Distributions/PMTrapezeIntegrator.class.st index da842e5df..e73f270e7 100644 --- a/src/Math-Numerical/PMTrapezeIntegrator.class.st +++ b/src/Math-Distributions/PMTrapezeIntegrator.class.st @@ -5,14 +5,15 @@ A PMTrapezeIntegrator is the base class for integration methods. You should not " Class { #name : #PMTrapezeIntegrator, - #superclass : #PMFunctionalIterator, + #superclass : #PMIterativeProcess, #instVars : [ + 'functionBlock', 'from', 'to', 'sum', 'step' ], - #category : #'Math-Numerical' + #category : #'Math-Distributions-Core' } { #category : #information } @@ -28,9 +29,10 @@ PMTrapezeIntegrator class >> function: aBlock from: aNumber1 to: aNumber2 [ { #category : #operation } PMTrapezeIntegrator >> computeInitialValues [ - "Private" + "Private" + step := to - from. - sum := ( ( functionBlock value: from) + ( functionBlock value: to)) * step /2. + sum := (functionBlock value: from) + (functionBlock value: to) * step / 2. result := sum ] @@ -69,3 +71,24 @@ PMTrapezeIntegrator >> initialize: aBlock from: aNumber1 to: aNumber2 [ functionBlock := aBlock. self from: aNumber1 to: aNumber2 ] + +{ #category : #initialization } +PMTrapezeIntegrator >> initializeIterations [ + "If no initial value has been defined, take 0 as the starting point (for lack of anything better)." + + super initializeIterations. + functionBlock ifNil: [ self error: 'No function supplied' ]. + self computeInitialValues +] + +{ #category : #information } +PMTrapezeIntegrator >> relativePrecision: aNumber [ + + ^ self precisionOf: aNumber relativeTo: result abs +] + +{ #category : #initialization } +PMTrapezeIntegrator >> setFunction: aBlock [ + + functionBlock := aBlock +] diff --git a/src/Math-Numerical/PMTriangularDistribution.class.st b/src/Math-Distributions/PMTriangularDistribution.class.st similarity index 99% rename from src/Math-Numerical/PMTriangularDistribution.class.st rename to src/Math-Distributions/PMTriangularDistribution.class.st index 01e5f05af..2c2dbad5f 100644 --- a/src/Math-Numerical/PMTriangularDistribution.class.st +++ b/src/Math-Distributions/PMTriangularDistribution.class.st @@ -6,7 +6,7 @@ Class { 'highLimit', 'peak' ], - #category : #'Math-Numerical' + #category : #'Math-Distributions' } { #category : #information } diff --git a/src/Math-Numerical/PMUniformDistribution.class.st b/src/Math-Distributions/PMUniformDistribution.class.st similarity index 98% rename from src/Math-Numerical/PMUniformDistribution.class.st rename to src/Math-Distributions/PMUniformDistribution.class.st index 69d59ed63..b988d797a 100644 --- a/src/Math-Numerical/PMUniformDistribution.class.st +++ b/src/Math-Distributions/PMUniformDistribution.class.st @@ -5,7 +5,7 @@ Class { 'lowLimit', 'highLimit' ], - #category : #'Math-Numerical' + #category : #'Math-Distributions' } { #category : #public } diff --git a/src/Math-Numerical/PMWeibullDistribution.class.st b/src/Math-Distributions/PMWeibullDistribution.class.st similarity index 99% rename from src/Math-Numerical/PMWeibullDistribution.class.st rename to src/Math-Distributions/PMWeibullDistribution.class.st index 5ef1c1f36..c6f19090a 100644 --- a/src/Math-Numerical/PMWeibullDistribution.class.st +++ b/src/Math-Distributions/PMWeibullDistribution.class.st @@ -6,7 +6,7 @@ Class { 'beta', 'norm' ], - #category : #'Math-Numerical' + #category : #'Math-Distributions' } { #category : #information } diff --git a/src/Math-Distributions/package.st b/src/Math-Distributions/package.st new file mode 100644 index 000000000..fecc5924c --- /dev/null +++ b/src/Math-Distributions/package.st @@ -0,0 +1 @@ +Package { #name : #'Math-Distributions' } diff --git a/src/Math-KernelSmoothing/package.st b/src/Math-KernelSmoothing/package.st deleted file mode 100644 index 2922ef1e3..000000000 --- a/src/Math-KernelSmoothing/package.st +++ /dev/null @@ -1 +0,0 @@ -Package { #name : #'Math-KernelSmoothing' } diff --git a/src/Math-KolmogorovSmirnov/package.st b/src/Math-KolmogorovSmirnov/package.st deleted file mode 100644 index e22da989a..000000000 --- a/src/Math-KolmogorovSmirnov/package.st +++ /dev/null @@ -1 +0,0 @@ -Package { #name : #'Math-KolmogorovSmirnov' } diff --git a/src/Math-Numerical/PMFunctionalIterator.class.st b/src/Math-Numerical/PMFunctionalIterator.class.st index 8287fbe9f..810208647 100644 --- a/src/Math-Numerical/PMFunctionalIterator.class.st +++ b/src/Math-Numerical/PMFunctionalIterator.class.st @@ -36,19 +36,19 @@ PMFunctionalIterator >> computeInitialValues [ { #category : #operation } PMFunctionalIterator >> initializeIterations [ "If no initial value has been defined, take 0 as the starting point (for lack of anything better)." - - functionBlock isNil ifTrue: [self error: 'No function supplied']. + super initializeIterations. + functionBlock ifNil: [self error: 'No function supplied']. self computeInitialValues ] { #category : #information } PMFunctionalIterator >> relativePrecision: aNumber [ - ^self precisionOf: aNumber relativeTo: result abs + + ^ self precisionOf: aNumber relativeTo: result abs ] { #category : #initialization } PMFunctionalIterator >> setFunction: aBlock [ - ( aBlock respondsTo: #value:) - ifFalse:[ self error: 'Function block must implement the method value:']. + functionBlock := aBlock ] diff --git a/src/Math-Numerical/PMIncompleteBetaFunctionFraction.class.st b/src/Math-Numerical/PMIncompleteBetaFunctionFraction.class.st deleted file mode 100644 index fa2eb7679..000000000 --- a/src/Math-Numerical/PMIncompleteBetaFunctionFraction.class.st +++ /dev/null @@ -1,70 +0,0 @@ -Class { - #name : #PMIncompleteBetaFunctionFraction, - #superclass : #PMIterativeProcess, - #instVars : [ - 'x', - 'q1', - 'q2', - 'q3', - 'numerator', - 'denominator', - 'alpha1', - 'alpha2' - ], - #category : #'Math-Numerical' -} - -{ #category : #creation } -PMIncompleteBetaFunctionFraction class >> shape: aNumber1 shape: aNumber2 [ - "Create an instance of the receiver with given shape parameters." - - ^ super new initialize: aNumber1 shape: aNumber2 -] - -{ #category : #operation } -PMIncompleteBetaFunctionFraction >> evaluateIteration [ - "Compute and add the next term of the fraction." - - | m m2 temp | - m := iterations + 1. - m2 := m * 2. - temp := m * (alpha2 - m) * x - / ((q3 + m2) * (alpha1 + m2)). - denominator := self limitedSmallValue: ( denominator * temp + 1). - numerator := self limitedSmallValue: ( temp / numerator + 1). - denominator := 1 / denominator. - result := result * numerator * denominator. - temp := (alpha1 + m) negated * (q1 + m) * x - / ((q2 + m2) * (alpha1 + m2)). - denominator := self limitedSmallValue: ( denominator * temp + 1). - numerator := self limitedSmallValue: ( temp / numerator + 1). - denominator := 1 / denominator. - temp := numerator * denominator. - result := result * temp. - ^(temp - 1) abs -] - -{ #category : #initialization } -PMIncompleteBetaFunctionFraction >> initialize: aNumber1 shape: aNumber2 [ - "Private - Initialize the parameters of the receiver." - - alpha1 := aNumber1. - alpha2 := aNumber2. - q1 := alpha1 + alpha2. - q2 := alpha1 + 1. - q3 := alpha1 - 1 -] - -{ #category : #operation } -PMIncompleteBetaFunctionFraction >> initializeIterations [ - "Initialize the iterations (subclasses must write their own method and call this one last)." - - numerator := 1. - denominator := 1 / (self limitedSmallValue: 1 - (q1 * x / q2)). - result := denominator -] - -{ #category : #initialization } -PMIncompleteBetaFunctionFraction >> setArgument: aNumber [ - x := aNumber -] diff --git a/src/Math-Numerical/PMProbabilityDensityWithUnknownDistribution.class.st b/src/Math-Numerical/PMProbabilityDensityWithUnknownDistribution.class.st deleted file mode 100644 index 0baa2c47b..000000000 --- a/src/Math-Numerical/PMProbabilityDensityWithUnknownDistribution.class.st +++ /dev/null @@ -1,25 +0,0 @@ -Class { - #name : #PMProbabilityDensityWithUnknownDistribution, - #superclass : #PMProbabilityDensity, - #category : #'Math-Numerical' -} - -{ #category : #information } -PMProbabilityDensityWithUnknownDistribution >> acceptanceBetween: aNumber1 and: aNumber2 [ - "Answers the probability of observing a random variable distributed according to - the receiver with a value larger than aNumber 1 and lower than or equal to aNumber2." - ^( PMRombergIntegrator function: [:x| self value:x] from: aNumber1 to: aNumber2) evaluate -] - -{ #category : #information } -PMProbabilityDensityWithUnknownDistribution >> distributionValue: aNumber [ - "Answers the probability of observing a random variable distributed according to - the receiver with a value lower than or equal to aNumber. - This general purpose routine uses numerical integration." - ^( PMRombergIntegrator function: [:x| self value:x] from: self lowestValue to: aNumber) evaluate -] - -{ #category : #information } -PMProbabilityDensityWithUnknownDistribution >> lowestValue [ - ^0 -] diff --git a/src/Math-Tests-Core-Distribution/package.st b/src/Math-Tests-Core-Distribution/package.st deleted file mode 100644 index b19b2cef0..000000000 --- a/src/Math-Tests-Core-Distribution/package.st +++ /dev/null @@ -1 +0,0 @@ -Package { #name : #'Math-Tests-Core-Distribution' } diff --git a/src/Math-KolmogorovSmirnov/PMKolmogorovSmirnov1Sample.class.st b/src/Math-Tests-Distributions/PMKolmogorovSmirnov1Sample.class.st similarity index 98% rename from src/Math-KolmogorovSmirnov/PMKolmogorovSmirnov1Sample.class.st rename to src/Math-Tests-Distributions/PMKolmogorovSmirnov1Sample.class.st index d174563b4..26a8d1328 100644 --- a/src/Math-KolmogorovSmirnov/PMKolmogorovSmirnov1Sample.class.st +++ b/src/Math-Tests-Distributions/PMKolmogorovSmirnov1Sample.class.st @@ -19,7 +19,7 @@ Class { 'distribution', 'popDistribution' ], - #category : #'Math-KolmogorovSmirnov' + #category : #'Math-Tests-Distributions-KolmogorovSmirnov' } { #category : #'instance creation' } diff --git a/src/Math-Tests-KolmogorovSmirnov/PMKolmogorovSmirnov1SampleTest.class.st b/src/Math-Tests-Distributions/PMKolmogorovSmirnov1SampleTest.class.st similarity index 97% rename from src/Math-Tests-KolmogorovSmirnov/PMKolmogorovSmirnov1SampleTest.class.st rename to src/Math-Tests-Distributions/PMKolmogorovSmirnov1SampleTest.class.st index 44a2d2fbf..69870f0f0 100644 --- a/src/Math-Tests-KolmogorovSmirnov/PMKolmogorovSmirnov1SampleTest.class.st +++ b/src/Math-Tests-Distributions/PMKolmogorovSmirnov1SampleTest.class.st @@ -5,7 +5,7 @@ Class { 'distribution', 'test' ], - #category : #'Math-Tests-KolmogorovSmirnov' + #category : #'Math-Tests-Distributions-KolmogorovSmirnov' } { #category : #running } diff --git a/src/Math-KolmogorovSmirnov/PMKolmogorovSmirnov2Sample.class.st b/src/Math-Tests-Distributions/PMKolmogorovSmirnov2Sample.class.st similarity index 98% rename from src/Math-KolmogorovSmirnov/PMKolmogorovSmirnov2Sample.class.st rename to src/Math-Tests-Distributions/PMKolmogorovSmirnov2Sample.class.st index fe4feb925..a01e9892c 100644 --- a/src/Math-KolmogorovSmirnov/PMKolmogorovSmirnov2Sample.class.st +++ b/src/Math-Tests-Distributions/PMKolmogorovSmirnov2Sample.class.st @@ -29,7 +29,7 @@ Class { 'bigSize', 'ksStatistic' ], - #category : #'Math-KolmogorovSmirnov' + #category : #'Math-Tests-Distributions-KolmogorovSmirnov' } { #category : #'instance creation' } diff --git a/src/Math-Tests-KolmogorovSmirnov/PMKolmogorovSmirnov2SampleTest.class.st b/src/Math-Tests-Distributions/PMKolmogorovSmirnov2SampleTest.class.st similarity index 97% rename from src/Math-Tests-KolmogorovSmirnov/PMKolmogorovSmirnov2SampleTest.class.st rename to src/Math-Tests-Distributions/PMKolmogorovSmirnov2SampleTest.class.st index 81e1bff62..a875c7e3b 100644 --- a/src/Math-Tests-KolmogorovSmirnov/PMKolmogorovSmirnov2SampleTest.class.st +++ b/src/Math-Tests-Distributions/PMKolmogorovSmirnov2SampleTest.class.st @@ -4,7 +4,7 @@ Class { #instVars : [ 'k' ], - #category : #'Math-Tests-KolmogorovSmirnov' + #category : #'Math-Tests-Distributions-KolmogorovSmirnov' } { #category : #running } diff --git a/src/Math-KolmogorovSmirnov/PMKolmogorovSmirnovSample.class.st b/src/Math-Tests-Distributions/PMKolmogorovSmirnovSample.class.st similarity index 94% rename from src/Math-KolmogorovSmirnov/PMKolmogorovSmirnovSample.class.st rename to src/Math-Tests-Distributions/PMKolmogorovSmirnovSample.class.st index 5f326bde4..085318b86 100644 --- a/src/Math-KolmogorovSmirnov/PMKolmogorovSmirnovSample.class.st +++ b/src/Math-Tests-Distributions/PMKolmogorovSmirnovSample.class.st @@ -8,7 +8,7 @@ Class { 'data', 'compareWith' ], - #category : #'Math-KolmogorovSmirnov' + #category : #'Math-Tests-Distributions-KolmogorovSmirnov' } { #category : #accessing } diff --git a/src/Math-Tests-KolmogorovSmirnov/PMKolmogorovsDistributionTest.class.st b/src/Math-Tests-Distributions/PMKolmogorovsDistributionTest.class.st similarity index 97% rename from src/Math-Tests-KolmogorovSmirnov/PMKolmogorovsDistributionTest.class.st rename to src/Math-Tests-Distributions/PMKolmogorovsDistributionTest.class.st index bf20c719e..3a7843342 100644 --- a/src/Math-Tests-KolmogorovSmirnov/PMKolmogorovsDistributionTest.class.st +++ b/src/Math-Tests-Distributions/PMKolmogorovsDistributionTest.class.st @@ -4,7 +4,7 @@ data are taken from: http://www.ism.ac.jp/editsec/aism/pdf/054_3_0577.pdf Class { #name : #PMKolmogorovsDistributionTest, #superclass : #TestCase, - #category : #'Math-Tests-KolmogorovSmirnov' + #category : #'Math-Tests-Distributions-KolmogorovSmirnov' } { #category : #tests } diff --git a/src/Math-Tests-Core-Distribution/PMMultivariateNormalDistributionTest.class.st b/src/Math-Tests-Distributions/PMMultivariateNormalDistributionTest.class.st similarity index 97% rename from src/Math-Tests-Core-Distribution/PMMultivariateNormalDistributionTest.class.st rename to src/Math-Tests-Distributions/PMMultivariateNormalDistributionTest.class.st index c095ee240..66f673e8b 100644 --- a/src/Math-Tests-Core-Distribution/PMMultivariateNormalDistributionTest.class.st +++ b/src/Math-Tests-Distributions/PMMultivariateNormalDistributionTest.class.st @@ -6,7 +6,7 @@ Class { 'covarianceMatrix', 'distribution' ], - #category : #'Math-Tests-Core-Distribution' + #category : #'Math-Tests-Distributions-Normal' } { #category : #running } diff --git a/src/Math-Tests-KernelSmoothing/PMSmoothedDensityTest.class.st b/src/Math-Tests-Distributions/PMSmoothedDensityTest.class.st similarity index 98% rename from src/Math-Tests-KernelSmoothing/PMSmoothedDensityTest.class.st rename to src/Math-Tests-Distributions/PMSmoothedDensityTest.class.st index 4d174473c..d82a5f9b7 100644 --- a/src/Math-Tests-KernelSmoothing/PMSmoothedDensityTest.class.st +++ b/src/Math-Tests-Distributions/PMSmoothedDensityTest.class.st @@ -4,7 +4,7 @@ Class { #instVars : [ 'density' ], - #category : #'Math-Tests-KernelSmoothing' + #category : #'Math-Tests-Distributions-KernelSmoothing' } { #category : #running } diff --git a/src/Math-Tests-Numerical/PMStatisticsBugs.class.st b/src/Math-Tests-Distributions/PMStatisticsBugs.class.st similarity index 96% rename from src/Math-Tests-Numerical/PMStatisticsBugs.class.st rename to src/Math-Tests-Distributions/PMStatisticsBugs.class.st index 0da261be5..847b075ed 100644 --- a/src/Math-Tests-Numerical/PMStatisticsBugs.class.st +++ b/src/Math-Tests-Distributions/PMStatisticsBugs.class.st @@ -1,7 +1,7 @@ Class { #name : #PMStatisticsBugs, #superclass : #TestCase, - #category : #'Math-Tests-Numerical' + #category : #'Math-Tests-Distributions' } { #category : #tests } @@ -45,6 +45,18 @@ PMStatisticsBugs >> testFisherTippet2 [ self assert: (d distributionValue: -3) equals: -1 exp ] +{ #category : #tests } +PMStatisticsBugs >> testGammaDistribution [ + | dist | + dist := PMGammaDistribution shape: 3.4 scale: 1.7. + self assert: (dist average - (3.4 * 1.7)) abs < 0.000000001. + self + assert: (dist standardDeviation - (3.4 sqrt * 1.7)) abs < 0.000000001. + self assert: ((dist value: 4.5) - 0.1446067652) abs < 0.000000001. + self + assert: ((dist distributionValue: 4.5) - 0.3982869736) abs < 0.000000001 +] + { #category : #tests } PMStatisticsBugs >> testProbabilityDensity [ diff --git a/src/Math-Tests-Distributions/package.st b/src/Math-Tests-Distributions/package.st new file mode 100644 index 000000000..9f0927443 --- /dev/null +++ b/src/Math-Tests-Distributions/package.st @@ -0,0 +1 @@ +Package { #name : #'Math-Tests-Distributions' } diff --git a/src/Math-Tests-KernelSmoothing/package.st b/src/Math-Tests-KernelSmoothing/package.st deleted file mode 100644 index 988d1f910..000000000 --- a/src/Math-Tests-KernelSmoothing/package.st +++ /dev/null @@ -1 +0,0 @@ -Package { #name : #'Math-Tests-KernelSmoothing' } diff --git a/src/Math-Tests-KolmogorovSmirnov/package.st b/src/Math-Tests-KolmogorovSmirnov/package.st deleted file mode 100644 index cc6d4fbb9..000000000 --- a/src/Math-Tests-KolmogorovSmirnov/package.st +++ /dev/null @@ -1 +0,0 @@ -Package { #name : #'Math-Tests-KolmogorovSmirnov' } diff --git a/src/Math-Tests-Numerical/PMNumericalMethodsTestCase.class.st b/src/Math-Tests-Numerical/PMNumericalMethodsTestCase.class.st index fce772877..d81c8e915 100644 --- a/src/Math-Tests-Numerical/PMNumericalMethodsTestCase.class.st +++ b/src/Math-Tests-Numerical/PMNumericalMethodsTestCase.class.st @@ -124,18 +124,6 @@ PMNumericalMethodsTestCase >> testFTest [ self assert: (confidenceLevel - 79.8147614536) abs < 0.000000001 ] -{ #category : #statistics } -PMNumericalMethodsTestCase >> testGammaDistribution [ - | dist | - dist := PMGammaDistribution shape: 3.4 scale: 1.7. - self assert: (dist average - (3.4 * 1.7)) abs < 0.000000001. - self - assert: (dist standardDeviation - (3.4 sqrt * 1.7)) abs < 0.000000001. - self assert: ((dist value: 4.5) - 0.1446067652) abs < 0.000000001. - self - assert: ((dist distributionValue: 4.5) - 0.3982869736) abs < 0.000000001 -] - { #category : #statistics } PMNumericalMethodsTestCase >> testHistogram [ | histogram | diff --git a/src/Math-Tests-ODE/PMBDF4StepperTest.class.st b/src/Math-Tests-ODE/PMBDF4StepperTest.class.st index a3cfb94da..2ba63d843 100644 --- a/src/Math-Tests-ODE/PMBDF4StepperTest.class.st +++ b/src/Math-Tests-ODE/PMBDF4StepperTest.class.st @@ -44,54 +44,43 @@ PMBDF4StepperTest >> testSimpleSystem2 [ { #category : #'tests-stepping' } PMBDF4StepperTest >> testSimpleSystem3 [ + | solver stepper system dt | dt := 0.5. system := PMImplicitSystem block: [ :x :t | 2 * t * x ]. stepper := PMBDF4Stepper onSystem: system. solver := PMBDF4Solver new - stepper: stepper; - system: system; - dt: dt. - self - assert: - ((solver - solve: system - startState: 1 - startTime: 0 - endTime: 0.5) closeTo: 1.75). - self - assert: - ((solver - solve: system - startState: 1 - startTime: 0 - endTime: 1.0) closeTo: 3.75). - self - assert: - ((solver - solve: system - startState: 1 - startTime: 0 - endTime: 1.5) closeTo: 11.0227). - self - assert: - ((solver - solve: system - startState: 1 - startTime: 0 - endTime: 2.0) closeTo: 43.2181). - self - assert: - ((solver - solve: system - startState: 1 - startTime: 0 - endTime: 2.3) closeTo: 132.2771). - self - assert: - ((solver - solve: system - startState: 1 - startTime: 0 - endTime: 2.5) closeTo: 224.881) + stepper: stepper; + system: system; + dt: dt. + self assert: ((solver + solve: system + startState: 1 + startTime: 0 + endTime: 0.5) closeTo: 1.75). + self assert: ((solver + solve: system + startState: 1 + startTime: 0 + endTime: 1.0) closeTo: 3.75). + self assert: ((solver + solve: system + startState: 1 + startTime: 0 + endTime: 1.5) closeTo: 11.0227). + self assert: ((solver + solve: system + startState: 1 + startTime: 0 + endTime: 2.0) closeTo: 43.2181). + self assert: ((solver + solve: system + startState: 1 + startTime: 0 + endTime: 2.3) closeTo: 132.2771). + self assert: ((solver + solve: system + startState: 1 + startTime: 0 + endTime: 2.5) closeTo: 224.881 precision: 0.001) ] diff --git a/src/Math-Tests-ODE/PMRungeKuttaStepperTest.class.st b/src/Math-Tests-ODE/PMRungeKuttaStepperTest.class.st index d88ddf34e..d1f7a8ec8 100644 --- a/src/Math-Tests-ODE/PMRungeKuttaStepperTest.class.st +++ b/src/Math-Tests-ODE/PMRungeKuttaStepperTest.class.st @@ -6,17 +6,15 @@ Class { { #category : #'tests-stepping' } PMRungeKuttaStepperTest >> testDoStepTimeStepSize1 [ + | stepper sys dt | sys := PMExplicitSystem block: [ :x :t | x * t ]. stepper := PMRungeKuttaStepper onSystem: sys. dt := 0.1. - self assert: ((stepper doStep: 0 time: 10 stepSize: dt) closeTo: 0.0). - self - assert: ((stepper doStep: 10 time: 0 stepSize: dt) closeTo: 10.05). - self - assert: ((stepper doStep: 1 time: 1 stepSize: dt) closeTo: 1.1107). - self - assert: ((stepper doStep: 10 time: 1 stepSize: dt) closeTo: 11.1071) + self assert: ((stepper doStep: 0 time: 10 stepSize: dt) closeTo: 0.0 precision: 0.01). + self assert: ((stepper doStep: 10 time: 0 stepSize: dt) closeTo: 10.05 precision: 0.01). + self assert: ((stepper doStep: 1 time: 1 stepSize: dt) closeTo: 1.1107 precision: 0.01). + self assert: ((stepper doStep: 10 time: 1 stepSize: dt) closeTo: 11.1071 precision: 0.01) ] { #category : #'tests-stepping' } diff --git a/src/Math-Tests-ODE/PMTrapezoidStepperTest.class.st b/src/Math-Tests-ODE/PMTrapezoidStepperTest.class.st index 0c78ebd33..1f524945a 100644 --- a/src/Math-Tests-ODE/PMTrapezoidStepperTest.class.st +++ b/src/Math-Tests-ODE/PMTrapezoidStepperTest.class.st @@ -26,17 +26,15 @@ PMTrapezoidStepperTest >> testDoStepTime [ { #category : #'tests-stepping' } PMTrapezoidStepperTest >> testDoStepTimeStepSize1 [ + | stepper sys dt | sys := PMImplicitSystem block: [ :x :t | x * t ]. stepper := PMTrapezoidStepper onSystem: sys. dt := 0.1. - self assert: ((stepper doStep: 0 time: 10 stepSize: dt) closeTo: 0.0). - self - assert: ((stepper doStep: 10 time: 0 stepSize: dt) closeTo: 10.05). - self - assert: ((stepper doStep: 1 time: 1 stepSize: dt) closeTo: 1.1111). - self - assert: ((stepper doStep: 10 time: 1 stepSize: dt) closeTo: 11.11) + self assert: ((stepper doStep: 0 time: 10 stepSize: dt) closeTo: 0.0 precision: 0.01). + self assert: ((stepper doStep: 10 time: 0 stepSize: dt) closeTo: 10.05 precision: 0.01). + self assert: ((stepper doStep: 1 time: 1 stepSize: dt) closeTo: 1.11 precision: 0.01). + self assert: ((stepper doStep: 10 time: 1 stepSize: dt) closeTo: 11.11 precision: 0.01) ] { #category : #'tests-stepping' }