aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/bezout.spad.pamphlet
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra/bezout.spad.pamphlet')
-rw-r--r--src/algebra/bezout.spad.pamphlet14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/algebra/bezout.spad.pamphlet b/src/algebra/bezout.spad.pamphlet
index 7f6b5400..31bde193 100644
--- a/src/algebra/bezout.spad.pamphlet
+++ b/src/algebra/bezout.spad.pamphlet
@@ -66,13 +66,13 @@ BezoutMatrix(R,UP,M,Row,Col): Exports == Implementation where
coef := lc p0; deg := degree p0; p0 := reductum p0
-- put bk = coef(p,k) in sylmat(minR + i,minC + i + (n1 - k))
for i in 0..n2 - 1 repeat
- qsetelt_!(sylmat,minR + i,minC + n1 - deg + i,coef)
+ qsetelt!(sylmat,minR + i,minC + n1 - deg + i,coef)
q0 := q
-- fill in coefficients of 'q'
while not zero? q0 repeat
coef := lc q0; deg := degree q0; q0 := reductum q0
for i in 0..n1-1 repeat
- qsetelt_!(sylmat,minR + n2 + i,minC + n2 - deg + i,coef)
+ qsetelt!(sylmat,minR + n2 + i,minC + n2 - deg + i,coef)
sylmat
bezoutMatrix(p,q) ==
@@ -96,7 +96,7 @@ BezoutMatrix(R,UP,M,Row,Col): Exports == Implementation where
-- for i = 0...
-- quit when i > m2 or when i + (n1 - k) > m1, whichever happens first
for i in 0..min(m2,deg - 1) repeat
- qsetelt_!(sylmat,minR + i,minC + n1 - deg + i,coef)
+ qsetelt!(sylmat,minR + i,minC + n1 - deg + i,coef)
q0 := q
-- fill in coefficients of 'q'
while not zero? q0 repeat
@@ -106,7 +106,7 @@ BezoutMatrix(R,UP,M,Row,Col): Exports == Implementation where
-- quit when i > m1 or when i + (n2 - k) > m1, whichever happens first
-- since n2 - k >= 0, we quit when i + (n2 - k) > m1
for i in 0..(deg + n1 - n2 - 1) repeat
- qsetelt_!(sylmat,minR + n2 + i,minC + n2 - deg + i,coef)
+ qsetelt!(sylmat,minR + n2 + i,minC + n2 - deg + i,coef)
-- 'bezmat' will be the 'Bezout matrix' as described in Knuth
bezmat : M := new(n1,n1,0)
for i in 0..m2 repeat
@@ -121,7 +121,7 @@ BezoutMatrix(R,UP,M,Row,Col): Exports == Implementation where
for k in minC..maxC repeat
c := coef * qelt(sylmat,minR + m2 - i - deg,k) +
qelt(bezmat,minR + m2 - i,k)
- qsetelt_!(bezmat,minR + m2 - i,k,c)
+ qsetelt!(bezmat,minR + m2 - i,k,c)
q0 := reductum q0
p0 := p
while not zero? p0 repeat
@@ -132,10 +132,10 @@ BezoutMatrix(R,UP,M,Row,Col): Exports == Implementation where
for k in minC..maxC repeat
c := -coef * qelt(sylmat,minR + m - i - deg,k) +
qelt(bezmat,minR + m2 - i,k)
- qsetelt_!(bezmat,minR + m2 - i,k,c)
+ qsetelt!(bezmat,minR + m2 - i,k,c)
p0 := reductum p0
for i in n2..m1 repeat for k in minC..maxC repeat
- qsetelt_!(bezmat,minR + i,k,qelt(sylmat,minR + i,k))
+ qsetelt!(bezmat,minR + i,k,qelt(sylmat,minR + i,k))
bezmat
if R has commutative("*") then