Skip to content

Commit 69f4777

Browse files
Inlined the method as it was not very useful.
1 parent d5d36d0 commit 69f4777

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

src/Math-Tests-Matrix/PMQRTest.class.st

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,29 +24,28 @@ PMQRTest >> assert: inverse isMoorePenroseInverseOf: aMatrix [
2424
self assert: (identityMatrix * aMatrix) closeTo: aMatrix.
2525
]
2626

27-
{ #category : #running }
28-
PMQRTest >> mpTestFunction: aMatrix [
29-
30-
| inverse |
31-
inverse := aMatrix mpInverse.
32-
self assert: inverse isMoorePenroseInverseOf: aMatrix.
33-
34-
]
35-
3627
{ #category : #tests }
3728
PMQRTest >> testMoorePenroseInverse [
3829

39-
| a |
30+
| a inverse |
4031
a := PMMatrix new initializeRows:
4132
#( #( 5 40 1 ) #( 0 0 1 ) #( 0 0 1 ) ).
42-
self mpTestFunction: a.
33+
inverse := a mpInverse .
34+
self assert: inverse isMoorePenroseInverseOf: a.
35+
4336
a := a * (PMMatrix rows: 3 columns: 3 random: 5.0).
44-
self mpTestFunction: a.
37+
inverse := a mpInverse .
38+
self assert: inverse isMoorePenroseInverseOf: a.
39+
4540
a := PMMatrix new initializeRows:
4641
#( #( 5 40 1 2.5 ) #( 0 0 1 2.5 ) #( 0 0 1 2.5 ) ).
47-
self mpTestFunction: a.
42+
inverse := a mpInverse .
43+
self assert: inverse isMoorePenroseInverseOf: a.
44+
4845
a := a transpose.
49-
self mpTestFunction: a.
46+
inverse := a mpInverse .
47+
self assert: inverse isMoorePenroseInverseOf: a.
48+
5049
3 timesRepeat: [
5150
a := PMMatrix rows: 3 columns: 3 random: 1.0.
5251
self assert: (a mpInverse closeTo: a inverse).

0 commit comments

Comments
 (0)