MathGroup Archive 2009

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

Search the Archive

Compile for different parameter types


Say I want to have a compiled function that works for tensors of rank
2 or 3. Let's call this function f. Then

f = Compile[{{A,_Real,2},{B,_Real,2}}, expr]

would make function f for tensor of rank 2. Is it possible to expand
this function to work for both tensors of rank 2 and 3? Eventually I
would like to obtain a compiled function that works for a wide (but
limited) range of combinations of tensor ranks. All tensor ranks are
less than 15 so we are talking about at most 15^2=225 combinations.


  • Prev by Date: opening notebooks in mathematica player instead of mathematica
  • Next by Date: How to rotate a Histogram (Mathamatica 6)
  • Previous by thread: Re: opening notebooks in mathematica player instead of mathematica
  • Next by thread: Re: Compile for different parameter types