aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/group.md27
-rw-r--r--docs/doc/group.html29
2 files changed, 30 insertions, 26 deletions
diff --git a/doc/group.md b/doc/group.md
index 946e7256..dac75506 100644
--- a/doc/group.md
+++ b/doc/group.md
@@ -16,11 +16,13 @@ dim ← 7‿7.3
sh ← 0.6‿0
rc ← At "class=code|stroke-width=1|rx=12"
-g ← "g"At"text-anchor=middle|font-family=BQN,monospace"
-tg ← "g"At"font-size=18px"
-cg ← "g"At"text-anchor=end|font-size=16px"
-lg ← "g"At"class=yellow|stroke-width=1"
-bg ← "g"At"class=green|stroke-width=1|style=fill:none"
+Ge ← "g"⊸At⊸Enc
+g ← "text-anchor=middle|font-family=BQN,monospace"
+dg ← "font-size=24px|text-anchor=start|fill=currentColor|opacity=0.9"
+tg ← "font-size=18px"
+cg ← "font-size=16px|text-anchor=end"
+lg ← "class=yellow|stroke-width=2"
+bg ← "class=green|stroke-width=1.5|style=fill:none"
C ← (↕-2÷˜-⟜1)∘≠
zgp ← (2÷˜»⊸+-⊢´)+`0.6+≠¨zf
@@ -28,20 +30,21 @@ zp ← zgp + C¨ zf
Text ← ("text" Attr Pos)⊸Enc
ty‿txf‿tt ← ⟨
- +`¯2.6‿1‿3‿1.5
+ +`¯2.3‿1‿3‿1.3
⟨C, C, ∾zp, zgp⟩
⟨wf, xf, ∾zf, Num¨zi⟩
tp ← (tx←txf{𝕎𝕩}¨tt)≍¨¨ty
lp ← (∾wv⊸⊔)⊸(((0.2‿¯0.5×⌜0‿1)+≍)¨)´1‿2⊏tp
-b ← (0.4⌈0.2+≠¨zf) {∾"M vhv"∾¨FmtNum (0‿1‿1‿0‿1⊏d)×(⟨𝕨÷¯2,¯2⟩+𝕩)∾⟨1,𝕨,¯1⟩}¨ 3⊑tp
+b ← (0.4⌈0.2+≠¨zf) {∾"M vhv"∾¨FmtNum (0‿1‿1‿0‿1⊏d)×(⟨𝕨÷¯2,¯1.8⟩+𝕩)∾⟨1,𝕨,¯1⟩}¨ 3⊑tp
-((∾˜d)×(¯2÷˜sh⊸+)⊸∾1‿0.2+dim) SVG g Enc ⟨
+((∾˜d)×(-⊸∾0‿0.6)+(¯2÷˜sh⊸+)⊸∾1‿0.2+dim) SVG g Ge ⟨
"rect" Elt rc ∾ (Pos -dim÷2)∾"width"‿"height"≍˘FmtNum d×dim-sh
- tg Enc ∾tp Text¨○∾ tt
- cg Enc ((¯0.8+⊑⊑tx)≍¨3↑ty) Text⟜Highlight¨ "𝕨"‿"𝕩"‿"𝕨⊔𝕩"
- lg Enc (<"xy"≍⌜"12") ("line" Elt ≍˘○⥊)⟜(FmtNum d×⍉)¨ lp
- bg Enc ("path" Elt "d"≍○<⊢)¨ b
+ dg Ge (¯1.2+⊑⊑tp) Text "Group"
+ tg Ge ∾tp Text¨○∾ tt
+ cg Ge ((¯0.8+⊑⊑tx)≍¨3↑ty) Text⟜Highlight¨ "𝕨"‿"𝕩"‿"𝕨⊔𝕩"
+ lg Ge (<"xy"≍⌜"12") ("line" Elt ≍˘○⥊)⟜(FmtNum d×⍉)¨ lp
+ bg Ge ("path" Elt "d"≍○<⊢)¨ b
-->
diff --git a/docs/doc/group.html b/docs/doc/group.html
index c4471132..37d5a5ed 100644
--- a/docs/doc/group.html
+++ b/docs/doc/group.html
@@ -6,24 +6,25 @@
<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a> / <a href="../index.html">main</a> / <a href="index.html">doc</a></div>
<h1 id="group">Group</h1>
<p>BQN replaces the <a href="https://aplwiki.com/wiki/Key">Key</a> operator from J or Dyalog APL, and <a href="https://aplwiki.com/wiki/Partition_representations">many forms of partitioning</a>, with a single (ambivalent) Group function <code><span class='Function'>⊔</span></code>. This function is somewhat related to the K function <code><span class='Function'>=</span></code> of the same name, but results in an array rather than a dictionary.</p>
-<svg viewBox='-344 -105 640 210'>
+<svg viewBox='-344 -121.8 640 226.8'>
<g text-anchor='middle' font-family='BQN,monospace'>
<rect class='code' stroke-width='1' rx='12' x='-280' y='-102.2' width='512' height='204.4'/>
- <g font-size='18px'><text x='-160' y='-72.8'><tspan class='Number'>0</tspan></text><text x='-80' y='-72.8'><tspan class='Number'>¯1</tspan></text><text x='0' y='-72.8'><tspan class='Number'>¯1</tspan></text><text x='80' y='-72.8'><tspan class='Number'>2</tspan></text><text x='160' y='-72.8'><tspan class='Number'>0</tspan></text><text x='-160' y='-44.8'><tspan class='String'>"zero"</tspan></text><text x='-80' y='-44.8'><tspan class='String'>"one"</tspan></text><text x='0' y='-44.8'><tspan class='String'>"two"</tspan></text><text x='80' y='-44.8'><tspan class='String'>"three"</tspan></text><text x='160' y='-44.8'><tspan class='String'>"four"</tspan></text><text x='-128' y='39.2'><tspan class='String'>"zero"</tspan></text><text x='-48' y='39.2'><tspan class='String'>"four"</tspan></text><text x='128' y='39.2'><tspan class='String'>"three"</tspan></text><text x='-88' y='81.2'><tspan class='Number'>0</tspan></text><text x='40' y='81.2'><tspan class='Number'>1</tspan></text><text x='128' y='81.2'><tspan class='Number'>2</tspan></text></g>
- <g text-anchor='end' font-size='16px'>
- <text x='-224' y='-72.8'><tspan class='Value'>𝕨</tspan></text>
- <text x='-224' y='-44.8'><tspan class='Value'>𝕩</tspan></text>
- <text x='-224' y='39.2'><tspan class='Value'>𝕨</tspan><tspan class='Function'>⊔</tspan><tspan class='Value'>𝕩</tspan></text>
+ <g font-size='24px' text-anchor='start' fill='currentColor' opacity='0.9'><text x='-256' y='-98'>Group</text></g>
+ <g font-size='18px'><text x='-160' y='-64.4'><tspan class='Number'>0</tspan></text><text x='-80' y='-64.4'><tspan class='Number'>¯1</tspan></text><text x='0' y='-64.4'><tspan class='Number'>¯1</tspan></text><text x='80' y='-64.4'><tspan class='Number'>2</tspan></text><text x='160' y='-64.4'><tspan class='Number'>0</tspan></text><text x='-160' y='-36.4'><tspan class='String'>"zero"</tspan></text><text x='-80' y='-36.4'><tspan class='String'>"one"</tspan></text><text x='0' y='-36.4'><tspan class='String'>"two"</tspan></text><text x='80' y='-36.4'><tspan class='String'>"three"</tspan></text><text x='160' y='-36.4'><tspan class='String'>"four"</tspan></text><text x='-128' y='47.6'><tspan class='String'>"zero"</tspan></text><text x='-48' y='47.6'><tspan class='String'>"four"</tspan></text><text x='128' y='47.6'><tspan class='String'>"three"</tspan></text><text x='-88' y='84'><tspan class='Number'>0</tspan></text><text x='40' y='84'><tspan class='Number'>1</tspan></text><text x='128' y='84'><tspan class='Number'>2</tspan></text></g>
+ <g font-size='16px' text-anchor='end'>
+ <text x='-224' y='-64.4'><tspan class='Value'>𝕨</tspan></text>
+ <text x='-224' y='-36.4'><tspan class='Value'>𝕩</tspan></text>
+ <text x='-224' y='47.6'><tspan class='Value'>𝕨</tspan><tspan class='Function'>⊔</tspan><tspan class='Value'>𝕩</tspan></text>
</g>
- <g class='yellow' stroke-width='1'>
- <line x1='-160' x2='-128' y1='-39.2' y2='25.2'/>
- <line x1='160' x2='-48' y1='-39.2' y2='25.2'/>
- <line x1='80' x2='128' y1='-39.2' y2='25.2'/>
+ <g class='yellow' stroke-width='2'>
+ <line x1='-160' x2='-128' y1='-30.8' y2='33.6'/>
+ <line x1='160' x2='-48' y1='-30.8' y2='33.6'/>
+ <line x1='80' x2='128' y1='-30.8' y2='33.6'/>
</g>
- <g class='green' stroke-width='1' style='fill:none'>
- <path d='M-176 25.2v28h176v-28'/>
- <path d='M24 25.2v28h32v-28'/>
- <path d='M80 25.2v28h96v-28'/>
+ <g class='green' stroke-width='1.5' style='fill:none'>
+ <path d='M-176 33.6v28h176v-28'/>
+ <path d='M24 33.6v28h32v-28'/>
+ <path d='M80 33.6v28h96v-28'/>
</g>
</g>
</svg>