File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -270,9 +270,9 @@ PMMatrix >> atAllPut: element [
270270]
271271
272272{ #category : #' cell accessing' }
273- PMMatrix >> atColumn: anInteger [
273+ PMMatrix >> atColumn: aColumnNumber [
274274
275- ^ self columnAt: anInteger
275+ ^ self columnAt: aColumnNumber
276276]
277277
278278{ #category : #' cell accessing' }
@@ -311,6 +311,12 @@ PMMatrix >> atColumn: aColumnNumber put: aCollection startingAt: rowNumber [
311311
312312]
313313
314+ { #category : #' cell accessing' }
315+ PMMatrix >> atRow: aRowNumber [
316+ " answers the aRowNumber-th row in the receiver"
317+ ^ self rowAt: aRowNumber
318+ ]
319+
314320{ #category : #' cell accessing' }
315321PMMatrix >> atRow: rowIndex put: aCollection [
316322
Original file line number Diff line number Diff line change @@ -48,6 +48,16 @@ PMMatrixTest >> testAtColumnPutRepeat [
4848 self assert: a equals: (PMMatrix rows: #(#(1 nil nil) #(1 nil nil) #(nil nil nil) )).
4949]
5050
51+ { #category : #tests }
52+ PMMatrixTest >> testAtRow [
53+
54+ | a |
55+ a := PMMatrix rows: #(#(1 2 3) #(2 3 4) ).
56+
57+ self assert: (a atRow: 2 ) equals: (#(2 3 4) asPMVector).
58+ self assert: (a atRow: 1 ) equals: (#(1 2 3) asPMVector).
59+ ]
60+
5161{ #category : #' linear algebra' }
5262PMMatrixTest >> testAtRowPutAtColumnPut [
5363 | a |
You can’t perform that action at this time.
0 commit comments