Hi again,
I have written a little script that seems to show buggy behaviour....
I'd be very happy to learn the opposite, though! In any case, please
bear with me, I am a musician, who is considering those sets as
hopefully distinct chords....
I get [[50 51 52 53 64] [50 51 52 53 64]] as a solution, so the line
{FS.distinct S1 S2} seems to have no effect.
When I remove those lines,
% lets try to be contradictory
I = {FS.var.decl}
{FS.intersect S1 S2 I}
{FS.card I 5}
the result is [[50 51 52 53 54] [50 51 52 53 55]], which is nice
indeed and happened due to {FS.distinct S1 S2}, cause removing it as
well yields [[50 51 52 53 54] [50 51 52 53 54]].
I still hope, I am doing something wrong....
Ciao,
Kilian
--
declare
fun {Ints2Set Ints}
S = {FS.var.decl}
in
{FD.distinct Ints}
{ForAll Ints proc {$ X} {FS.include X S} end}
{FS.card S {Length Ints}}
S
end
{Browse
{SearchOne proc {$ Root}
S1 S2
I
in
% A Root with only FD ints - only those are distributed
Root = [[{FD.int 50#70} {FD.int 50#70} {FD.int 50#70} {FD.int
50#70} {FD.int 50#70}]
[{FD.int 50#70} {FD.int 50#70} {FD.int 50#70} {FD.int 50#70}
{FD.int 50#70}]]
% Making Sets from the two parts of Root
S1 = {Ints2Set Root.1}
S2 = {Ints2Set Root.2.1}
% the prop to be tested
{FS.distinct S1 S2}
% lets try to be contradictory
I = {FS.var.decl}
{FS.intersect S1 S2 I}
{FS.card I 5}
{FD.distribute naive {Append Root.1 Root.2.1}}
end}.1}
Am 19.05.2006 um 16:19 schrieb Kilian Sprotte:
Hello all,
currently, I am having a difficult time with FS.distinct. I am
experiencing this in a bigger setup and haven't really managed to
reproduce my problem in a small example, sorry, (I'll send it to
you, if I find one), but nevertheless I wanted to tell you my
observations.
If I have two FS sets A and B, which have both of them a
cardinality of 5, I get 2 completely equal sets in the solution,
although I have posted:
{FS.distinct A B}
If I change this line to a kind of handmade distinct à la:
local
I C
in
I = {FS.var.decl}
{FS.intersect A B I}
C = {FS.int 0#4} % I know A's and B's card is 5!
{FS.card I C}
end
I indeed get 2 different sets....
Any comments?
Thanks,
Kilian
______________________________________________________________________
___________
mozart-users mailing list mozart-
[EMAIL PROTECTED]
http://www.mozart-oz.org/mailman/listinfo/mozart-users
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users