MathGroup Archive 2003

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

Search the Archive

Re: Caching of values and delayed sets

  • To: mathgroup at smc.vnet.net
  • Subject: [mg39715] Re: Caching of values and delayed sets
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Mon, 3 Mar 2003 23:48:44 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <b3pgdu$7hr$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

and you never had the idea to write out the 
dependence and to use Mathematica's dynamic
programming feature with:

c[a_,b_]:=c[a,b]=slow[]

How ever as long you have no explicit dependence
Mathematica can't store the argument lists for you.

Regards
  Jens

Nafod40 wrote:
> 
> Hola Amigos,
> 
> I have a variable A that depends via a delayed set on variables B1
> through B1000 that each depend via delayed set on variable C and other
> a mixture of the other B's, which delayed set depends on some slow to
> calculate function C:= slow[ ]. If you explode out the tree view of A
> symbolically, the variable C might appear 5000 times in a messy
> acyclic dependency graph.
> 
> How do I inject some smarts, so that, when asking for the value of A,
> I only evaluate C:=slow[ ] once, and cache it and use the cached value
> for every other time that I need C?


  • Prev by Date: Re: Caching of values and delayed sets
  • Next by Date: Re: How to evaluate a NIntegrate expression properly
  • Previous by thread: Re: Caching of values and delayed sets
  • Next by thread: Antiderivatives and Definite Integrals