From c93e84048964194e5674e859d6bd8827010f09f6 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sat, 12 Mar 2011 19:17:32 +0000 Subject: * src/algebra/: Systematically use negative? when comparing for greater than 0. --- src/algebra/solvedio.spad.pamphlet | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/algebra/solvedio.spad.pamphlet') 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 -- cgit v1.2.3