rray_dot() works exactly like the base R function,
%*%, but preserves
the rray class where applicable. For the exact details of how 1D objects
are promoted to 2D objects, see %*%.
Arrays or rrays that are either 1D or 2D.
The result of the matrix multiplication of
%*% for the
exact details. The common type of
y will be preserved.
Due to some peculiarities with how
%*% dispatches with S3 objects, calling
%*% directly with an rray will compute the matrix multiplication correctly,
but the class will be lost.
rray_dot() ensures that the rray class is
rray_dot(1:5, 1:5)#> [,1] #> [1,] 55rray_dot(rray(1:5), 1:5)#> <rray<dbl>[,1]> #> [,1] #> [1,] 55