Description Usage Arguments Examples
View source: R/optim_matrix_chain_multiplication.R
Interface for optimal matrix chain multiplication
1 | matrix_prod(..., method = "optimal")
|
... |
Numeric matrices. |
method |
"optimal" order or "natural" left-to-right order. |
1 2 3 4 5 | A <- randn(20, 5)
B <- randn(5, 40)
C <- randn(40, 2)
system.time({ matrix_prod(A, B, C, method = "optimal") })
system.time({ matrix_prod(A, B, C, method = "natural") })
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.