axiom-developer
[Top][All Lists]
Advanced

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

[Axiom-developer] Re: [open-axiom-devel] [fricas-devel] Re: iterators an


From: Francois Maltey
Subject: [Axiom-developer] Re: [open-axiom-devel] [fricas-devel] Re: iterators and cartesian product.
Date: 22 Oct 2007 11:30:05 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Hello Martin,

> > At use, Mupad is almost perfect 
> > [a $a=0..9] and [10*a+b $a=1..9$b=0..9] and [10*a+b $a=1..9$b=0..9$c=0..9]
> > $ is a (right to left)? inner operator.
> > 
> > Of corse parallel iterations must remain as a pretty pure concept of axiom.
> 
> So, how do you do parallel iteration in MuPad?

With a silly 

    [...L[i]...LL[i]... for i in 1 .. min([4, length L, length LL])]
vs  the shorter [...x...xx... for x in L for xx in LL for k in 1..4] for axiom


I like the possible new repeat operator :

[matrix [[a,b,15-a-b],[c,d,15-c-d]]
 for a in 1..9 repeat for b in 1..9 repeat for c in 1..9 repeat for d in 1..9]

near from the mupad/maple command :
[matrix [[a,b,15-a-b],[c,d,15-c-d]]$a=1..9$b=1..9$c=1..9$d=1..9]

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

This command breaks this previous mathematical set
but build Union_{for a} (Unioun_{for b} (Unioun_{for c} set matrix for d))

concat [concat [concat [[matrix [[a,b,15-a-b],[c,d,15-c-d]] for a in 1..9]
   for b in 1..9] for c in 1..9] for d in 1..9] 

mupad doesn't has a perfect syntax because lists and intervals don't have
the same operator : [..x.. $x in L] and [..x.. $x=1..10]. Axiom makes better !
[..x.. for x in L] and [..x.. for x in 1..10].

For theses 2 examples I feel mupad better than maple. I don't know mathematica.

Is it an answer to your question ?

Francois




reply via email to

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