aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/matrix.spad.pamphlet
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra/matrix.spad.pamphlet')
-rw-r--r--src/algebra/matrix.spad.pamphlet18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/algebra/matrix.spad.pamphlet b/src/algebra/matrix.spad.pamphlet
index 4a63ccf5..a40de7a0 100644
--- a/src/algebra/matrix.spad.pamphlet
+++ b/src/algebra/matrix.spad.pamphlet
@@ -44,7 +44,7 @@ IndexedMatrix(R,mnRow,mnCol): Exports == Implementation where
Implementation ==>
InnerIndexedTwoDimensionalArray(R,mnRow,mnCol,Row,Col) add
- swapRows_!(x,i1,i2) ==
+ swapRows!(x,i1,i2) ==
(i1 < minRowIndex(x)) or (i1 > maxRowIndex(x)) or _
(i2 < minRowIndex(x)) or (i2 > maxRowIndex(x)) =>
error "swapRows!: index out of range"
@@ -53,8 +53,8 @@ IndexedMatrix(R,mnRow,mnCol): Exports == Implementation where
xx := x pretend PrimitiveArray(PrimitiveArray(R))
n1 := i1 - minRow; n2 := i2 - minRow
row1 := qelt(xx,n1)
- qsetelt_!(xx,n1,qelt(xx,n2))
- qsetelt_!(xx,n2,row1)
+ qsetelt!(xx,n1,qelt(xx,n2))
+ qsetelt!(xx,n2,row1)
xx pretend $
if R has commutative("*") then
@@ -138,7 +138,7 @@ Matrix(R): Exports == Implementation where
minRowIndex x == mnRow
minColIndex x == mnCol
- swapRows_!(x,i1,i2) ==
+ swapRows!(x,i1,i2) ==
(i1 < minRowIndex(x)) or (i1 > maxRowIndex(x)) or _
(i2 < minRowIndex(x)) or (i2 > maxRowIndex(x)) =>
error "swapRows!: index out of range"
@@ -147,8 +147,8 @@ Matrix(R): Exports == Implementation where
xx := x pretend PrimitiveArray(PrimitiveArray(R))
n1 := i1 - minRow; n2 := i2 - minRow
row1 := qelt(xx,n1)
- qsetelt_!(xx,n1,qelt(xx,n2))
- qsetelt_!(xx,n2,row1)
+ qsetelt!(xx,n1,qelt(xx,n2))
+ qsetelt!(xx,n2,row1)
xx pretend $
positivePower:($,Integer,NonNegativeInteger) -> $
@@ -162,7 +162,7 @@ Matrix(R): Exports == Implementation where
b := new(nn,nn,0) pretend Matrix(R)
c := new(nn,nn,0) pretend Matrix(R)
xx := x pretend Matrix(R)
- power_!(a,b,c,xx,n :: NonNegativeInteger)$MATSTOR pretend $
+ power!(a,b,c,xx,n :: NonNegativeInteger)$MATSTOR pretend $
x:$ ** n:NonNegativeInteger ==
not((nn := nrows x) = ncols x) =>
@@ -215,7 +215,7 @@ Matrix(R): Exports == Implementation where
diagonalMatrix(v: Vector R) ==
n := #v; ans := zero(n,n)
for i in minr(ans)..maxr(ans) for j in minc(ans)..maxc(ans) _
- for k in mini(v)..maxi(v) repeat qsetelt_!(ans,i,j,qelt(v,k))
+ for k in mini(v)..maxi(v) repeat qsetelt!(ans,i,j,qelt(v,k))
ans
-- diagonalMatrix(vec: Vector $) ==
@@ -305,7 +305,7 @@ RectangularMatrix(m,n,R): Exports == Implementation where
ans : Matrix R := new(m,n,0)
for i in minr(ans)..maxr(ans) for ll in l repeat
for j in minc(ans)..maxc(ans) for r in ll repeat
- qsetelt_!(ans,i,j,r)
+ qsetelt!(ans,i,j,r)
per ans
row(x,i) == directProduct row(rep x,i)