Description Usage Arguments Value Note Author(s) See Also Examples
This function calculates A %*% diag(v)
. It is much faster than the direct calculation as it avoids the huge matrix multiplication problem.
1 | gmatTimesDiagVec(A, v)
|
A |
An object of class |
v |
An object of class 'gvecotr' or a 'vector'. |
Returns a gmatrix
Note that to calculate the diag(v) %*% A
one may use the efficient formula v*A
.
Nathan Morris
1 2 3 | v=grnorm(10)
A=gmatrix(grnorm(100),10,10,dup=FALSE)
gmatTimesDiagVec(A, v)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.