MathGroup Archive 2003

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

Search the Archive

Re: Recovering f[z] values?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg42723] Re: Recovering f[z] values?
  • From: AES/newspost <siegman at stanford.edu>
  • Date: Wed, 23 Jul 2003 00:25:14 -0400 (EDT)
  • References: <bfgb8a$8g4$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

My original post on this was not phrased with sufficient care: I really 
had in mind not that  f[z]  was a defined function in the sense of

    f[z_] := some function of z

but rather more like an array which, during the course of a calculation, 
had values assigned to some of its (not necessarily integer) elements by 
statements like

    f[somevalue] = someothervalue

and I wanted to recover all the somevalue-someothervalue pairs at the 
end of the calculation.

The solution I first received from jmt and then from several others, 
namely

    {#[[1,1,1]],#[[1,1]]}&/@DownValues[f]

does the job exactly [even if, to my eye, a syntax like this is 
excruciatingly ugly].  Learning about DownValues was the key.   

Thanks for responses.


  • Prev by Date: Re: Re: Recovering f[z] values?
  • Next by Date: Re: shadow-proofing a package
  • Previous by thread: Re: Re: Recovering f[z] values?
  • Next by thread: RE: Recovering f[z] values?