[eclipse-clp-users] (no subject)

From: <mkhiari_at_...119...>
Date: Wed, 04 Jun 2008 13:32:00 +0200
Hie, 

We would like to use IntegerSet variables whose initial domains
are not a single interval, but a UNION of intervals. 

Is there a simple way to state this in ECLiPSe, since union
is defined for IntegerSets but not for Sets of IntegerSets ?
(and we don't want to have to enumerate each of the intervals)
Example : 

X :: [1, 2] .. [1, 2, 3], (= {{1,2},{1,2,3}})
Y :: [5]..[5,6],(= {{5},{5,6}} 

using all_union([X,Y],Z), we obtain Z = [1,2,5]..[1,2,3,5,6] which is 
explicitly noted Z = {{1,2,5},{1,2,5,3},{1,2,5,6},{1,2,5,3,6}} while on 
reality we want to build the set Z = {{1,2},{1,2,3},{5},{5,6}}. Is there a 
way to build such a set? 

yours sincerely, 

Mehdi 
Received on Wed Jun 04 2008 - 04:32:10 CEST

This archive was generated by hypermail 2.2.0 : Mon Jul 09 2018 - 02:05:29 CEST