MathGroup Archive 2011

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

Search the Archive

Overloading functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119093] Overloading functions
  • From: Sam Takoy <sam.takoy at yahoo.com>
  • Date: Sat, 21 May 2011 06:50:38 -0400 (EDT)

Hi,

In the following code

MyOperator[g_][x_, y_] = 4 + Derivative[1, 0][g][x, y];

f[x_, y_] = x + y;
f[x_, y_, z_] = 2 x + 2 y + 2 z;

MyOperator[f][x, y]


how does Mathematica know which f to send to MyOperator. Can someone 
outline the formal decision tree that Mathematica follows?

Thanks!

Sam


  • Prev by Date: Re: Convert Matrix to Sparse Matrix
  • Next by Date: just for your amusement
  • Previous by thread: Re: Series[log[x], {x, 0, 3}]
  • Next by thread: Re: Overloading functions