Skip to content

Commit 39a3c1d

Browse files
committed
Move distributions from Numerical to Distributions
1 parent c9ce032 commit 39a3c1d

22 files changed

+52
-127
lines changed

src/Math-Numerical/PMCauchyDistribution.class.st renamed to src/Math-Distributions/PMCauchyDistribution.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Class {
88
'mu',
99
'beta'
1010
],
11-
#category : #'Math-Numerical-Math-Distribution'
11+
#category : #'Math-Distributions'
1212
}
1313

1414
{ #category : #information }

src/Math-Numerical/PMExponentialDistribution.class.st renamed to src/Math-Distributions/PMExponentialDistribution.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Class {
44
#instVars : [
55
'beta'
66
],
7-
#category : #'Math-Numerical-Math-Distribution'
7+
#category : #'Math-Distributions'
88
}
99

1010
{ #category : #information }

src/Math-Numerical/PMFisherTippettDistribution.class.st renamed to src/Math-Distributions/PMFisherTippettDistribution.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Class {
55
'alpha',
66
'beta'
77
],
8-
#category : #'Math-Numerical-Math-Distribution'
8+
#category : #'Math-Distributions'
99
}
1010

1111
{ #category : #information }

src/Math-Numerical/PMHistogrammedDistribution.class.st renamed to src/Math-Distributions/PMHistogrammedDistribution.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Class {
44
#instVars : [
55
'histogram'
66
],
7-
#category : #'Math-Numerical'
7+
#category : #'Math-Distributions'
88
}
99

1010
{ #category : #information }

src/Math-Numerical/PMIncompleteBetaFractionTermServer.class.st renamed to src/Math-Distributions/PMIncompleteBetaFractionTermServer.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Class {
55
'alpha1',
66
'alpha2'
77
],
8-
#category : #'Math-Numerical'
8+
#category : #'Math-Distributions-Beta'
99
}
1010

1111
{ #category : #information }

src/Math-Numerical/PMIncompleteGammaFractionTermServer.class.st renamed to src/Math-Distributions/PMIncompleteGammaFractionTermServer.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Class {
44
#instVars : [
55
'alpha'
66
],
7-
#category : #'Math-Numerical'
7+
#category : #'Math-Distributions-Gamma'
88
}
99

1010
{ #category : #information }

src/Math-Numerical/PMIncompleteGammaSeriesTermServer.class.st renamed to src/Math-Distributions/PMIncompleteGammaSeriesTermServer.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Class {
55
'alpha',
66
'sum'
77
],
8-
#category : #'Math-Numerical'
8+
#category : #'Math-Distributions-Gamma'
99
}
1010

1111
{ #category : #information }

src/Math-Numerical/PMLaplaceDistribution.class.st renamed to src/Math-Distributions/PMLaplaceDistribution.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Class {
55
'mu',
66
'beta'
77
],
8-
#category : #'Math-Numerical-Math-Distribution'
8+
#category : #'Math-Distributions'
99
}
1010

1111
{ #category : #information }

src/Math-Numerical/PMLaplaceGenerator.class.st renamed to src/Math-Distributions/PMLaplaceGenerator.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Class {
1111
'laplaceDistribution',
1212
'next'
1313
],
14-
#category : #'Math-Numerical'
14+
#category : #'Math-Distributions'
1515
}
1616

1717
{ #category : #testing }

src/Math-Numerical/PMLogNormalDistribution.class.st renamed to src/Math-Distributions/PMLogNormalDistribution.class.st

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Class {
22
#name : #PMLogNormalDistribution,
3-
#superclass : #PMProbabilityDensityWithUnknownDistribution,
3+
#superclass : #PMProbabilityDensity,
44
#instVars : [
55
'normalDistribution'
66
],
7-
#category : #'Math-Numerical'
7+
#category : #'Math-Distributions-Normal'
88
}
99

1010
{ #category : #information }
@@ -42,6 +42,13 @@ PMLogNormalDistribution class >> new: aNumber1 sigma: aNumber2 [
4242
^super new initialize: aNumber1 sigma: aNumber2
4343
]
4444

45+
{ #category : #information }
46+
PMLogNormalDistribution >> acceptanceBetween: aNumber1 and: aNumber2 [
47+
"Answers the probability of observing a random variable distributed according to
48+
the receiver with a value larger than aNumber 1 and lower than or equal to aNumber2."
49+
^( PMRombergIntegrator function: [:x| self value:x] from: aNumber1 to: aNumber2) evaluate
50+
]
51+
4552
{ #category : #information }
4653
PMLogNormalDistribution >> average [
4754
"Answer the average of the receiver."
@@ -54,6 +61,14 @@ PMLogNormalDistribution >> changeParametersBy: aVector [
5461
normalDistribution changeParametersBy: aVector.
5562
]
5663

64+
{ #category : #information }
65+
PMLogNormalDistribution >> distributionValue: aNumber [
66+
"Answers the probability of observing a random variable distributed according to
67+
the receiver with a value lower than or equal to aNumber.
68+
This general purpose routine uses numerical integration."
69+
^( PMRombergIntegrator function: [:x| self value:x] from: self lowestValue to: aNumber) evaluate
70+
]
71+
5772
{ #category : #information }
5873
PMLogNormalDistribution >> fourthCentralMoment [
5974
"Private"
@@ -79,6 +94,11 @@ PMLogNormalDistribution >> kurtosis [
7994
^( ( x + 2) * x + 3) * ( x squared) - 6
8095
]
8196

97+
{ #category : #information }
98+
PMLogNormalDistribution >> lowestValue [
99+
^0
100+
]
101+
82102
{ #category : #information }
83103
PMLogNormalDistribution >> parameters [
84104
^normalDistribution parameters

0 commit comments

Comments
 (0)