diff options
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/algebra/array2.spad.pamphlet | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 44369bc8..87130560 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2013-05-14 Gabriel Dos Reis <gdr@integrable-solutions.net> + + * algebra/array2.spad.pamphlet (InnerTwoDimensionalArray) + [row, column]: Fix off-by-one thinko. + 2013-05-13 Gabriel Dos Reis <gdr@integrable-solutions.net> * algebra/array2.spad.pamphlet (TwoDimensionalArrayCategory): Move 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 |