From 015d9cd399100427b3e82fb183c81d034f00cd8c Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Fri, 4 Sep 2020 21:33:13 -0400 Subject: Use atom for non-array throughout docs --- docs/doc/couple.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/doc/couple.html') 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 @@ โŸจ "abc" โŸฉ

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๐•ฉ).

-- cgit v1.2.3