axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [open-axiom-devel] [Axiom-developer] Re: [fricas-devel] Re: iterator


From: Ralf Hemmecke
Subject: Re: [open-axiom-devel] [Axiom-developer] Re: [fricas-devel] Re: iterators and cartesian product.
Date: Tue, 23 Oct 2007 02:49:06 +0200
User-agent: Thunderbird 2.0.0.6 (X11/20070728)

| It looks like mathematical expression {matrix ... | (a,b,c,d) in {1..9}^4}.

Unfortunately, I don't have the time at the moment, but I really don't
see why one cannot have something like

for x in (1..3)^3 repeat {
   (a,b,c) := x;
   stdout << "(" << a, "," << b << "," << c << ")" << newline;
}

in Aldor *now* which would print something like

(1,1,1)
(1,1,2)
(1,1,3)
(1,2,1)
(1,2,2)
(1,2,3)
...

The "trick" would be to turn

  (1..3)^3

into a

  Generator Cross(Integer, Integer, Integer)

or something . That is not too difficult. (If you are really interested
ask me again next week, then I might have a little more time to actually
provide the code.)

So the syntax is there only the functionality is not available in any
library. One has to program it oneself.

Ralf






reply via email to

[Prev in Thread] Current Thread [Next in Thread]