Skip to content

Commit 8a42624

Browse files
Merge pull request #216 from SergeStinckwich/master
Start to do experiments with Microdown
2 parents ddd56f8 + f2992b2 commit 8a42624

13 files changed

+58
-64
lines changed

src/Math-AutomaticDifferenciation/PMDualNumber.class.st

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
"
2-
In linear algebra, dual numbers extend the real numbers by adjoining one new element ε with the property ε^2 = 0 (ε is nilpotent).
3-
See here: https://en.wikipedia.org/wiki/Dual_number^
2+
In linear algebra, dual numbers extend the real numbers by adjoining one new element ε with the property ε^2 = 0 (ε is nilpotent). See here: [https://en.wikipedia.org/wiki/Dual_number](https://en.wikipedia.org/wiki/Dual_number)
43
5-
PMDualNumbers can be used to calculate the first derivative if one creates them this way:
6-
PMDualNumber value: aNumber eps: derivativeOfaNumber (1 if the derivative with respect to aNumber is calculated, 0 otherwise)
4+
`PMDualNumber`s can be used to calculate the first derivative if one creates them this way:
75
8-
PMDualNumbers can be mixed with Numbers.
6+
```
7+
PMDualNumber value: aNumber eps: derivativeOfANumber
8+
```
9+
(1 if the derivative with respect to aNumber is calculated, 0 otherwise)
10+
11+
`PMDualNumber`s can be mixed with Numbers.
912
"
1013
Class {
1114
#name : #PMDualNumber,

src/Math-AutomaticDifferenciation/PMHyperDualNumber.class.st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"
2-
PMHyperDualNumbers can be used to additionally calculate second order derivatives.
3-
They can be mixed with Numbers, not with PMDualNumbers.
2+
`PMHyperDualNumber` can be used to additionally calculate second order derivatives.
3+
They can be mixed with `Number`s, not with `PMDualNumber`s.
44
"
55
Class {
66
#name : #PMHyperDualNumber,

src/Math-Core-Distribution/PMErfApproximation.class.st

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
"
2-
A PMErfApproximation is a five term approximation to erf(x). This is a singleton class encapsulating the approximation.
2+
A `PMErfApproximation` is a five term approximation to erf(x). This is a singleton class encapsulating the approximation.
33
44
Use with
55
6+
```
67
PMErfApproximation new value: aNumber
8+
```
79
810
to receive erf(x). The result of the error function lies between zero and one.
911

src/Math-Core-Distribution/PMMitchellMooreGenerator.class.st

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Class {
99
#classVars : [
1010
'UniqueInstance'
1111
],
12-
#category : 'Math-Core-Distribution'
12+
#category : #'Math-Core-Distribution'
1313
}
1414

1515
{ #category : #creation }
@@ -70,11 +70,10 @@ PMMitchellMooreGenerator >> floatValue [
7070

7171
{ #category : #initialization }
7272
PMMitchellMooreGenerator >> initialize: anArray lowIndex: anInteger [
73-
73+
7474
randoms := anArray.
7575
lowIndex := anInteger.
76-
highIndex := randoms size.
77-
^self
76+
highIndex := randoms size
7877
]
7978

8079
{ #category : #information }

src/Math-Core-Distribution/PMProbabilityDensity.class.st

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Class {
44
#instVars : [
55
'flatGenerator'
66
],
7-
#category : 'Math-Core-Distribution'
7+
#category : #'Math-Core-Distribution'
88
}
99

1010
{ #category : #information }
@@ -108,10 +108,11 @@ PMProbabilityDensity >> kurtosis [
108108

109109
{ #category : #information }
110110
PMProbabilityDensity >> parameters [
111+
111112
"Returns an Array containing the parameters of the distribution.
112113
It is used to print out the distribution and for fitting."
113114

114-
^self subclassResponsibility
115+
self subclassResponsibility
115116
]
116117

117118
{ #category : #display }

src/Math-Core-Process/PMFixpoint.class.st

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
"
2-
A Fixpoint is just a little utility. it calculates the fixpoint of a block with one variable. a starting value for the variable is necessary. the variable does not need to be numerical, it can be anything the block can eat and spit out.
3-
example:
4-
a:=Fixpoint block: [:x| 1/ (1+x )] value: 20.0.
5-
a evaluate.
6-
""-->0.6180339887498948""
2+
`PMFixpoint` is just a little utility. It calculates the fixpoint of a block with one variable. A starting value for the variable is necessary. The variable does not need to be numerical, it can be anything the block can eat and spit out.
73
4+
Example:
5+
6+
```
7+
| a |
8+
a := PMFixpoint block: [:x| 1/(1+x)] value: 20.0.
9+
a evaluate
10+
```
811
"
912
Class {
1013
#name : #PMFixpoint,
@@ -18,7 +21,7 @@ Class {
1821
'verbose',
1922
'equalityTest'
2023
],
21-
#category : 'Math-Core-Process'
24+
#category : #'Math-Core-Process'
2225
}
2326

2427
{ #category : #'instance-creation' }

src/Math-Core-Process/PMIterativeProcess.class.st

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
"
2-
A PMIterativeProcess class is an abstract base class for processes which follow an iterative pattern.
2+
A `PMIterativeProcess` class is an abstract base class for processes which follow an iterative pattern.
33
4-
Subclasses of PMIterativeProcess will redefine
5-
initializeIterations
6-
evaluateIteration
7-
finalizeIterations
4+
Subclasses of `PMIterativeProcess` will redefine:
5+
- `initializeIterations`
6+
- `evaluateIteration`
7+
- `finalizeIterations`
88
9-
The instance variable result is used to store the most recent/best result, and is accessible through the result selector.
9+
The instance variable `result` is used to store the most recent/best result, and is accessible through the result selector.
1010
11-
The maximumIterations: method allows control of the amount of work this method is allowed to do. Each evaluation of the iteration increments the instance variable iterations. When this number exceeds maximumIterations, the evaluate method will stop the process, and answer result.
11+
The maximumIterations: method allows control of the amount of work this method is allowed to do. Each evaluation of the iteration increments the instance variable `iterations`. When this number exceeds `maximumIterations,` the evaluate method will stop the process, and answer `result`.
1212
1313
"
1414
Class {
@@ -21,7 +21,7 @@ Class {
2121
'result',
2222
'iterations'
2323
],
24-
#category : 'Math-Core-Process'
24+
#category : #'Math-Core-Process'
2525
}
2626

2727
{ #category : #default }

src/Math-Core/PMFloatingPointMachine.class.st

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,16 @@
11
"
2-
A PMFloatingPointMachine represents the numerical precision of this system.
3-
4-
Instance Variables
5-
6-
defaultNumericalPrecision: The relative
7-
numerical precision that can be expected for a general numerical computation. One should consider to numbers a and b equal if the relative difference between them is less than the default machine precision.
8-
9-
largestExponentArgument: natural logarithm of largest number
10-
11-
largestNumber: The largest positive number that can be represented in the machine
12-
13-
machinePrecision: r^{-(n+1)}, with the largest n such that (1 + r^-n) - 1 != 0
14-
15-
negativeMachinePrecision: r^{-(n+1)}, with the largest n such that (1 - r^-n) - 1 != 0
16-
17-
radix: The radix of the floating point representation. This is often 2.
18-
19-
smallNumber: A number that can be added to some value without noticeably changing the result of the computation
20-
21-
smallestNumber: The smallest positive number different from 0.
22-
23-
24-
largestExponentArgument
25-
- xxxxx
2+
A `PMFloatingPointMachine` represents the numerical precision of this system.
3+
4+
##Instance Variables
5+
6+
- `defaultNumericalPrecision` The relative numerical precision that can be expected for a general numerical computation. One should consider to numbers a and b equal if the relative difference between them is less than the default machine precision,
7+
- `largestExponentArgument` Natural logarithm of largest number,
8+
- `largestNumber` The largest positive number that can be represented in the machine,
9+
- `machinePrecision` $r^{-(n+1)}$, with the largest n such that $(1 + r^{-n}) - 1$ != 0,
10+
- `negativeMachinePrecision` $r^{-(n+1)}$, with the largest n such that $(1 - r^{-n}) - 1$ != 0,
11+
- `radix` The radix of the floating point representation. This is often 2,
12+
- `smallNumber` A number that can be added to some value without noticeably changing the result of the computation,
13+
- `smallestNumber` The smallest positive number different from 0.
2614
2715
This class is detailed in Object Oriented Implementation of Numerical Methods, Section 1.4.1 and 1.4.2.
2816

src/Math-Core/PMWeightedPoint.class.st

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
"
22
I'm a simple point (two values with a weight and an error).
3-
4-
(c) Copyrights Didier BESSET, 1999.
53
"
64
Class {
75
#name : #PMWeightedPoint,
@@ -12,7 +10,7 @@ Class {
1210
'weight',
1311
'error'
1412
],
15-
#category : 'Math-Core'
13+
#category : #'Math-Core'
1614
}
1715

1816
{ #category : #creation }

src/Math-KDTree/PMIndexedKDTree.class.st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
"
2-
IndexedKDTree returns the indices of the nearest neighbours instead of the nearest neighbours itself. additionally it returns the squared distances between the vector and its neighbours, if more than one neighbour is searched.
2+
`PMIndexedKDTree` returns the indices of the nearest neighbours instead of the nearest neighbours itself. additionally it returns the squared distances between the vector and its neighbours, if more than one neighbour is searched.
33
"
44
Class {
55
#name : #PMIndexedKDTree,
66
#superclass : #PMKDTree,
77
#instVars : [
88
'index'
99
],
10-
#category : 'Math-KDTree'
10+
#category : #'Math-KDTree'
1111
}
1212

1313
{ #category : #'instance creation' }

0 commit comments

Comments
 (0)