diff options
Diffstat (limited to 'docs/doc/couple.html')
| -rw-r--r-- | docs/doc/couple.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/doc/couple.html b/docs/doc/couple.html index 06f200c5..8a94fe4e 100644 --- a/docs/doc/couple.html +++ b/docs/doc/couple.html @@ -83,6 +83,6 @@ </span>โจ "abc" โฉ </pre> <h2 id="definitions">Definitions</h2> -<p>As discussed above, <code><span class='Function'>โ</span></code> is equivalent to <code><span class='Function'>></span><span class='Brace'>{</span><span class='Bracket'>โจ</span><span class='Value'>๐ฉ</span><span class='Bracket'>โฉ</span><span class='Value'>;</span><span class='Bracket'>โจ</span><span class='Value'>๐จ</span><span class='Separator'>,</span><span class='Value'>๐ฉ</span><span class='Bracket'>โฉ</span><span class='Brace'>}</span></code>. To complete the picture we should describe Merge fully. Merge is defined on an array argument <code><span class='Value'>๐ฉ</span></code> such that there's some shape <code><span class='Value'>s</span></code> satisfying <code><span class='Function'>โง</span><span class='Modifier'>ยด</span><span class='Function'>โฅ</span><span class='Paren'>(</span><span class='Value'>s</span><span class='Function'>โกโข</span><span class='Paren'>)</span><span class='Modifier'>ยจ</span><span class='Value'>๐ฉ</span></code>. If <code><span class='Value'>๐ฉ</span></code> is empty then any shape satisfies this expression; <code><span class='Value'>s</span></code> should be chosen based on known type information for <code><span class='Value'>๐ฉ</span></code> or otherwise assumed to be <code><span class='Bracket'>โจโฉ</span></code>. If <code><span class='Value'>s</span></code> is empty then <code><span class='Value'>๐ฉ</span></code> is allowed to contain non-arrays as well as array scalars, and these will be implicitly promoted to arrays by the <code><span class='Function'>โ</span></code> indexing used later. We construct the result by combining the outer and inner axes of the argument with Table; since the outer axes come first they must correspond to the left argument and the inner axes must correspond to the right argument. <code><span class='Value'>๐ฉ</span></code> is a natural choice of left argument, and because no concrete array can be used, the right argument will be <code><span class='Function'>โ</span><span class='Value'>s</span></code>, the array of indices into any element of <code><span class='Value'>๐ฉ</span></code>. To get the appropriate element corresponding to a particular choice of index and element of <code><span class='Value'>๐ฉ</span></code> we should select using that index. The result of Merge is <code><span class='Value'>๐ฉ</span><span class='Function'>โ</span><span class='Modifier'>หโ</span><span class='Function'>โ</span><span class='Value'>s</span></code>.</p> +<p>As discussed above, <code><span class='Function'>โ</span></code> is equivalent to <code><span class='Function'>></span><span class='Brace'>{</span><span class='Bracket'>โจ</span><span class='Value'>๐ฉ</span><span class='Bracket'>โฉ</span><span class='Value'>;</span><span class='Bracket'>โจ</span><span class='Value'>๐จ</span><span class='Separator'>,</span><span class='Value'>๐ฉ</span><span class='Bracket'>โฉ</span><span class='Brace'>}</span></code>. To complete the picture we should describe Merge fully. Merge is defined on an array argument <code><span class='Value'>๐ฉ</span></code> such that there's some shape <code><span class='Value'>s</span></code> satisfying <code><span class='Function'>โง</span><span class='Modifier'>ยด</span><span class='Function'>โฅ</span><span class='Paren'>(</span><span class='Value'>s</span><span class='Function'>โกโข</span><span class='Paren'>)</span><span class='Modifier'>ยจ</span><span class='Value'>๐ฉ</span></code>. If <code><span class='Value'>๐ฉ</span></code> is empty then any shape satisfies this expression; <code><span class='Value'>s</span></code> should be chosen based on known type information for <code><span class='Value'>๐ฉ</span></code> or otherwise assumed to be <code><span class='Bracket'>โจโฉ</span></code>. If <code><span class='Value'>s</span></code> is empty then <code><span class='Value'>๐ฉ</span></code> is allowed to contain atoms as well as array scalars, and these will be implicitly promoted to arrays by the <code><span class='Function'>โ</span></code> indexing used later. We construct the result by combining the outer and inner axes of the argument with Table; since the outer axes come first they must correspond to the left argument and the inner axes must correspond to the right argument. <code><span class='Value'>๐ฉ</span></code> is a natural choice of left argument, and because no concrete array can be used, the right argument will be <code><span class='Function'>โ</span><span class='Value'>s</span></code>, the array of indices into any element of <code><span class='Value'>๐ฉ</span></code>. To get the appropriate element corresponding to a particular choice of index and element of <code><span class='Value'>๐ฉ</span></code> we should select using that index. The result of Merge is <code><span class='Value'>๐ฉ</span><span class='Function'>โ</span><span class='Modifier'>หโ</span><span class='Function'>โ</span><span class='Value'>s</span></code>.</p> <p>Given this definition we can also describe Rank (<code><span class='Modifier2'>โ</span></code>) in terms of Each (<code><span class='Modifier'>ยจ</span></code>) and the simpler monadic function Enclose-Rank <code><span class='Function'><</span><span class='Modifier2'>โ</span><span class='Value'>k</span></code>. We assume effective ranks <code><span class='Value'>j</span></code> for <code><span class='Value'>๐จ</span></code> (if present) and <code><span class='Value'>k</span></code> for <code><span class='Value'>๐ฉ</span></code> have been computed. Then the correspondence is <code><span class='Value'>๐จ</span><span class='Function'>F</span><span class='Modifier2'>โ</span><span class='Value'>k๐ฉ</span> <span class='Gets'>โโ</span> <span class='Function'>></span><span class='Paren'>(</span><span class='Function'><</span><span class='Modifier2'>โ</span><span class='Value'>j๐จ</span><span class='Paren'>)</span><span class='Function'>F</span><span class='Modifier'>ยจ</span><span class='Paren'>(</span><span class='Function'><</span><span class='Modifier2'>โ</span><span class='Value'>k๐ฉ</span><span class='Paren'>)</span></code>.</p> |
