Search String: Display: Description: Sort:

Results:

References: [ +subject:/^(?:^\s*(re|sv|fwd|fw)[\[\]\d]*[:>-]+\s*)*\[S\]\s+A\s+particular\s+scalar\/matrix\s+product\s*$/: 3 ]

Total 3 documents matching your query.

1. [S] A particular scalar/matrix product (score: 1)
Author: "D. Wiens" <wiens@stat.ualberta.ca>
Date: Thu, 23 Jul 1998 13:15:43 -0600 (MDT)
Given a vector w=(w[1],...,w[p]) and an n by n by p array A, is there a way, which avoids looping, to compute the sum of products (= an n by n matrix) w[1]*A[,,1] + ... + w[p]*A[,,p] ? It would be su
/archives/html/s-news/1998-07/msg00163.html (8,229 bytes)

2. Re: [S] A particular scalar/matrix product (score: 1)
Author: Christian Keller <ckeller@aicos.com>
Date: Fri, 24 Jul 1998 08:27:05 +0200
Here is a possible solution: --> sweep , , 1 [,1] [,2] [1,] 1 3 [2,] 2 4 , , 2 [,1] [,2] [1,] 5 7 [2,] 6 8 , , 3 [,1] [,2] [1,] 9 11 [2,] 10 12 , , 1 [,1] [,2] [1,] 10 30 [2,] 20 40 , , 2 [,1] [,2] [
/archives/html/s-news/1998-07/msg00172.html (9,077 bytes)

3. Re: [S] A particular scalar/matrix product (score: 1)
Author: Prof Brian D Ripley <ripley@stats.ox.ac.uk>
Date: Fri, 24 Jul 1998 08:04:53 +0100 (BST)
more efficiently, d <- dim(A) dim(A) <- c(prod(d[-3]),d[3]) B <- A %*% w dim(B) <- d[-3] The relies on the ordering of indices in an array; use aperm if you needed to change them. -- Brian D. Ripley,
/archives/html/s-news/1998-07/msg00174.html (9,112 bytes)


This search system is powered by Namazu