einstein | R Documentation |
Implements the Einstein notation for summation over repeated indices.
einstein(..., drop = TRUE)
... |
arbitrary number of indexed |
drop |
|
array
.
Guidotti E (2022). "calculus: High-Dimensional Numerical and Symbolic Calculus in R." Journal of Statistical Software, 104(5), 1-37. doi: 10.18637/jss.v104.i05
Other tensor algebra:
contraction()
,
delta()
,
diagonal()
,
epsilon()
,
index()
### A{i,j} B{j,k} a <- array(letters[1:6], dim = c(i=2, j=3)) b <- array(letters[1:3], dim = c(j=3, k=1)) einstein(a,b) ### A{i,j} B{j,k,k} C{k,l} D{j,k} a <- array(1:10, dim = c(i=2, j=5)) b <- array(1:45, dim = c(j=5, k=3, k=3)) c <- array(1:12, dim = c(k=3, l=4)) d <- array(1:15, dim = c(j=5, k=3)) einstein(a,b,c,d)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.