Skip to content

Commit b775400

Browse files
committed
Pharo 11 compatibility
Fixes #301
1 parent d4c068e commit b775400

File tree

6 files changed

+21
-7
lines changed

6 files changed

+21
-7
lines changed

src/BaselineOfPolyMath/BaselineOfPolyMath.class.st

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,14 @@ BaselineOfPolyMath >> baseline: spec [
167167
with:
168168
#('Math-Tests-Matrix' 'Math-Tests-Clustering' 'Math-Tests-Numerical' 'Math-Tests-Complex' 'Math-Tests-Quaternion' 'Math-Tests-Random' '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-Core');
169169
group: 'default'
170-
with: #('Core' 'Extensions' 'Tests' 'Benchmarks' 'Accuracy') ]
170+
with: #('Core' 'Extensions' 'Tests' 'Benchmarks' 'Accuracy') ].
171+
172+
spec for: #( #'pharo6.x' #'pharo7.x' #'pharo8.x' #'pharo9.x' #'pharo10.x' ) do: [
173+
spec
174+
package: 'Math-Numerical' with: [ spec requires: #( 'Math-Pharo11' ) ];
175+
package: 'Math-Benchmarks-KDTree' with: [ spec requires: #( 'Math-Pharo11' ) ];
176+
package: 'Math-Tests-KDTree' with: [ spec requires: #( 'Math-Pharo11' ) ];
177+
package: 'Math-Pharo11' ]
171178
]
172179

173180
{ #category : #accessing }

src/Math-Benchmarks-KDTree/PMKDTreeBenchmark.class.st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Class {
1515
'collType',
1616
'm'
1717
],
18-
#category : 'Math-Benchmarks-KDTree'
18+
#category : #'Math-Benchmarks-KDTree'
1919
}
2020

2121
{ #category : #defaults }
@@ -109,7 +109,7 @@ PMKDTreeBenchmark >> collType: aSequencableCollectionClass [
109109
{ #category : #'initialize-release' }
110110
PMKDTreeBenchmark >> initialize [
111111
super initialize.
112-
collType := FloatArray.
112+
collType := Float32Array.
113113
rand := Random new
114114
]
115115

src/Math-Numerical/PMLineSearch.class.st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ PMLineSearch >> initialize [
138138
failingMin := 1e-3.
139139
useCubicApproximation := false.
140140
" Values for g(0), g'(0) and g(1) "
141-
boundaryValues := FloatArray new: 3.
141+
boundaryValues := Float32Array new: 3.
142142
" Result: x1, g(x1), x2, g(x2) "
143-
extendedResult := FloatArray new: 4.
143+
extendedResult := Float32Array new: 4.
144144
^ self
145145
]
146146

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Class {
2+
#name : #Float32Array,
3+
#superclass : #FloatArray,
4+
#type : #words,
5+
#category : #'Math-Pharo11'
6+
}

src/Math-Pharo11/package.st

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Package { #name : #'Math-Pharo11' }

src/Math-Tests-KDTree/PMKDTreeTest.class.st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ PMKDTreeTest >> testIndexedKDTreeSimple [
8080
| r n aTree bTree |
8181
r := rand next: 200.
8282
aTree := PMIndexedKDTree
83-
withAll: (r collect: [ :i | FloatArray with: i with: i ]). "2-dimensional data"
83+
withAll: (r collect: [ :i | Float32Array with: i with: i ]). "2-dimensional data"
8484
bTree := PMIndexedKDTree
85-
withAll: (r collect: [ :i | FloatArray with: i ]). "1-dimensional data"
85+
withAll: (r collect: [ :i | Float32Array with: i ]). "1-dimensional data"
8686
1 to: 20 do: [ :v |
8787
n := 1 / v.
8888
self

0 commit comments

Comments
 (0)