Skip to content

Commit bea94ca

Browse files
Merge pull request #227 from jordanmontt/226-take-method-has-been-deprecated-in-Pharo
Replaced take: calls with numberOfCombinationsTaken:
2 parents c0a80e8 + b7f9ba4 commit bea94ca

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

src/Math-Core/PMVector.class.st

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,10 +315,11 @@ PMVector >> sqrt [
315315
]
316316

317317
{ #category : #arithmetic }
318-
PMVector >> take: anInteger [
318+
PMVector >> take: anInteger [
319+
319320
" Answer a <Collection> with the receiver's binomial coefficient at each element for anInteger "
320-
321-
^ self collect: [ :each | each take: anInteger ]
321+
322+
^ self collect: [ :each | each numberOfCombinationsTaken: anInteger ]
322323
]
323324

324325
{ #category : #operation }

src/Math-KolmogorovSmirnov/PMKolmogorovSmirnov2Sample.class.st

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,15 @@ PMKolmogorovSmirnov2Sample >> otherData: aCollection [
139139

140140
{ #category : #accessing }
141141
PMKolmogorovSmirnov2Sample >> pValue [
142+
142143
"uses procedure explained in:
143144
Kim, P. J. & Jennrich, R. I.
144145
'Tables of the exact sampling distribution of the two-sample Kolmogorov–Smirnov criterion...'
145146
in 'Selected Tables in Mathematical Statistics Volume I' (1973)."
146147

147148
ksStatistic ifNil: [ self ksStatistic ].
148149
^ (uCalcBlock value: (Array with: smallSize with: bigSize))
149-
/ (smallSize + bigSize take: smallSize)
150+
/ (smallSize + bigSize numberOfCombinationsTaken: smallSize)
150151
]
151152

152153
{ #category : #printing }

src/Math-Matrix/PMMatrix.class.st

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,10 +1031,11 @@ PMMatrix >> swapColumn: anIndex withColumn: a2Index [
10311031
]
10321032

10331033
{ #category : #arithmetic }
1034-
PMMatrix >> take: anInteger [
1034+
PMMatrix >> take: anInteger [
1035+
10351036
" Answer a <Collection> with the receiver's binomial coefficient at each element for anInteger "
1036-
1037-
^ self collect: [ :each | each take: anInteger ]
1037+
1038+
^ self collect: [ :each | each numberOfCombinationsTaken: anInteger ]
10381039
]
10391040

10401041
{ #category : #operation }

0 commit comments

Comments
 (0)