4,000

edits

Jump to navigation
Jump to search

→External links

m (Tone ("notably" is usually superfluous and "should be" is usually not neutral); wiki links) |
|||

(3 intermediate revisions by 2 users not shown) | |||

Line 2: | Line 2: | ||

=== Syntax === | === Syntax === | ||

Outer Product differs from all other [[monadic operator]]s, which are written as a single [[glyph]], with the operand on the left. For [[backwards compatibility|historical reasons]], the outer product operator is a [[bi-glyph]] denoted as <source lang=apl inline>∘.</source>, and its appears on the right. | Outer Product differs from all other [[monadic operator]]s, which are written as a single [[glyph]], with the operand on the left. For [[backwards compatibility|historical reasons]], the outer product operator is a [[bi-glyph]] denoted as <source lang=apl inline>∘.</source>, and its appears on the right. This special notation is derived from the <source lang=apl inline>f.g</source> notation of [[inner product]]:<ref>[[Adin Falkoff|Falkoff, A.D.]] and [[Ken Iverson|K.E. Iverson]]. [https://www.jsoftware.com/papers/APL360TerminalSystem1.htm#ip The APL\360 Terminal System: Inner and Outer Products]. Research Report RC-1922. [[IBM]] Watson Research Center. 1967-10-16.</ref> | ||

<blockquote> | |||

The result of an inner product is an array with rank two less than the sum of the argument ranks. The result of an outer product, on the other hand, is always an array of rank equal to the sum of the argument ranks. This follows from the fact that the reduction operation, which collapses two dimensions in an inner product, is not used in the outer product. The notation for outer product reflects this by canonically using a small circle as the first symbol. Thus, the ordinary outer product is written as <code>a∘.×b</code> . | |||

</blockquote> | |||

This syntactical inconsistency is resolved in [[J]] and [[BQN]], where the outer product operator, called Table, and denoted <source lang=j inline>/</source> and <code>⌜</code> respectively, | This syntactical inconsistency is resolved in [[J]] and [[BQN]], where the outer product operator, called Table, and denoted <source lang=j inline>/</source> and <code>⌜</code> respectively, has the usual operator syntax. | ||

=== Examples === | === Examples === | ||

Line 80: | Line 83: | ||

Here there are faster solutions such as the [[wikipedia:Sieve of Eratosthenes|Sieve of Eratosthenes]]. | Here there are faster solutions such as the [[wikipedia:Sieve of Eratosthenes|Sieve of Eratosthenes]]. | ||

== External links == | == External links == | ||

* [https://mlochbaum.github.io/OuterProduct/ Outer Product as an Introduction to APL and a Pretty Cool Thing in General]: website for LambdaConf talk by [[Marshall Lochbaum]] | |||

=== Documentation === | === Documentation === | ||

Line 86: | Line 91: | ||

* [https://microapl.com/apl_help/ch_020_020_890.htm APLX] | * [https://microapl.com/apl_help/ch_020_020_890.htm APLX] | ||

* J [https://www.jsoftware.com/help/dictionary/d420.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/slash#dyadic NuVoc] | * J [https://www.jsoftware.com/help/dictionary/d420.htm Dictionary], [https://code.jsoftware.com/wiki/Vocabulary/slash#dyadic NuVoc] | ||

* [https://mlochbaum.github.io/BQN/doc/map.html#table BQN] | |||

== References == | |||

<references/> | |||

{{APL built-ins}}[[Category:Primitive operators]] | {{APL built-ins}}[[Category:Primitive operators]] |

Retrieved from ‘https://aplwiki.com/wiki/Special:MobileDiff/7316...8352’