tensor() function and sets

Martyn Plummer plummer@iarc.fr
Thu, 22 Jul 1999 09:56:44 +0200 (CEST)

On 20-Jul-99 Jonathan Rougier wrote:
> Hi Everyone,
> To complete the outer() and kronecker() functions in the base, may I
> suggest the following tensor() function, which allows the multiplication
> of arrays through sets of conformable dimensions.  I am happy to write a
> help page if required. 

I have some code that could certainly be tidied up with the tensor()
function [1], but I wonder if "tensor" is the right name.
1) I would expect a function called "tensor" to construct a tensor object
   rather than multiply two arrays together.
2) The arguments aren't tensors. They are arrays.

How fast is it? It would be _really_ nice if this were done efficiently
in C code.


[1] ar.yw in the "bats" package. I was just looking at this wondering how
    to speed it up before rewriting the whole thing in C or Fortran.
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch