trusted
83
edits
Tags: Mobile edit Mobile web edit |
m (Move link to Roger Hui paper to External Links section) Tags: Mobile edit Mobile web edit |
||
Line 140: | Line 140: | ||
(3 4⍴5)+.×1 5⍴6 ⍝ works in NARS2000 or APL\360, not in Dyalog APL</syntaxhighlight> | (3 4⍴5)+.×1 5⍴6 ⍝ works in NARS2000 or APL\360, not in Dyalog APL</syntaxhighlight> | ||
</blockquote> | </blockquote> | ||
The <syntaxhighlight lang=apl inline>⊃⍤0⊢(↓⍺)∘.(⍺⍺/⍵⍵¨)↓(¯1⌽⍳⍴⍴⍵)⍉⍵</syntaxhighlight> line of IP above can be written more directly as <syntaxhighlight lang=apl inline>⍺(⍺⍺⌿⍵⍵¨⍤¯1)⍤1 99⊢⍵</syntaxhighlight>, which uses the more efficient | The <syntaxhighlight lang=apl inline>⊃⍤0⊢(↓⍺)∘.(⍺⍺/⍵⍵¨)↓(¯1⌽⍳⍴⍴⍵)⍉⍵</syntaxhighlight> line of IP above can be written more directly as <syntaxhighlight lang=apl inline>⍺(⍺⍺⌿⍵⍵¨⍤¯1)⍤1 99⊢⍵</syntaxhighlight>, which uses the more efficient major-cell-at-a-time algorithm (rather than row-by-column). The ISO/IEC 13751:2001(E) inner product, conversely, can only be calculated row-by-column, as computing the results one major cell (of the right argument) at a time relies on each application of the right operand being done between two scalars and producing a scalar result. | ||
== External links == | == External links == | ||
Line 149: | Line 149: | ||
* [https://microapl.com/apl_help/ch_020_020_880.htm APLX] | * [https://microapl.com/apl_help/ch_020_020_880.htm APLX] | ||
* J [https://www.jsoftware.com/help/dictionary/d300.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/dot#dyadic NuVoc] | * J [https://www.jsoftware.com/help/dictionary/d300.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/dot#dyadic NuVoc] | ||
=== Publications === | |||
* [https://www.jsoftware.com/papers/innerproduct/ip1.htm Inner Product: An Old/New Problem] by [[Roger Hui]] | |||
=== Discussion of differences between dialects === | === Discussion of differences between dialects === |