aboutsummaryrefslogtreecommitdiff
path: root/docs/doc/rank.html
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2022-06-14 22:13:43 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2022-06-18 16:38:12 -0400
commit9b5c6783a95dc0a0048e93e6f610beaa20932191 (patch)
tree4483c6c69cb5bdeceae1d4440c5d2107ac954883 /docs/doc/rank.html
parentfb0e65434f9e20a80a40ceb5088aea69404480f3 (diff)
Use [] instead of >⟨⟩ in a few places
Diffstat (limited to 'docs/doc/rank.html')
-rw-r--r--docs/doc/rank.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/doc/rank.html b/docs/doc/rank.html
index 23a5630e..8cf63ad2 100644
--- a/docs/doc/rank.html
+++ b/docs/doc/rank.html
@@ -244,7 +244,7 @@
<li>Two numbers indicate the ranks for <code><span class='Value'>𝕨</span></code> and <code><span class='Value'>𝕩</span></code>.</li>
</ul>
<p>As an example, we'll define the matrix-vector product. A matrix is a rank-2 array and a vector is a list, and their product is a list. It's made up of the elements <code><span class='Function'>+</span><span class='Modifier'>´</span> <span class='Value'>row</span> <span class='Function'>×</span> <span class='Value'>vec</span></code> for each row <code><span class='Value'>row</span></code> of the matrix. To define this using Rank, we'll change <code><span class='Function'>+</span><span class='Modifier'>´</span></code> to <code><span class='Function'>+</span><span class='Modifier'>˝</span></code> to get a unit out, and we need to map over the rows of the left argument but not of the right one. Following the rules above, there are several ways to do this, including <code><span class='Function'>+</span><span class='Modifier'>˝</span><span class='Modifier2'>∘</span><span class='Function'>×</span><span class='Modifier2'>⎉</span><span class='Number'>1</span></code>, <code><span class='Function'>+</span><span class='Modifier'>˝</span><span class='Modifier2'>∘</span><span class='Function'>×</span><span class='Modifier2'>⎉</span><span class='Number'>¯1</span><span class='Ligature'>‿</span><span class='Number'>1</span></code>, and <code><span class='Function'>+</span><span class='Modifier'>˝</span><span class='Modifier2'>∘</span><span class='Function'>×</span><span class='Modifier2'>⎉</span><span class='Number'>¯1</span><span class='Ligature'>‿</span><span class='Number'>∞</span></code>. Note that <code><span class='Modifier2'>⎉</span><span class='Number'>¯1</span></code> wouldn't work, because the ¯1 is interpreted separately for both arguments—it's equivalent to 1 matrix but 0 for the vector, or <code><span class='Modifier2'>⎉</span><span class='Number'>1</span><span class='Ligature'>‿</span><span class='Number'>0</span></code> overall. for the When correctly defined we can see that multiplication by the matrix <code><span class='Value'>m</span></code> below negates the first element of a list, and also swaps it with the second.</p>
-<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4oqiIG0g4oaQID7in6gw4oC/MeKAvzAswq8x4oC/MOKAvzAsMOKAvzDigL8x4p+pCgory50gMOKAvzHigL8wIMOXIDHigL8y4oC/MwoKbSAry53iiJjDl+KOiTHigL/iiJ4gMeKAvzLigL8z">↗️</a><pre> <span class='Function'>⊢</span> <span class='Value'>m</span> <span class='Gets'>←</span> <span class='Function'>&gt;</span><span class='Bracket'>⟨</span><span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>1</span><span class='Ligature'>‿</span><span class='Number'>0</span><span class='Separator'>,</span><span class='Number'>¯1</span><span class='Ligature'>‿</span><span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>0</span><span class='Separator'>,</span><span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>1</span><span class='Bracket'>⟩</span>
+<a class="replLink" title="Open in the REPL" target="_blank" href="https://mlochbaum.github.io/BQN/try.html#code=4oqiIG0g4oaQIFsw4oC/MeKAvzAsIMKvMeKAvzDigL8wLCAw4oC/MOKAvzFdCgory50gMOKAvzHigL8wIMOXIDHigL8y4oC/MwoKbSAry53iiJjDl+KOiTHigL/iiJ4gMeKAvzLigL8z">↗️</a><pre> <span class='Function'>⊢</span> <span class='Value'>m</span> <span class='Gets'>←</span> <span class='Bracket'>[</span><span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>1</span><span class='Ligature'>‿</span><span class='Number'>0</span><span class='Separator'>,</span> <span class='Number'>¯1</span><span class='Ligature'>‿</span><span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>0</span><span class='Separator'>,</span> <span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>0</span><span class='Ligature'>‿</span><span class='Number'>1</span><span class='Bracket'>]</span>
┌─
╵ 0 1 0
¯1 0 0