aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/array2.spad.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2013-05-14 05:03:49 +0000
committerdos-reis <gdr@axiomatics.org>2013-05-14 05:03:49 +0000
commit23d6838558561ccf254b712e5f7edfcbd81fcf51 (patch)
tree627d8fc4523485f344c090acf408afc1f2598d4a /src/algebra/array2.spad.pamphlet
parentbbaaa1fdccbb37ef8881b51edb6588060f30601a (diff)
downloadopen-axiom-23d6838558561ccf254b712e5f7edfcbd81fcf51.tar.gz
* algebra/array2.spad.pamphlet (InnerTwoDimensionalArray)
[row, column]: Fix off-by-one thinko.
Diffstat (limited to 'src/algebra/array2.spad.pamphlet')
-rw-r--r--src/algebra/array2.spad.pamphlet6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/algebra/array2.spad.pamphlet b/src/algebra/array2.spad.pamphlet
index 1f3aa9fe..f7597b79 100644
--- a/src/algebra/array2.spad.pamphlet
+++ b/src/algebra/array2.spad.pamphlet
@@ -306,11 +306,13 @@ InnerTwoDimensionalArray(R,Row,Col):_
concat(s, "\end{array} \right]")$String
row(m,i) ==
- i < 1 or i >= nrows m => error "row: index out of range"
+ i < 1 or i > nrows m => error "row: index out of range"
+ i := dec i
[[rep(m).i.j for j in 0..ncols m - 1]]$Row
column(m,j) ==
- j < 1 or j >= ncols m => error "column: index out of range"
+ j < 1 or j > ncols m => error "column: index out of range"
+ j := dec j
[[rep(m).i.j for i in 0..nrows m - 1]]$Col