Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Compile nested loops with depending index variables...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61116] Compile nested loops with depending index variables...
  • From: "Christoph Lhotka" <lhotka at astro.univie.ac.at>
  • Date: Tue, 11 Oct 2005 03:20:08 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

How is it possible to compile the following code structures in Mathematica:

Do|Table[exp[i,j,...],{i,0,n},{j,0,i},...],

for example in

In[..]:=f=Compile[{n},Do[g[i,j],{i,0,n},{j,0,i}]
Out[..]:= CompiledFunction[...]

?

It does not work, when you use the compiled function, since the compiler
expects a integer expression for i...

Do[Do[Do ...  does not work either!

This is such a basic construct!

-- Mag. Christoph Lhotka --
University of Vienna / Institute for Astronomy
mail. lhotka at astro.univie.ac.at


  • Prev by Date: Text in LiveGraphics3D 1.90
  • Next by Date: region bounded by surfaces
  • Previous by thread: Text in LiveGraphics3D 1.90
  • Next by thread: Re: Compile nested loops with depending index variables...