diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-09-04 21:33:13 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-09-04 21:33:13 -0400 |
| commit | 015d9cd399100427b3e82fb183c81d034f00cd8c (patch) | |
| tree | 64470d2b546b3691483e35dcadaf925988ffcd37 /doc/couple.md | |
| parent | cf072f50d2e1c600c788d37645721a94c55377c8 (diff) | |
Use atom for non-array throughout docs
Diffstat (limited to 'doc/couple.md')
| -rw-r--r-- | doc/couple.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/couple.md b/doc/couple.md index 3b11b2b3..3cc1ac8f 100644 --- a/doc/couple.md +++ b/doc/couple.md @@ -49,6 +49,6 @@ The pair function, which creates a list from its arguments, can be written `Pair ## Definitions -As discussed above, `โ` is equivalent to `>{โจ๐ฉโฉ;โจ๐จ,๐ฉโฉ}`. To complete the picture we should describe Merge fully. Merge is defined on an array argument `๐ฉ` such that there's some shape `s` satisfying `โงยดโฅ(sโกโข)ยจ๐ฉ`. If `๐ฉ` is empty then any shape satisfies this expression; `s` should be chosen based on known type information for `๐ฉ` or otherwise assumed to be `โจโฉ`. If `s` is empty then `๐ฉ` is allowed to contain non-arrays as well as array scalars, and these will be implicitly promoted to arrays by the `โ` 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. `๐ฉ` is a natural choice of left argument, and because no concrete array can be used, the right argument will be `โs`, the array of indices into any element of `๐ฉ`. To get the appropriate element corresponding to a particular choice of index and element of `๐ฉ` we should select using that index. The result of Merge is `๐ฉโหโโs`. +As discussed above, `โ` is equivalent to `>{โจ๐ฉโฉ;โจ๐จ,๐ฉโฉ}`. To complete the picture we should describe Merge fully. Merge is defined on an array argument `๐ฉ` such that there's some shape `s` satisfying `โงยดโฅ(sโกโข)ยจ๐ฉ`. If `๐ฉ` is empty then any shape satisfies this expression; `s` should be chosen based on known type information for `๐ฉ` or otherwise assumed to be `โจโฉ`. If `s` is empty then `๐ฉ` is allowed to contain atoms as well as array scalars, and these will be implicitly promoted to arrays by the `โ` 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. `๐ฉ` is a natural choice of left argument, and because no concrete array can be used, the right argument will be `โs`, the array of indices into any element of `๐ฉ`. To get the appropriate element corresponding to a particular choice of index and element of `๐ฉ` we should select using that index. The result of Merge is `๐ฉโหโโs`. Given this definition we can also describe Rank (`โ`) in terms of Each (`ยจ`) and the simpler monadic function Enclose-Rank `<โk`. We assume effective ranks `j` for `๐จ` (if present) and `k` for `๐ฉ` have been computed. Then the correspondence is `๐จFโk๐ฉ โโ >(<โj๐จ)Fยจ(<โk๐ฉ)`. |
