Re: [sage-support] finite cartesian product

2010-10-04 Thread Johannes
thnx, excatly what i was looking for. Am 04.10.2010 00:32, schrieb Philipp Schneider: > Hi, > >> (...) >> In my next try I used FiniteEnumeratedSet and cartesian_product, but >> this is not iterable. >> Is there any other way to do this? >> > there is a sage function called "cartesian_prod

Re: [sage-support] finite cartesian product

2010-10-03 Thread Philipp Schneider
Hi, > (...) > In my next try I used FiniteEnumeratedSet and cartesian_product, but > this is not iterable. > Is there any other way to do this? there is a sage function called "cartesian_product_iterator". Greetings, Phil -- To post to this group, send email to sage-support@googlegroups.com To

[sage-support] finite cartesian product

2010-10-03 Thread Johannes
hi list, I'm looking for a short and nice way to iterate over a product of indices. If I have the index sets A,B,C i could do it by: res = [] for a in A: for b in B: for c in C: res.append(doSomething(a,b,c)) Could this be done in a list comprehension too? I tried [doSometh