aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/solvedio.spad.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-03-12 19:17:32 +0000
committerdos-reis <gdr@axiomatics.org>2011-03-12 19:17:32 +0000
commitc93e84048964194e5674e859d6bd8827010f09f6 (patch)
tree407ca23d232bf3f974550fce0175c49495ef49c0 /src/algebra/solvedio.spad.pamphlet
parent52fddea19454dc2b9bcb54c6edd5a4cd4f5765a9 (diff)
downloadopen-axiom-c93e84048964194e5674e859d6bd8827010f09f6.tar.gz
* src/algebra/: Systematically use negative? when comparing for
greater than 0.
Diffstat (limited to 'src/algebra/solvedio.spad.pamphlet')
-rw-r--r--src/algebra/solvedio.spad.pamphlet8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/algebra/solvedio.spad.pamphlet b/src/algebra/solvedio.spad.pamphlet
index 54a9330e..f83c9cb6 100644
--- a/src/algebra/solvedio.spad.pamphlet
+++ b/src/algebra/solvedio.spad.pamphlet
@@ -119,10 +119,10 @@ DiophantineSolutionPackage(): Cat == Capsule where
-- create vertices from node ind to other nodes
v := zero(k)$VI
for i in 1..k repeat
- ind > 0 =>
+ positive? ind =>
negative? coeffs.i =>
v.i := zeroNode + ind + coeffs.i
- coeffs.i > 0 =>
+ positive? coeffs.i =>
v.i := zeroNode + ind + coeffs.i
[v, true]
@@ -136,7 +136,7 @@ DiophantineSolutionPackage(): Cat == Capsule where
k := if ind < graph.zeroNode then m else n
for i in k..graph.dim repeat
x := sol.i
- v.i > 0 => -- vertex exists to other node
+ positive? v.i => -- vertex exists to other node
sol.i := x + 1
v.i = graph.zeroNode => -- solution found
verifyMinimality(sol, graph, flag) =>
@@ -174,7 +174,7 @@ DiophantineSolutionPackage(): Cat == Capsule where
k := if ind < graph.zeroNode then m else n
for i in k..graph.dim while flag repeat
x := sol.i
- x > 0 and v.i > 0 => -- vertex exists to other node
+ positive? x and positive? v.i => -- vertex exists to other node
sol.i := (x - 1) :: NI
v.i = graph.zeroNode => -- solution found
flag := false