Skip to content

Commit 2cc404e

Browse files
Perhaps we can split the test up and we can discover where the erratic failure happens more precisely.
1 parent 69f4777 commit 2cc404e

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

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

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,6 @@ PMQRTest >> assert: inverse isMoorePenroseInverseOf: aMatrix [
2828
PMQRTest >> testMoorePenroseInverse [
2929

3030
| a inverse |
31-
a := PMMatrix new initializeRows:
32-
#( #( 5 40 1 ) #( 0 0 1 ) #( 0 0 1 ) ).
33-
inverse := a mpInverse .
34-
self assert: inverse isMoorePenroseInverseOf: a.
35-
36-
a := a * (PMMatrix rows: 3 columns: 3 random: 5.0).
37-
inverse := a mpInverse .
38-
self assert: inverse isMoorePenroseInverseOf: a.
3931

4032
a := PMMatrix new initializeRows:
4133
#( #( 5 40 1 2.5 ) #( 0 0 1 2.5 ) #( 0 0 1 2.5 ) ).
@@ -53,6 +45,26 @@ PMQRTest >> testMoorePenroseInverse [
5345
self assert: (a mpInverse closeTo: a inverse) ]
5446
]
5547

48+
{ #category : #tests }
49+
PMQRTest >> testMoorePenroseInverseOfNonRandomMatrix [
50+
| a inverse |
51+
a := PMMatrix new initializeRows:
52+
#( #( 5 40 1 ) #( 0 0 1 ) #( 0 0 1 ) ).
53+
inverse := a mpInverse .
54+
self assert: inverse isMoorePenroseInverseOf: a.
55+
]
56+
57+
{ #category : #tests }
58+
PMQRTest >> testMoorePenroseInverseOfProductOfMatrices [
59+
| a inverse |
60+
a := PMMatrix new initializeRows:
61+
#( #( 5 40 1 ) #( 0 0 1 ) #( 0 0 1 ) ).
62+
63+
a := a * (PMMatrix rows: 3 columns: 3 random: 5.0).
64+
inverse := a mpInverse .
65+
self assert: inverse isMoorePenroseInverseOf: a.
66+
]
67+
5668
{ #category : #tests }
5769
PMQRTest >> testOrthogonalize [
5870

0 commit comments

Comments
 (0)