Re: compiling problem
- To: mathgroup at smc.vnet.net
- Subject: [mg19096] Re: compiling problem
- From: Paul Abbott <paul at physics.uwa.edu.au>
- Date: Thu, 5 Aug 1999 01:35:14 -0400
- Organization: University of Western Australia
- References: <7nlppi$bf5@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
"Kiran L. Shrestha" wrote: > Can anybody teach me how to compile a function of several variables which > are values of other functions. You cannot do this, i.e., you cannot (efficiently) call an "external" function from within a Compile statement. > For example, I have a function > > f[x_, y_]:= alpha[x] + alpha[y] - beta[x]/beta[y]. > > The alpha and beta function values are known. The reason I need to compile > this function is because I have to iterate this illustrative function many > many times. Each iteration helps to update the functions alpha and beta. Perhaps you could post an example of your alpha and beta functions and the iterative operations you want to perform. Written properly and using, say, Nest, you should be able to get sufficient speed without compilation. ____________________________________________________________________ Paul Abbott Phone: +61-8-9380-2734 Department of Physics Fax: +61-8-9380-1014 The University of Western Australia Nedlands WA 6907 mailto:paul at physics.uwa.edu.au AUSTRALIA http://physics.uwa.edu.au/~paul God IS a weakly left-handed dice player ____________________________________________________________________