FD.abs
Torsten Anders
t.anders at nici.kun.nl
Tue Feb 5 15:15:49 CET 2002
Hi,
For a FD search I need the absolute value of a difference. So far I came only
up with a solution introducing a choice point (see example below). Can this
be done without?
proc {AbsDiff X Y Z}
dis (Y-X) >=: 0 then Z =: Y-X
[] (Y-X) <: 0 then Z =: X-Y
end
end
Thanks,
Torsten Anders
-
Please send submissions to users at mozart-oz.org
and administriva mail to users-request at mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.
More information about the mozart-users
mailing list