Decode Method

A DomainProduct object O makes available 3 main decoding methods:

{O decode(I L)}

returns the list L of tuples corresponding to the integers in the domain of FD variable I.

{O decodeLo(S L)}

return the list L of tuples corresponding to the integers in the lower bound of FS variable S.

{O decodeHi(S L)}

idem for the upper bound.

<DomainProduct decode method>=
meth decodeInt(I $)
   {DecodeInt I-@divisors @domains}
end 
meth decodeInts(L $)
   {Map L fun {$ I} {self decodeInt(I $)} end}
end 
meth decode(I $)
   {self decodeInts({FD.reflect.domList I} $)}
end 
meth decodeLo(S $)
   {self decodeInts({FS.reflect.lowerBoundList S} $)}
end 
meth decodeHi(S $)
   {self decodeInts({FS.reflect.upperBoundList S} $)}
end


Denys Duchier
Version 1.2.0 (20010221)