MathGroup Archive 2002

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

Search the Archive

Question regarding Compile


I apologise if this question (or something like this) has been asked 
earlier.

I have a slew of functions like :

f1[p1_,p2_,p3_]:= <some fn.>
f2, f3 similarly defined.

f5[x_,y_,z_]:=F(f1[..],f2[..],f3[..],f4[..]);

Now, this particular computation proceeds very slowly and I wish to speed 
it up by compiling my functions. However, the very syntax of Compile 
indicates that I cannot invoke a Compile'd function and pass arguments to 
it.

For instance,

f1=Compile[{p1,p2,p3}, <some expression>] cannot be used in f5 above the 
way I have been doing. Does this mean that I can only Compile f5 by itself 
(with all the functions that it depends upon replaced by actual expression) 
? If so, the resulting expression for f5 would be quite, quite complicated.

A little confused about this. And, yes, I haven't ever Compile'd a 
Mathematica function.

Thanks.



  • Prev by Date: Need Help on Plotting 3D Using a Scalar Function
  • Next by Date: Using rules from Solve
  • Previous by thread: Re: Re: Need Help on Plotting 3D Using a Scalar Function
  • Next by thread: Re: Question regarding Compile