Discussion:
revision 188 / iso-experiment
Martin Rubey
2007-03-18 00:21:13 UTC
Permalink
The main purpose of this revision is to get out quickly something that
compiles, since I'm off to Lyon.

Not really on purpose is the inclusion of a proof of concept file "examples"
that computes the height of binary trees.

There is no new documentation yet, I hope to include this tomorrow morning.

Martin


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Martin Rubey
2007-03-18 08:43:56 UTC
Permalink
Dear Ralf,

just started working on docs of MultiCompose...
- Implemented the Subset species and adapted the Times
constructor to use that species.
I somewhat like and dislike coerce and complement being two functions at the
same time. Although the time needed might be negligible, it seems a waste to
me to double it just because we disagree on the naming.

Or do you have another reason?

Martin


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Martin Rubey
2007-03-18 12:31:34 UTC
Permalink
I made it two functions for some reasons.
Thanks for all the good reasons.

I'm off to Lyon now, I just checked in what I have so far (it's not much,
though).

I checked Subst from combstruct, but I couldn't really find out what it
does. It seems that the arguments are in different order, and the results do
not always coincide. Maybe you can find out more:

with(combstruct);

f := {B=Union(Z, Prod(B, B)), F = Subst(Set(Z, card >= 1), B), T = Subst(B,
Set(Z, card >= 1))};
seq(count([F, f, labeled], size=i), i=1..10);
1, 3, 19, 207, 3211, 64383, 1581259, 45948927, 1541641771, 58645296063

-- this agrees with Compose(B, NonEmpty SetSpecies)
seq(count([F, f, unlabeled], size=i), i=1..10);
1, 2, 5, 15, 51, 188, 731, 2950, 12235, 51822

-- this agrees with Compose(B, NonEmpty SetSpecies)
seq(count([T, f, labeled], size=i), i=1..10);
1, 3, 19, 193, 2721, 49171, 1084483, 28245729, 848456353, 28875761731

-- this agrees with Compose(SetSpecies, B)
seq(count([T, f, unlabeled], size=i), i=1..10);
1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796

-- surprise! I expected
-- 1,1,2,4,10,26,77,235,758,2504

Martin


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Ralf Hemmecke
2007-03-19 14:27:48 UTC
Permalink
It seems there were some errors so that the following mail did not made
it to the list. :-(

Ralf


Subject: Re: trunk revision 189
From: Ralf Hemmecke <ralf-***@public.gmane.org>
Date: Sun, 18 Mar 2007 11:14:55 +0100
To: Martin Rubey <martin.rubey-***@public.gmane.org>
CC: aldor-combinat-devel <aldor-combinat-devel-5NWGOfrQmneRv+***@public.gmane.org>

Hallo Martin
Post by Martin Rubey
- Implemented the Subset species and adapted the Times
constructor to use that species.
I somewhat like and dislike coerce and complement being two functions at the
same time. Although the time needed might be negligible, it seems a waste to
me to double it just because we disagree on the naming.
Or do you have another reason?
I made it two functions for some reasons.

1) One might want to access only one part of the (subset, complement)
pair. So two functions seemed to be the better choice.

2) If a function is called coerce: A->B, then I would like to call it
with a::B and not coerce(a). If I had made coerce: A-> (B,B) then
(set, complement) := a::(B,B) does probably not work. (I've not tested
it.) So I would have to have coerce: A->Cross(B,B). (That sounds not too
bad.)

3) The time for calling two functions is not too much overhead, I
suppose. But I had no idea for a good name of such a function. "coerce"
is somewhat too generic.

4) I thought some time whether I should call the functions "subset" and
"complement" instead of "coerce" and "complement". But for me it sounded
somewhat strange to have an element of "Subset" and then call a function
"subset" to actually get a subset. But since the result is of type
"SetSpecies", perhaps "set" would be an appropriate name.

5) I have not introduced a function "setAndComplement" since that looks
too long for me and I did not really like the "coerce: % -> Cross(B,B)"
version.

6) I don't want to have a record like

Record(set: SetSpecies L, complement: SetSpecies L)

as a result type. If at all, then Cross(SetSpecies L, SetSpecies L)
would be much better, because it looks more mathematical.

7) As always, consider my decisions as debatable. If you come up with
something better, then we can certainly change it.

All the best
Ralf

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Loading...