power_of_a_matrix | R Documentation |
Comput the kth power of a squere matrix, i.e., multiply the gpu.matrix-class object by itself as many times as user indicates.
## S4 method for signature 'gpu.matrix.tensorflow,numeric'
x %^% k
## S4 method for signature 'gpu.matrix.torch,numeric'
x %^% k
x |
a |
k |
the power of the matrix. |
The input x
gpu.matrix-class needs to be squere. This function internally call the method %*%
as many times as required. If the input gpu.matrix-class object is stored on the GPU, then the operations will be performed on the GPU. See gpu.matrix
.
the nth power of the input gpu.matrix-class object. The returned matrix is also a gpu.matrix-class object.
See also: %*%
.
## Not run:
a <- gpu.matrix(rnorm(9),nrow=3,ncol=3)
a %^% 5
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.