Inner
Usage
• Inner[f, , , g] 是 Dot的一般化,在这儿 f 起乘法和 g 起加法的作用。
Notes
• 如同 Dot一样, Inner有效的将第二个张量的第一个指标和第一个张量的最后的指标进行比较。把Inner用到一个秩为 的张量和秩为 的张量给出一个秩为 的张量。• Inner[f, , ] 对 g用 Plus。 • Inner[f, , , g, n] 将第一个张量的指标 n 和第二个张量的第一个指标进行比较。 •  和  的头必须相同,但未必是 List.
Further Examples
Here is another way (beside Dot) to get the dot product of two vectors.
In[1]:=
|
Out[1]=
|
This is a generalized inner product.
In[2]:=
|
Out[2]=
|
This gives the inner product of two tensors and shows their ranks.
In[3]:=
|
In[4]:=
|
In[5]:=
|
Out[5]=
|
In[6]:=
|
Out[6]=
|
|