Skip to content

Commit 11cccba

Browse files
committed
change variable names
1 parent cd53694 commit 11cccba

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

src/Math-Matrix/PMMatrix.class.st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ a tr.
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' }

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -199,16 +199,16 @@ PMMatrixTest >> testFlattenRows [
199199

200200
{ #category : #tests }
201201
PMMatrixTest >> 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 }

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ PMSymmetricMatrixTest >> testEqual [
4040

4141
{ #category : #tests }
4242
PMSymmetricMatrixTest >> 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 }

0 commit comments

Comments
 (0)