Re:search/6 inside bagof/3?

From: Mark Wallace <mgw_at_icparc.ic.ac.uk>
Date: Mon 04 Nov 2002 10:03:50 AM GMT
Message-ID: <3DC64606.AB6B19C5@icparc.ic.ac.uk>
Hi,
I'm sorry I mistyped my reply to Zeynep:
As 'B' only occurs once in bagof, it cannot take different values when 
collecting solutions in the bag (see the documentation of bagof/3).
To get what you want you have to write:
bagof([X,B],search(X,0,input_order,indomain_min,complete,[backtrack(B)]),Bag)

        Cheers
                Mark
-- 
_______________________________________________________________
Dr. Mark Wallace, IC-Parc,		Phone  +44 (0)20 7594 8434 
William Penney Laboratory, 		Fax    +44 (0)20 7594 8432
Imperial College, London SW7 2AZ, UK.	Email: mgw@icparc.ic.ac.uk
Received on Mon Nov 04 10:06:20 2002

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:18 PM GMT GMT