MathGroup Archive 2002

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

Search the Archive

Re: function composition

  • To: mathgroup at smc.vnet.net
  • Subject: [mg38187] Re: function composition
  • From: "Francois Bernard Lauze" <francoisNO at SPAMit-c.dk>
  • Date: Wed, 4 Dec 2002 03:26:32 -0500 (EST)
  • Organization: UNI-C
  • Sender: owner-wri-mathgroup at wolfram.com

"Tomas Garza" <tgarza01 at prodigy.net.mx> wrote in message
news:ashulb$ejn$1 at smc.vnet.net...
> Your first problem I don't understand. As for the second, this may give
you
> a taste of Mathematica's powers:
>
> In[1]:=
> <<DiscreteMath`Combinatorica`
>
> In[2]:=
> KSubsets[{a, b, c}, 2] /. {x_, y_} -> {x -> 0, y -> 0}
> Out[2]=
> {{a -> 0, b -> 0}, {a -> 0, c -> 0}, {b -> 0, c -> 0}}
>

Thanks for your answers!
I find the KSubset beautiful!

I realize that I was really too imprecise for the first problem. What i really want
to do is to define some finite differences operators to discretize some PDE's.
And for the composition pattern, it's meant to avoid involving points too far
away when differentiating twice with respect with the same variable.
So what I did was to define an explicit differentiation formula for that case and
set, as indicated by the first answer, the HoldFirst attribute to my central
difference operator.

The problem with lists was in fact for extracting the coefficients
of the discretization - the stencil. All in all it now works, and my
code generates C routines.




--
Francois Lauze
The IT University of Copenhagen, Glentevej 67
2400 Kbh NV, Denmark
Tel (45) 38 16 89 29




  • Prev by Date: Re: How do i enter index AND power
  • Next by Date: RE: How do i enter index AND power
  • Previous by thread: Re: Stereograms in Mathematica
  • Next by thread: Re: function composition