Re: [eclipse-clp-users] Predicate search/6 over Real Numbers

From: <mskala_at_...206...>
Date: Sat, 17 Apr 2021 16:54:14 -0400 (EDT)
On Sat, 17 Apr 2021, Amine Marref wrote:
> My understanding from this page is that search/6 also works for real values;
> why is search/6 complaining about integer bounds?

I don't think search/6 works for real values.  The page you linked to says
"It can currently be used with either the finite domains (if loaded via
lib(fd_search)), integer IC finite domains, and GFD integer finite domains
(if loaded via lib(gfd_search))."

Reals aren't on that list, and since search/6 depends on indomain/2 -
which only works on finite domain variables - it's reasonable to guess it
wouldn't work on reals.  Maybe at the absolute outside you could implement
your own replacement for indomain/2 and use that as argument 4 of search/6
to do a search on real-valued variables.  But you may also get better
results with locate/4 and friends, which are meant to work with reals.

-- 
Matthew Skala
mskala_at_...206...                 People before tribes.
https://ansuz.sooke.bc.ca/
Received on Sat Apr 17 2021 - 21:35:02 CEST

This archive was generated by hypermail 2.3.0 : Thu Feb 22 2024 - 18:13:20 CET