MathGroup Archive 1997

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

Search the Archive

Sums vs Map efficiency

  • To: mathgroup at
  • Subject: [mg7715] Sums vs Map efficiency
  • From: Christophe Pichon <pichon at>
  • Date: Wed, 2 Jul 1997 14:21:36 -0400 (EDT)
  • Organization: University of Basel, Switzerland
  • Sender: owner-wri-mathgroup at

Hello !

Does anyone know how to code the following 
in a tensor (more efficient than sums) form ?

here A1 is a (n,n,n)tensor and (A1,A2,a) are  n*n matrices 

 Sum[ A1[[i,j,k]]*
a[[i,i1]]* a[[j,j1]]

For some reason in that form it seems to take quite a long time to 
process gm. (here a is symbolic a= {{a11,a12...} ... ann}} ) 

What I am after is an expression involving Map and Thread and
Transpose  ... ?
but I tried for a while with little success so far.



  E-mail: pichon at

  • Prev by Date: Display & DisplayString
  • Next by Date: Re: What is wrong?
  • Previous by thread: Display & DisplayString
  • Next by thread: Re: Sums vs Map efficiency