File tree Expand file tree Collapse file tree 3 files changed +13
-13
lines changed
Expand file tree Collapse file tree 3 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 6868]
6969
7070{ #category : #' instance creation' }
71- PMMatrix class >> identity: anInteger [
72- ^ PMSymmetricMatrix identity: anInteger
71+ PMMatrix class >> identity: dimension [
72+ ^ PMSymmetricMatrix identity: dimension
7373]
7474
7575{ #category : #' instance creation' }
Original file line number Diff line number Diff line change @@ -199,16 +199,16 @@ PMMatrixTest >> testFlattenRows [
199199
200200{ #category : #tests }
201201PMMatrixTest >> testIdentityMatrix [
202- |a a2 |
202+ |expectedIdentityMatrix identityMatrix |
203203
204- a := PMMatrix zerosRows: 3 cols: 3 .
204+ expectedIdentityMatrix := PMMatrix zerosRows: 3 cols: 3 .
205205
206- a at: 1 at: 1 put: 1 .
207- a at: 2 at: 2 put: 1 .
208- a at: 3 at: 3 put: 1 .
206+ expectedIdentityMatrix at: 1 at: 1 put: 1 .
207+ expectedIdentityMatrix at: 2 at: 2 put: 1 .
208+ expectedIdentityMatrix at: 3 at: 3 put: 1 .
209209
210- a2 := PMMatrix identity: 3 .
211- self assert: a2 equals: a .
210+ identityMatrix := PMMatrix identity: 3 .
211+ self assert: identityMatrix equals: identityMatrix .
212212]
213213
214214{ #category : #tests }
Original file line number Diff line number Diff line change @@ -40,12 +40,12 @@ PMSymmetricMatrixTest >> testEqual [
4040
4141{ #category : #tests }
4242PMSymmetricMatrixTest >> testIdentityMatrix [
43- |a a1 |
43+ |expectedIdentityMatrix identityMatrix |
4444
45- a := PMSymmetricMatrix identity: 3 .
46- a1 := PMSymmetricMatrix rows: #(#(1 0 0) #(0 1 0) #(0 0 1) ).
45+ identityMatrix := PMSymmetricMatrix identity: 3 .
46+ expectedIdentityMatrix := PMSymmetricMatrix rows: #(#(1 0 0) #(0 1 0) #(0 0 1) ).
4747
48- self assert: a equals: a1 .
48+ self assert: identityMatrix equals: expectedIdentityMatrix .
4949]
5050
5151{ #category : #tests }
You can’t perform that action at this time.
0 commit comments