Skip to content

Commit bc8ee23

Browse files
committed
Remove useless conditionals
1 parent d5d717e commit bc8ee23

File tree

4 files changed

+10
-15
lines changed

4 files changed

+10
-15
lines changed

src/Math-Clustering/PMCovarianceCluster.class.st

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ Class {
77
{ #category : #initialization }
88
PMCovarianceCluster >> centerOn: aVector [
99

10-
accumulator := aVector
11-
ifNil: [ nil ]
12-
ifNotNil: [ PMMahalanobisCenter onVector: aVector ]
10+
accumulator := aVector ifNotNil: [ PMMahalanobisCenter onVector: aVector ]
1311
]
1412

1513
{ #category : #transformation }

src/Math-FunctionFit/PMErrorAsParameterFunction.class.st

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ErrorAsParameterFunction is used internally by ErrorMinimizer. it is essentially
44
Class {
55
#name : #PMErrorAsParameterFunction,
66
#superclass : #PMSimpleParameterFunction,
7-
#category : 'Math-FunctionFit'
7+
#category : #'Math-FunctionFit'
88
}
99

1010
{ #category : #accessing }
@@ -50,17 +50,18 @@ PMErrorAsParameterFunction >> parameters: indexableCollection [
5050

5151
{ #category : #printing }
5252
PMErrorAsParameterFunction >> printOn: aStream [
53+
5354
aStream
5455
nextPutAll: 'an ';
5556
nextPutAll: self class name;
5657
nextPutAll: '( function: ';
57-
print: (function ifNil: [ nil ] ifNotNil: [ :f | f first ]);
58+
print: (function ifNotNil: [ :f | f first ]);
5859
nextPutAll: ' maxFunction: ';
5960
print: self maxFunction.
60-
varArray
61-
ifNotNil: [ aStream
62-
nextPutAll: ' parameters: ';
63-
print: self parameters ].
61+
varArray ifNotNil: [
62+
aStream
63+
nextPutAll: ' parameters: ';
64+
print: self parameters ].
6465
aStream nextPut: $)
6566
]
6667

src/Math-Numerical/PMLeastSquareFit.class.st

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ PMLeastSquareFit class >> histogram: aHistogram distributionClass: aProbabilityD
2222
{ #category : #creation }
2323
PMLeastSquareFit class >> points: aDataHolder function: aParametricFunction [
2424

25-
^ aParametricFunction
26-
ifNil: [ nil ]
27-
ifNotNil: [ self new initialize: aDataHolder data: aParametricFunction ]
25+
^ aParametricFunction ifNotNil: [ self new initialize: aDataHolder data: aParametricFunction ]
2826
]
2927

3028
{ #category : #operation }

src/Math-Numerical/PMScaledProbabilityDensityFunction.class.st

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ PMScaledProbabilityDensityFunction class >> histogram: aHistogram distributionCl
2323
"Create a new instance of the receiver with given probability density function and histogram."
2424

2525
| dp |
26-
^ (dp := aProbabilityDensityFunctionClass fromHistogram: aHistogram)
27-
ifNil: [ nil ]
28-
ifNotNil: [ self histogram: aHistogram against: dp ]
26+
^ (dp := aProbabilityDensityFunctionClass fromHistogram: aHistogram) ifNotNil: [ self histogram: aHistogram against: dp ]
2927
]
3028

3129
{ #category : #transformation }

0 commit comments

Comments
 (0)